php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34035 CMD.EXE stays open after calling from PHP => script doesn't continue
Submitted: 2005-08-08 13:12 UTC Modified: 2005-08-08 19:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jorn dot tschersich at groupecat dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.0.4 OS: Windows 2000 Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jorn dot tschersich at groupecat dot com
New email:
PHP Version: OS:

 

 [2005-08-08 13:12 UTC] jorn dot tschersich at groupecat dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-08 19:54 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 19:01:29 2024 UTC