php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #2850 Perl-like CGI doesn't work like stated in docs
Submitted: 1999-11-28 13:36 UTC Modified: 1999-11-28 13:40 UTC
From: stas at zend dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.12 OS: Linux
Private report: No CVE-ID: None
 [1999-11-28 13:36 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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-28 13:40 UTC] stas at zend dot com
Sorry, this in fact PHP4 issue I think...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 15:01:31 2024 UTC