[cups.bugs] [LOW] STR #2440: PHP and Perl scripts fail

twaugh.redhat twaugh at redhat.com
Wed Jul 11 09:39:15 PDT 2007


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

PHP scripts invoked via the web interface do not execute correct.  The same
occurs for Perl scripts.

Steps:
1. Update /etc/cups/cgi.types to be:
application/x-httpd-cgi cgi
application/x-httpd-php php
application/x-httpd-perl pl

2. service cups reload

3. Copy test1.php and test2.cgi to /usr/share/cups/doc/ (these files are
available from the tarball in the original bug report -- see below)

4. Do: chmod +x test2.cgi

5. Navigate to: http://localhost:631/test2.cgi
   All OK.

6. Navigate to: http://localhost:631/test1.php
   Client (firefox) hangs... bad :(

The debug2 error log shows that argv[0] is set correctly (to /usr/bin/php)
but that argv[1] does not get set.  It should get set to the script path.

Instead, PATH_INFO is getting set to the script path -- the original bug
reporter suggests that this is incorrect anyway.

Original bug report:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=247796

Link: http://www.cups.org/str.php?L2440
Version: 1.2.10





More information about the cups mailing list