Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 5th December 2011, 00:20
talkingnews talkingnews is offline
Join Date: Jan 2011
Posts: 67
Thanks: 15
Thanked 6 Times in 6 Posts
Default Problem with fastcgi_param PHP_SELF and php-fpm - partial fix here.

Ubuntu 11.10
Nginx 1.0.10
Zen Cart 1.3.9h - php cart software.

BIG problems with a login page - it just kept redirecting until it threw a "too many redirects" error.

Well, after 18 hours (no joke!) of going round and round in circles, with a little help from the developer of Zen Cart we spotted something:

For a script called, for example, phpinf0.php we get

_SERVER["PHP_SELF"] /phpinf0.php/phpinf0.php

which is clearly wrong and breaks certain scripts.

Finally, I ended up at


locojohn's server setup is different to mine, and I am using ISPConfig so I have worker pools for php-fpm, so this is what I did:

In /etc/nginx/fastcgi_params , comment out the line

fastcgi_param SCRIPT_NAME $fastcgi_script_name;

- that made Zen cart login work! But... it broke phpmyadmin.

So, my phpmyadmin block now looks like this

PHP Code:
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+.php)$ {
try_files $uri =404;
root /usr/share/;
include /
fastcgi_param SCRIPT_NAME $fastcgi_script_name# THIS is what needs adding
# .... rest of file etc 
I don't know of any way of "unsetting" a server var/param once it's been set, because obviously, it would be better to REMOVE it from the one place it's causing trouble with the old script and leave the master config untouched, rather than delete it from the master file and have to add it back to various other locations "just in case". Any ideas?

This is noted in php bugs at https://bugs.php.net/bug.php?id=55208 but nothing has really been done since 2011-07-17 and as they're discussing 5.3.6 and I'm on 5.3.8, I guess it hadn't been resolved. However, it HAS taken up my entire weekend, so I'll be putting some effort into waking the bug report up a bit!
Reply With Quote
Sponsored Links


fast-cgi, nginx, php-fpm, zen cart

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 07:57.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.