note 50243 added to features.commandline
| From: | db at digitalmediacreation dot ch | Date: | Tue, 22 Feb 2005 19:49:10 +0000 |
| Subject: | note 50243 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85387@lists.php.net to get a copy of this message | ||
A very important point missing here (I lost hours on it and hope to avoid this to you) :
* When using PHP as CGI
* When you just become crazy because of "No input file specified" appearing on the web
page, while it never appears directly in the shell
Then I have a solution for you :
1. Create a script for example called cgiwrapper.cgi
2. Put inside :
#!/bin/sh -
export SCRIPT_FILENAME=/var/www/realpage.php
/usr/bin/php -f $SCRIPT_FILENAME
3. Name your page realpage.php
For example with thttpd the problem is that SCRIPT_FILENAME is not defined, while PHP absolutely
requires it.
My solution corrects that problem !
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50243
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50243&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50243&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50243&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50243&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50243&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50243&report=yes
Search -- http://master.php.net/manage/user-notes.php