cgi.fix_pathinfo not working on php 5.3.x

Bug #487395 reported by Ramdhani Fathurrohman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PHP-FPM
New
Undecided
Unassigned
Nominated for Master by Joris van de Sande

Bug Description

Recently I decide to upgrade my php on server from 5.2.11 to 5.3.1

on my experience on integrating php-fpm 0.6 and found no problem with
php 5.2 then i compile the php 5.3

everything when smooth and fine... the configure, compile and install
of both php 5.3 and php-fm 0.6

start the php-fpm with no problem...

but when the script encounter pathinfo (pretty url) it throws error...

"No input file specified."

this doesn't happen on php 5.2 php-fpm.

I try to figure out over and over again until i found that
cgi.fix_pathinfo not working on php-fpm on php 5.3

How i manage to know is that when I look into phpinfo() the
cgi.fix_pathinfo shows on php 5.2 but it doesn't show on php 5.3

but if i run php-cgi 5.3 without php-fpm manually it shows and
pathinfo working just fine.

running version:
php: 2.5.11
php-fpm: 0.6-5.2.11

problem version:
php: 5.3.1
php-fpm: 0.6-5.3.1

Revision history for this message
Michael Shadle (mshadle) wrote :

According to dreamcat, I believe this is an open issue that he was worried about and it is a -true- and known issue.

As far as fixing it, not sure what can be done there. The current PHP-FPM code is basically a copy of cgi_main.c from a point in time a few months ago and it has apparently changed since then.

Revision history for this message
Joris van de Sande (jorisvandesande) wrote :

I am experiencing the same problem with PHP 5.3.1 and php-fpm 0.6-5.3.1. I used to run PHP 5.3.0 with php-fpm php-5.3.0-fpm-0.5.12-rc . And if I switch back to this version everything works like a charm.

I use the following workaround for my PHP sites to function correctly:

1. Set a auto prepend file in php.ini:
    auto_prepend_file = /some/path/php-fpm-5.3.1-fix.php

2. Create the file /some/path/php-fpm-5.3.1-fix.php with the following contents:
<?php
        $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];

3. Restart php-fpm

It's not a perfect solution, because auto_prepend_file might be overwritten in .htaccess or .user.ini files, but it works for me.

Revision history for this message
Ramdhani Fathurrohman (kontak) wrote :

I've running the integrated php-fpm from svn branch of php_5_3_fpm since the very beginning with no problem whatsoever.

Is it feasible for the php-fpm svn branch php_5_3_fpm to be backported into single patch here?

thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.