Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

I will repeat a last time :) It does work here using IIS6 and the exact
same windows version of FastCGI. The other users with issues with that
have solved the problem as well using latest 5.3 and the right
configuration.



There are differences between 5.2 and 5.3, a lot. One of them is a
working impersonation (which is not only about exec).


Previous Comments:

[2010-03-25 00:40:55] heer2351 at zonnet dot nl

Thanks for your help. I think there are still more people with the same
problem. I will try to find a solution and will post here if I find
one.

For now I stick with 5.2.13



I am not convinced it is a config problem. Will dig into SVN and find
what the difference is between the two versions.


[2010-03-25 00:30:20] paj...@php.net

I don't know either and hard to say why it does not work for you but for
us (same config).



I feel like you actually configure it wrong. impersonation in 5.2 was
not fully working and was not doing the right thing (not only for
exec&co).



I can't help further without more details about how you configure the
impersonation or having a remote access to debug.


[2010-03-25 00:17:50] heer2351 at zonnet dot nl

Changed to your suggestion with \\, same error.



Changed to 5.2.13 ran my version and your version both echo the correct
username.


[2010-03-25 00:13:31] heer2351 at zonnet dot nl

What I do not understand is that 5.2.13 works and 5.3.2 (or 5.3.3) does
not work with the same configuration.


[2010-03-25 00:11:56] paj...@php.net

echo exec('c:\Windows\System32\whoami'); can't work.



echo exec('c:\\Windows\\System32\\whoami'); should work.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

I don't know either and hard to say why it does not work for you but for
us (same config).



I feel like you actually configure it wrong. impersonation in 5.2 was
not fully working and was not doing the right thing (not only for
exec&co).



I can't help further without more details about how you configure the
impersonation or having a remote access to debug.


Previous Comments:

[2010-03-25 00:17:50] heer2351 at zonnet dot nl

Changed to your suggestion with \\, same error.



Changed to 5.2.13 ran my version and your version both echo the correct
username.


[2010-03-25 00:13:31] heer2351 at zonnet dot nl

What I do not understand is that 5.2.13 works and 5.3.2 (or 5.3.3) does
not work with the same configuration.


[2010-03-25 00:11:56] paj...@php.net

echo exec('c:\Windows\System32\whoami'); can't work.



echo exec('c:\\Windows\\System32\\whoami'); should work.


[2010-03-25 00:09:56] heer2351 at zonnet dot nl

Box is behind a company firewall so you can unfortunately not access
it.

This is an intranet site.


[2010-03-25 00:08:31] heer2351 at zonnet dot nl

This is what I ran:

 



ProcMon shows cmd.exe being started by php-cgi.exe

A thread is created running as the correct user.

Excecuted command is: cmd.exe /c "c:\Windows\System32\whoami"



I do notice that the process exits with Exit Status 5, which is normally
access denied.



I have however already tried to give Everyone full access to the whole
machine, i.e. all drives. Still the same error.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

echo exec('c:\Windows\System32\whoami'); can't work.



echo exec('c:\\Windows\\System32\\whoami'); should work.


Previous Comments:

[2010-03-25 00:09:56] heer2351 at zonnet dot nl

Box is behind a company firewall so you can unfortunately not access
it.

This is an intranet site.


[2010-03-25 00:08:31] heer2351 at zonnet dot nl

This is what I ran:

 



ProcMon shows cmd.exe being started by php-cgi.exe

A thread is created running as the correct user.

Excecuted command is: cmd.exe /c "c:\Windows\System32\whoami"



I do notice that the process exits with Exit Status 5, which is normally
access denied.



I have however already tried to give Everyone full access to the whole
machine, i.e. all drives. Still the same error.


[2010-03-25 00:04:10] paj...@php.net

btw, is it possible to access this box? I could try to debug what's
wrong there as it works just fine with the same constellation here (same
windows, IIS and fcgi versions).


[2010-03-25 00:00:09] paj...@php.net

It is not the same context using runas or impersonate.



Did you use "c:\\\\whoami" or "cmd /c..."?


[2010-03-24 23:58:27] heer2351 at zonnet dot nl

Result:

