php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #2851 Perl-like CGI doesn't work like stated in docs
Submitted: 1999-11-28 13:41 UTC Modified: 1999-12-11 16:53 UTC
From: stas at zend dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Beta 3 OS: Linux
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: stas at zend dot com
New email:
PHP Version: OS:

 

 [1999-11-28 13:41 UTC] stas at zend dot com
In security.html, case 4, it says that it's possible to run PHP script just like Perl
script, by putting #!/path/to/php on the start of the scriptand making script executable. Well,
it's not the case - in cgi_main.c it explicitly checks if it is run as CGI and reqires
PATH_TRANSLATED. Option --enable-discard-path doesn't seem to help, and, in fact, I do not see
from source it does anything at all. So when I do what is stated in the manual, I get
"No input file specified."

It also ignores command-line arguments, given with #! - which is not documented anywhere
and doesn't match command-line behaviour.

Is it possible to make command-line and CGI via #! to behave in the same consistent way? 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-11 16:53 UTC] evan at cvs dot php dot net
This seems to be fixed in the latest CVS. Please try it.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 00:00:02 2026 UTC