note 81435 added to install.unix.commandline

From: Date: Thu, 28 Feb 2008 08:25:06 +0000
Subject: note 81435 added to install.unix.commandline
Groups: php.notes 
Request: Send a blank email to php-notes+get-136547@lists.php.net to get a copy of this message
Have noticed on debian now, and may be true of other builds, that if you are using php as a command line language, you don't need the -q ie: #!/usr/bin/php -q anymore. What really took me ages to work out was how to the use php in cgi mode (ie in a cgi-bin directory) as it doesn't send http headers by default. It also fails to populate $_GET and $_POST arrays. Turns out debian php build comes with /usr/bin/php-cgi Use this in your shebang if running CGI scripts! ie: #!/usr/bin/php-cgi I understand now - but had to figure this out myself! Keywords I tried to solve this problem with were: PHP, CGI, no $_GET array, Premature end of script headers, No http Headers, debian Hopefully this post might save someone many hours of frustration, if they are googling the above words! ---- Server IP: 117.104.160.194 Probable Submitter: 124.176.130.113 ---- Manual Page -- http://www.php.net/manual/en/install.unix.commandline.php Edit -- https://master.php.net/note/edit/81435 Del: integrated -- https://master.php.net/note/delete/81435/integrated Del: useless -- https://master.php.net/note/delete/81435/useless Del: bad code -- https://master.php.net/note/delete/81435/bad+code Del: spam -- https://master.php.net/note/delete/81435/spam Del: non-english -- https://master.php.net/note/delete/81435/non-english Del: in docs -- https://master.php.net/note/delete/81435/in+docs Del: other reasons-- https://master.php.net/note/delete/81435 Reject -- https://master.php.net/note/reject/81435 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136547) next »