Bug 460898 - CUPS uses /usr/bin/php to run php pages instead of /usr/bin/php-cgi
CUPS uses /usr/bin/php to run php pages instead of /usr/bin/php-cgi
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-02 10:19 EDT by Opher Shachar
Modified: 2010-03-30 04:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-30 04:14:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A patch to have CUPS compiled with /usr/bin/php-cgi (321 bytes, patch)
2008-09-02 10:19 EDT, Opher Shachar
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
CUPS Bugs and Features 2923 None None None Never
CUPS Bugs and Features 3194 None None None Never

  None (edit)
Description Opher Shachar 2008-09-02 10:19:00 EDT
Created attachment 315554 [details]
A patch to have CUPS compiled with /usr/bin/php-cgi

Description of problem:
CUPS uses /usr/bin/php to run php pages as this excerpt from error_log shows:

   I [02/Sep/2008:17:10:11 +0300] commptr="/usr/share/doc/cups-1.2.12/whoami.php"
   I [02/Sep/2008:17:10:11 +0300] Started "/usr/bin/php" (pid=21289)

Under RHEL4 this was fine because it was the cgi flavor:
   # /usr/bin/php -v
   PHP 4.3.9 (cgi) (built: Jun 26 2006 09:46:58)
   Copyright (c) 1997-2004 The PHP Group
   Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Under RHEL5 this is wrong because it is the cli flavor:
   # /usr/bin/php -v
   PHP 5.1.6 (cli) (built: Sep 12 2007 11:11:52)
   Copyright (c) 1997-2006 The PHP Group
   Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

instead /usr/bin/php-cgi is the correct executable to run:
   # /usr/bin/php-cgi -v
   PHP 5.1.6 (cgi-fcgi) (built: Sep 12 2007 11:09:50)
   Copyright (c) 1997-2006 The PHP Group
   Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies


Version-Release number of selected component (if applicable):
cups-1.2.4

How reproducible:
Always.

Additional info:
A patch to have CUPS compiled with /usr/bin/php-cgi is attached.
Comment 2 Tim Waugh 2009-05-13 08:47:27 EDT
Reverted due to incorrect handling of CGI output that is not line-based (STR #3194).
Comment 4 Tim Waugh 2009-06-01 11:12:43 EDT
This has now had a fix checked in upstream (untested here).
Comment 10 errata-xmlrpc 2010-03-30 04:14:53 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0210.html

Note You need to log in before you can comment on or make changes to this bug.