Welcome! Log In Create A New Profile

Advanced

PHP path not correct in phpMyAdmin (cgi.fix_pathinfo)

Posted by Anonymous User 
Anonymous User
PHP path not correct in phpMyAdmin (cgi.fix_pathinfo)
September 24, 2012 11:22PM
Howdy,

I am having a path problem with php-fpm and nginx.I installed phpMyAdmin, but when I try and login, the path get's set incorrectly. For example the url is:

http://web1.mydomain.com/phpMyAdmin/

That works, it loads the login page, but when I click login, the path gets set incorrectly to:

http://web1.mydomain.com/index.php?token= gUTHUPhezetratRaRuBatheyuphac4pA

If I toggle the php setting `cgi.fix_pathinfo` to 1, then the path is right in phpMyAdmin and phpMyAdmin works, but this breaks other PHP applications on the server. So, I set `cgi.fix_pathinfo` back to 0, which is better for security anyway.

Any idea how I can fix this so phpMyAdmin works, but also does not break other PHP applications?

Thanks.
Re: PHP path not correct in phpMyAdmin (cgi.fix_pathinfo)
September 25, 2012 06:22AM
You should NOT use cgi.fix_pathinfo=1 due to security reasons, unless you absolutely sure that your nginx.conf rules will prohibit execution of non existant files such as guest uploaded mycoolavatar.gif/hack.php , where mycoolavatar.gif may contain PHP code which will be executed by php.

As for PHPMyAdmin - i dont use any special config for it for nginx+php-fpm, it just works outta tha box )
Anonymous User
Re: PHP path not correct in phpMyAdmin (cgi.fix_pathinfo)
September 25, 2012 07:44PM
Interesting. Here is my nginx config, do you see anything that would be causing the problem?

http://pastie.org/4800559

The root is set at /srv/www but the path to phpMyAdmin is /srv/www/phpMyAdmin I do this because there are other utility apps served from /srv/www.

Thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 156
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready