note 50243 deleted from features.commandline by cmb
| From: | cmb@php.net | Date: | Sun, 18 Dec 2016 10:15:34 +0000 |
| Subject: | note 50243 deleted from features.commandline by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208661@lists.php.net to get a copy of this message | ||
Note Submitter: db at digitalmediacreation dot ch
----
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 !