Bug 460898 - CUPS uses /usr/bin/php to run php pages instead of /usr/bin/php-cgi
Summary: CUPS uses /usr/bin/php to run php pages instead of /usr/bin/php-cgi
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cups
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-02 14:19 UTC by Opher Shachar
Modified: 2010-03-30 08:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:14:53 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
CUPS Bugs and Features 2923 0 None None None Never
CUPS Bugs and Features 3194 0 None None None Never
Red Hat Product Errata RHBA-2010:0210 0 normal SHIPPED_LIVE cups bug fix update 2010-03-29 12:29:38 UTC

Description Opher Shachar 2008-09-02 14:19:00 UTC
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 12:47:27 UTC
Reverted due to incorrect handling of CGI output that is not line-based (STR #3194).

Comment 4 Tim Waugh 2009-06-01 15:12:43 UTC
This has now had a fix checked in upstream (untested here).

Comment 10 errata-xmlrpc 2010-03-30 08:14:53 UTC
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.