php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25797 Running the php cli more than once at the same command line causes it to hang.
Submitted: 2003-10-08 12:29 UTC Modified: 2003-10-09 06:45 UTC
From: brian at centurionservice dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.3 OS: Windows XP Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brian at centurionservice dot com
New email:
PHP Version: OS:

 

 [2003-10-08 12:29 UTC] brian at centurionservice dot com
Description:
------------
I am not running a webserver, this is for command line scripting only.

Running the PHP CLI binary more than once on the same command line causes it to hang.  For example, running "C:\php\cli>php -v" twice in a row causes the executable to hang.  Also, running "C:\php\cli>php testfile.php" twice also causes it to hang.  Sourcecode of the test file was simple <? echo "test\n"; ?>.  Running "php -h" multiple times in a row will not cause the problem.

I have tested this using the CGI binary as well and received the same results.  Same results were achieved with 4.3.4RC1 as well.

Reproduce code:
---------------
not applicable

Expected result:
----------------
return to command line

Actual result:
--------------
program hangs.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-09 06:45 UTC] sniper@php.net
Works fine for me using latest STABLE CVS snapshot.

 [2004-01-19 01:18 UTC] kadaki2 at hotmail dot com
I am having the same problem with 4.3.4, 4.3.5RC1, and php4-win32-STABLE-200401190530.  It appears to be a problem with running php too quickly after returning to the command line.  If I run "C:\PHP>php -l -f "somelargefile.php" and then wait a few seconds to run it again, it works fine.

If I run the command twice in a row without waiting, php hangs after it returns the results of the syntax check.  I can use Task Manager to kill the process and continue on (since it hangs after it returns the results,) but when trying to check a whole source tree it's not practical.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 03:01:35 2025 UTC