note 33119 added to features.commandline

From: Date: Tue, 17 Jun 2003 09:12:22 +0000
Subject: note 33119 added to features.commandline
Groups: php.notes 
Request: Send a blank email to php-notes+get-50472@lists.php.net to get a copy of this message
Ok, I've had a heck of a time with PHP > 4.3.x and whether to use CLI vs CGI. The CGI version of 4.3.2 would return (in browser): --- No input file specified. --- And the CLI version would return: --- 500 Internal Server Error --- It appears that in CGI mode, PHP looks at the environment variable PATH_TRANSLATED to determine the script to execute and ignores command line. That is why in the absensce of this environment variable, you get "No input file specified." However, in CLI mode the HTTP headers are not printed. I believe this is intended behavior for both situations but creates a problem when you have a CGI wrapper that sends environment variables but passes the actual script name on the command line. By modifying my CGI wrapper to create this PATH_TRANSLATED environment variable, it solved my problem, and I was able to run the CGI build of 4.3.2 ---- Manual Page -- http://www.php.net/manual/en/features.commandline.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33119 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33119&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33119&report=yes

« previous php.notes (#50472) next »