From: jorn dot tschersich at groupecat dot com
Operating system: Windows 2000 Professional
PHP version: 5.0.4
PHP Bug Type: Filesystem function related
Bug description: CMD.EXE stays open after calling from PHP => script doesn't
continue
Description:
------------
Hi!
I am running PHP 5.0.4 on Apache 2.0.53 under Windows 2000 Prof.
Up to last Thursday my print script was running perfect, all of a sudden
it won't continue after printing the first document.
I call Adobe Reader 4 with the /t parameter to make it print and then
close itself (see code sample).
Every once in a while the script would not work completely, i.e. it would
stall after the first system call. I had to manually kill the CMD.EXE on
the server and restart Apache, but it would work correctly after that.
However, this does not seem to help anymore.
The problem occurs with all the system functions, system(), exec(),
shell_exec(), passthru() and the backtick operator.
Additionally, I have tried even really simple calls like system('echo
Test'); which still stall the program. The CMD.EXE stays open and, on
closer examination with ProcessExplorer, is waiting for user input.
However, the window is completely blank and what should it be waiting
for?!
I have tried re-installing Apache, rebooting a couple of times, even
undone some unrelated code changes that I did, nothing worked.
Another solution for me, at least for the time being, would be a way to
print PDFs on the server without using any of the functions that require
CMD.EXE on a Windows server.
Any help would be appreciated!
Reproduce code:
---------------
system('c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t
document.pdf \\SERVER\PRINTER');
Expected result:
----------------
Print document.pdf on PRINTER that is connected to SERVER, then close
Adobe Reader and continue with script execution.
Actual result:
--------------
Prints document.pdf on PRINTER that is connected to SERVER, then closes
Adobe Reader, but DOES NOT continue with script execution.
--
Edit bug report at http://bugs.php.net/?id=34035&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34035&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34035&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34035&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34035&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34035&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34035&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34035&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34035&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34035&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34035&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34035&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34035&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34035&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34035&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34035&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34035&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34035&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34035&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34035&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34035&r=mysqlcfg