PHP Warning: exec(): Unable to fork [c:\Windows\System32\whoami] in
D:\Web\Public\Typo3\v4_2_6\fdha_hr\hr\forkTest.php on line 2




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

btw, is it possible to access this box? I could try to debug what's
wrong there as it works just fine with the same constellation here (same
windows, IIS and fcgi versions).


Previous Comments:

[2010-03-25 00:00:09] paj...@php.net

It is not the same context using runas or impersonate.



Did you use "c:\\\\whoami" or "cmd /c..."?


[2010-03-24 23:58:27] heer2351 at zonnet dot nl

Result:

PHP Warning: exec(): Unable to fork [c:\Windows\System32\whoami] in
D:\Web\Public\Typo3\v4_2_6\fdha_hr\hr\forkTest.php on line 2


[2010-03-24 23:56:20] heer2351 at zonnet dot nl

BTW if I run the same script on the webserver using fakeCGI and runas to
run as the application pool user it works.



Fake FastCGI web server

FCGI_PARAMS sent

FCGI_STDIN sent

Launching receive loop

FCGI_STDOUT: X-Powered-By: PHP/5.3.2

Content-type: text/html; charset=utf-8



Hello World!"



FCGI_END_REQUEST received

killing app

FastCGI process exited with 0



So the problem is definitely in the combination IIS6 and PHP 5.3


[2010-03-24 23:53:10] paj...@php.net

Can you try using: c:\Windows\System32\whoami please?


[2010-03-24 23:50:21] heer2351 at zonnet dot nl

I am using a simple test script to do the test:

 



FastCGI impersonation:

In PHP.ini

fastcgi.impersonate = 1



IIS:

Anonymous Authentication = On 

User is same user as Application Pool user



User has been added to IIS_WPG




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

It is not the same context using runas or impersonate.



Did you use "c:\\\\whoami" or "cmd /c..."?


Previous Comments:

[2010-03-24 23:58:27] heer2351 at zonnet dot nl

Result:

PHP Warning: exec(): Unable to fork [c:\Windows\System32\whoami] in
D:\Web\Public\Typo3\v4_2_6\fdha_hr\hr\forkTest.php on line 2


[2010-03-24 23:56:20] heer2351 at zonnet dot nl

BTW if I run the same script on the webserver using fakeCGI and runas to
run as the application pool user it works.



Fake FastCGI web server

FCGI_PARAMS sent

FCGI_STDIN sent

Launching receive loop

FCGI_STDOUT: X-Powered-By: PHP/5.3.2

Content-type: text/html; charset=utf-8



Hello World!"



FCGI_END_REQUEST received

killing app

FastCGI process exited with 0



So the problem is definitely in the combination IIS6 and PHP 5.3


[2010-03-24 23:53:10] paj...@php.net

Can you try using: c:\Windows\System32\whoami please?


[2010-03-24 23:50:21] heer2351 at zonnet dot nl

I am using a simple test script to do the test:

 



FastCGI impersonation:

In PHP.ini

fastcgi.impersonate = 1



IIS:

Anonymous Authentication = On 

User is same user as Application Pool user



User has been added to IIS_WPG


[2010-03-24 23:40:45] paj...@php.net

And how exactly did you configure FCGI (impersonation). As your
configuration is exactly one of my tests configuration, and it works
just fine.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

Can you try using: c:\Windows\System32\whoami please?


Previous Comments:

[2010-03-24 23:50:21] heer2351 at zonnet dot nl

I am using a simple test script to do the test:

 



FastCGI impersonation:

In PHP.ini

fastcgi.impersonate = 1



IIS:

Anonymous Authentication = On 

User is same user as Application Pool user



User has been added to IIS_WPG


[2010-03-24 23:40:45] paj...@php.net

And how exactly did you configure FCGI (impersonation). As your
configuration is exactly one of my tests configuration, and it works
just fine.


[2010-03-24 23:39:38] paj...@php.net

Yes, which command do you call?


[2010-03-24 23:22:18] heer2351 at zonnet dot nl

Maybe superfluous, but the only change I make is in the fcgiext.ini



I change the ExePath from:

ExePath=D:\PHP\PHP_5_2_13\php-cgi.exe

