|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-08 19:54 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 23:00:02 2025 UTC |
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.