php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1777 No input file specified when run as cgi
Submitted: 1999-07-20 23:06 UTC Modified: 1999-08-27 10:07 UTC
From: johnh at solidtechnology dot com Assigned:
Status: Closed Package: Installation problem
PHP Version: 4.0 Beta 1 OS: Linux 2.2.9
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: johnh at solidtechnology dot com
New email:
PHP Version: OS:

 

 [1999-07-20 23:06 UTC] johnh at solidtechnology dot com
When installing php4 as a cgi program it returns No input file specified.  The apache config is as follows:

AddType application/x-httpd-php .php
Action application/x-httpd-php /www/cgi-bin/php4




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-21 00:39 UTC] johnh at solidtechnology dot com
It is not properly handling PATH_TRANSLATED.  If I set doc root in the php.ini file it then functions properly.
 [1999-07-21 01:03 UTC] johnh at solidtechnology dot com
The following patch fixes the problem; however, I am unsure if it is correct.

--- request_info.c.orig Tue Jul 20 22:01:10 1999
+++ request_info.c      Tue Jul 20 22:01:28 1999
@@ -36,6 +36,7 @@
        if (!request_info.script_filename) {
                request_info.script_filename = request_info.php_argv0;
        }
+       SG(request_info).path_translated = getenv("PATH_TRANSLATED");
 #if WIN32|WINNT
        /* FIXME WHEN APACHE NT IS FIXED */
        /* a hack for apache nt because it does not appear to set argv[1] and sets



 [1999-07-21 01:17 UTC] johnh at solidtechnology dot com
The following patch fixes the problem; however, I am unsure if it is correct.

--- request_info.c.orig Tue Jul 20 22:01:10 1999
+++ request_info.c      Tue Jul 20 22:01:28 1999
@@ -36,6 +36,7 @@
        if (!request_info.script_filename) {
                request_info.script_filename = request_info.php_argv0;
        }
+       SG(request_info).path_translated = getenv("PATH_TRANSLATED");
 #if WIN32|WINNT
        /* FIXME WHEN APACHE NT IS FIXED */
        /* a hack for apache nt because it does not appear to set argv[1] and sets



 [1999-08-27 10:07 UTC] danny at cvs dot php dot net
You have to specify the Apache document root in your php.ini.

Was not needed with PHP3, seems to be mandatory with PHP4 when
run as a CGI.

This is, to my knowledge,  not documented.

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