No fork error



To

ExePath=D:\PHP\PHP_5_3_3_dev\php-cgi.exe

Fork error



Rights are assigned on D:\PHP and inherit down, so that can not be the
problem. No other changes to my environment for the problem to appear.


[2010-03-24 23:17:05] heer2351 at zonnet dot nl

5.3.3.dev did not solve the problem



Had most versions in my first post:

PHP 5.3.2 (cgi-fcgi) (built: Mar  3 2010 20:47:00)

FastCGI DLL Version 7.5.7693.0

Microsoft Windows Server 2003R2

IIS6 - dll's have version 6.0.3790.1830



Do you need anymore information?




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

And how exactly did you configure FCGI (impersonation). As your
configuration is exactly one of my tests configuration, and it works
just fine.


Previous Comments:

[2010-03-24 23:39:38] paj...@php.net

Yes, which command do you call?


[2010-03-24 23:22:18] heer2351 at zonnet dot nl

Maybe superfluous, but the only change I make is in the fcgiext.ini



I change the ExePath from:

ExePath=D:\PHP\PHP_5_2_13\php-cgi.exe

No fork error



To

ExePath=D:\PHP\PHP_5_3_3_dev\php-cgi.exe

Fork error



Rights are assigned on D:\PHP and inherit down, so that can not be the
problem. No other changes to my environment for the problem to appear.


[2010-03-24 23:17:05] heer2351 at zonnet dot nl

5.3.3.dev did not solve the problem



Had most versions in my first post:

PHP 5.3.2 (cgi-fcgi) (built: Mar  3 2010 20:47:00)

FastCGI DLL Version 7.5.7693.0

Microsoft Windows Server 2003R2

IIS6 - dll's have version 6.0.3790.1830



Do you need anymore information?


[2010-03-24 23:07:38] paj...@php.net

Then I need more details about your exact configuration (windows
version, IIS version, fastcgi version, etc.)


[2010-03-24 23:04:59] heer2351 at zonnet dot nl

FastCGI impersonation is configured correctly and ProcMon shows that
cmd.exe is started with the correct user. The fork error however still
shows.



I am now downloading the php-5.3.3-dev-nts-Win32-VC9-x86-dfsfix.zip file
and will check if that solves the problem.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


Bug #27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2010-03-24 Thread pajoye
Edit report at http://bugs.php.net/bug.php?id=27051&edit=1

 ID:   27051
 Updated by:   paj...@php.net
 Reported by:  ghoffer at globalscape dot com
 Summary:  Impersonation with FastCGI does not EXEC process as
   impersonated user
 Status:   Feedback
 Type: Bug
 Package:  CGI related
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye

 New Comment:

Yes, which command do you call?


Previous Comments:

[2010-03-24 23:22:18] heer2351 at zonnet dot nl

Maybe superfluous, but the only change I make is in the fcgiext.ini



I change the ExePath from:

ExePath=D:\PHP\PHP_5_2_13\php-cgi.exe

No fork error



To

ExePath=D:\PHP\PHP_5_3_3_dev\php-cgi.exe

Fork error



Rights are assigned on D:\PHP and inherit down, so that can not be the
problem. No other changes to my environment for the problem to appear.


[2010-03-24 23:17:05] heer2351 at zonnet dot nl

5.3.3.dev did not solve the problem



Had most versions in my first post:

PHP 5.3.2 (cgi-fcgi) (built: Mar  3 2010 20:47:00)

FastCGI DLL Version 7.5.7693.0

Microsoft Windows Server 2003R2

IIS6 - dll's have version 6.0.3790.1830



Do you need anymore information?


[2010-03-24 23:07:38] paj...@php.net

Then I need more details about your exact configuration (windows
version, IIS version, fastcgi version, etc.)


[2010-03-24 23:04:59] heer2351 at zonnet dot nl

FastCGI impersonation is configured correctly and ProcMon shows that
cmd.exe is started with the correct user. The fork error however still
shows.



I am now downloading the php-5.3.3-dev-nts-Win32-VC9-x86-dfsfix.zip file
and will check if that solves the problem.


[2010-03-24 22:51:11] paj...@php.net

See my comment and related link in #50542




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

http://bugs.php.net/bug.php?id=27051


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=27051&edit=1


#27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2009-09-08 Thread pajoye
 ID:   27051
 Updated by:   paj...@php.net
 Reported By:  ghoffer at globalscape dot com
 Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye
 New Comment:

Just a quick note about the user profile, it is not set (by design) so
I won't try to access the profile data.

More on the impersonated problem later.


Previous Comments:


[2009-09-07 22:42:29] benadler at gmx dot net

I checked using Process Monitor - convert.exe is NOT started by the
correct user:

User: NT AUTHORITY\NETWORK SERVICE
Auth ID: :03e4



[2009-09-07 11:34:10] paj...@php.net

I'm not sure the users environment is set, that's a different thing.

But is it the correct user?



[2009-09-07 11:17:13] benadler at gmx dot net

Hope I'm not too verbose. Maybe it helps to see that calling this

exec("d:/programme/imagemagick/convert.exe -density $density
$baseDirectory/$bookId/document.pdf -quality 95
$baseDirectory/$bookId/$version/page_%04d.jpg", $output);
print_r($output);

in a script run by the webserver (as above) causes this:

Array
(
[0] => Error: /invalidfileaccess in --showpage--
[1] => Operand stack:
[2] =>--nostringval--   1   true
[3] => Execution stack:
[4] =>%interp_exit   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval-- 
 --nostringval--   --nostringval--   false   1   %stopped_push   1905  
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3  
%oparray_pop   --nostringval--   --nostringval--   2   1   4  
--nostringval--   %for_pos_int_continue   --nostringval--  
--nostringval--   1777   1   9   %oparray_pop   --nostringval--  
--nostringval--
[5] => Dictionary stack:
[6] =>--dict:1155/1684(ro)(G)--   --dict:1/20(G)--  
--dict:75/200(L)--   --dict:75/200(L)--   --dict:106/127(ro)(G)--  
--dict:275/300(ro)(G)--   --dict:22/25(L)--   --dict:4/6(L)--  
--dict:22/40(L)--
[7] => Current allocation mode is local
[8] => Last OS error: Bad file descriptor
)



[2009-09-07 11:11:06] benadler at gmx dot net

Ok, it works on the commandline but not using IIS6 and fastcgi with
fastcgi.impersonate = 1;.

This is test.php:



and this results in:

%USERNAME%Array
(
[0] => %USERNAME%
)
C:\Documents and Settings\Default UserArray
(
[0] => C:\Documents and Settings\Default User
)

So it seems the user's profile/environment is not correctly set up.

I think username should be either domain\deabjs1 or just deabjs1,
because this is what I use to log on to IIS using NTLM. I'm still using
the same snapshot I was using at [6 Sep 6:13pm UTC].

Thanks for your help!
ben



[2009-09-06 18:13:09] benadler at gmx dot net

I tried the newest snapshot and it seems to work - thank you!

But, could it be that the environment is not set up correctly?
Suddenly I start getting all those imagemagick-temp files in the
script's directory. I imagine the reason may be that the %TEMP% or
%TMP% system/user variables are not set correctly.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27051

-- 
Edit this bug report at http://bugs.php.net/?id=27051&edit=1



#27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2009-09-07 Thread pajoye
 ID:   27051
 Updated by:   paj...@php.net
 Reported By:  ghoffer at globalscape dot com
 Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: Windows
 PHP Version:  5.3
 Assigned To:  pajoye
 New Comment:

I'm not sure the users environment is set, that's a different thing.

But is it the correct user?


Previous Comments:


[2009-09-07 11:17:13] benadler at gmx dot net

Hope I'm not too verbose. Maybe it helps to see that calling this

exec("d:/programme/imagemagick/convert.exe -density $density
$baseDirectory/$bookId/document.pdf -quality 95
$baseDirectory/$bookId/$version/page_%04d.jpg", $output);
print_r($output);

in a script run by the webserver (as above) causes this:

Array
(
[0] => Error: /invalidfileaccess in --showpage--
[1] => Operand stack:
[2] =>--nostringval--   1   true
[3] => Execution stack:
[4] =>%interp_exit   .runexec2   --nostringval--  
--nostringval--   --nostringval--   2   %stopped_push   --nostringval-- 
 --nostringval--   --nostringval--   false   1   %stopped_push   1905  
1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3  
%oparray_pop   --nostringval--   --nostringval--   2   1   4  
--nostringval--   %for_pos_int_continue   --nostringval--  
--nostringval--   1777   1   9   %oparray_pop   --nostringval--  
--nostringval--
[5] => Dictionary stack:
[6] =>--dict:1155/1684(ro)(G)--   --dict:1/20(G)--  
--dict:75/200(L)--   --dict:75/200(L)--   --dict:106/127(ro)(G)--  
--dict:275/300(ro)(G)--   --dict:22/25(L)--   --dict:4/6(L)--  
--dict:22/40(L)--
[7] => Current allocation mode is local
[8] => Last OS error: Bad file descriptor
)



[2009-09-07 11:11:06] benadler at gmx dot net

Ok, it works on the commandline but not using IIS6 and fastcgi with
fastcgi.impersonate = 1;.

This is test.php:



and this results in:

%USERNAME%Array
(
[0] => %USERNAME%
)
C:\Documents and Settings\Default UserArray
(
[0] => C:\Documents and Settings\Default User
)

So it seems the user's profile/environment is not correctly set up.

I think username should be either domain\deabjs1 or just deabjs1,
because this is what I use to log on to IIS using NTLM. I'm still using
the same snapshot I was using at [6 Sep 6:13pm UTC].

Thanks for your help!
ben



[2009-09-06 18:13:09] benadler at gmx dot net

I tried the newest snapshot and it seems to work - thank you!

But, could it be that the environment is not set up correctly?
Suddenly I start getting all those imagemagick-temp files in the
script's directory. I imagine the reason may be that the %TEMP% or
%TMP% system/user variables are not set correctly.



[2009-09-03 21:17:45] paj...@php.net

Please (all :) try a snapshot, php 5.3 or 6 (5.3 recommended anyway
:).





[2009-09-03 19:16:50] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=288004
Log: - #27051, improve fix on xp/2k3



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27051

-- 
Edit this bug report at http://bugs.php.net/?id=27051&edit=1



#27051 [Fbk]: Impersonation with FastCGI does not EXEC process as impersonated user

2009-09-03 Thread pajoye
 ID:   27051
 Updated by:   paj...@php.net
 Reported By:  ghoffer at globalscape dot com
 Status:   Feedback
 Bug Type: Feature/Change Request
 Operating System: Windows
-PHP Version:  4.3.4
+PHP Version:  5.3
 Assigned To:  pajoye
 New Comment:

Please (all :) try a snapshot, php 5.3 or 6 (5.3 recommended anyway
:).




Previous Comments:


[2009-09-03 19:16:50] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=288004
Log: - #27051, improve fix on xp/2k3



[2009-09-03 19:16:17] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=288003
Log: - #27051, improve fix on xp/2k3



[2009-09-03 15:52:24] benadler at gmx dot net

I updated to php-5.3-nts-win32-VC9-x86-latest.zip yesterday night. The
impersonation problem with iis6 and fastcgi was fixed, but when starting
a php-script from the command line/dosbox, I get:

Warning: exec(): Unable to fork [imconvert.exe ...] in scriptname.php
on line X

Using exec() works fine when the scripts are called from IIS, though.
The failing scripts have worked fine before updating php.

I traced the execution using sysinternals process monitor, and

Process Create
C:\WINDOWS\system32\cmd.exe
cmd.exe /c "imconvert "tif:D:/data/foo.tif[0]" "D:/data/bar.jpg""

shows SUCCESS, but it seems imconvert.exe is never started, as it
doesn't show up in the trace. Process Monitor shows that the php script
is running as the user who's currently logged in, but I cannot see which
user is trying to start convert.exe

Can I help with more info?

ben.



[2009-09-02 01:59:18] s...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=287958
Log: - #27051, we need the thread token here, not the process



[2009-09-01 22:51:47] paj...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27051

-- 
Edit this bug report at http://bugs.php.net/?id=27051&edit=1