php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #20888 Document when did php-cli.exe and friends existed
Submitted: 2002-12-08 15:29 UTC Modified: 2003-02-01 07:33 UTC
From: jpl at remotejava dot com Assigned: betz (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS:
Private report: No CVE-ID: None
 [2002-12-08 15:29 UTC] jpl at remotejava dot com
I tried installing 4.3.0RC2 in CGI mode for Apache, following the documentation at

http://www.php.net/manual/en/install.commandline.php

Result: one hour wasted. Reason: the page does not contain any hint as to what directives need to be added to the httpd.conf to enable processing of *.php files by the interpreter. There is a user-provided docnote which handles this, suggesting to use something like this:

AddType application/x-httpd-php .php4
ScriptAlias /php4/ "/home/king/php-4.1.2/"
Action application/x-httpd-php /php4/php

Unfortunately, this is dangerously outdated: you must use /php4/php-cgi, not /php4/php. Failing to do so results in the very difficult to debug "Premature end of script headers" message in server's error log. That "php-cgi" thing is mentioned NOWHERE on the CGI installation page - I only managed to solve it through advice on IRC.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-09 04:25 UTC] betz@php.net
Thanks for your report. I am on the way to update the docs.
They will show up soon on the website.
 [2002-12-19 18:55 UTC] betz@php.net
Until a descision is made by the developers of PHP about the names of the binaries this bug will be suspended.
 [2003-01-31 08:59 UTC] betz@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

The final descision was made:
The php cgi binary is /php4/php.exe. This one is intended to be used with webservers.
/php4/cli/php-cli.exe is the CLI Version of php intended to use for commandline scripting.
Friedhelm
 [2003-01-31 12:37 UTC] philip@php.net
Actually, it's:

{phpdir}/php.exe (CGI)
{phpdir}/cli/php.exe (CLI)

This is documented at features.commandline.php
 [2003-01-31 15:48 UTC] philip@php.net
This brings up a good point.  We should document when CLI and CGI had different names as there used to be php-cgi.exe and/or php-cli.exe and/or php.exe, and in linux wasn't there a binary named php-cli at somepoint as well?

Whatever the exact case may be, this all involves the PHP 4.2 branch when CLI was experimental.
 [2003-02-01 07:33 UTC] betz@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

for windows:
cgi binary was always php.exe and placed in
(phpdir)/php.exe.
cli binary was php-cli.exe from 4.2.0 - 4.2.3 placed in
(phpdir)/php-cli.exe
starting with 4.3.0 the cli changed its name and location to
(phpdir)/cli/php.exe.

for linux: the name of any binary was allways php 

Only RC versions of 4.3 had diiferent names, no need to document.

The different names for windows are now documented at
http://www.php.net/manual/en/features.commandline.php

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 22:01:33 2025 UTC