View Full Version : Mod-PHP setting prevents access to phpMyAdmin
vondie
21st October 2009, 16:45
I am creating my first site under ISPConfig 3.0.1.6 and I have run into a problem. Creating the site works as expected. When I select the Mod-PHP option for PHP, access to phpMyAdmin and webmail quits. Curiously, there is no error message displayed, just a blank page. If I disable PHP, access to both sites returns. I have Tomcat installed and I believe running properly.
Ben
21st October 2009, 17:25
Did you check the apache logs as the php.ini may contain to not display errors and rather write them to a logfile.
vondie
21st October 2009, 17:28
I am trying to do just that, but being new to Linux, I'm not entirely sure which logs to check...httpd or ispconfig or ???. So far, I haven't found a clue...but I'm still looking.
Ben
21st October 2009, 17:44
the httpd logs. But as I do not use ispcfg3, yet, I can not tell you if they are placed in the standard location /var/log/httpd or /var/log/apache2 and splitted by vhost in any way.
Besides this you can search for php.ini files to see how the display and log error variables are set.
vondie
21st October 2009, 17:58
To keep things simple, I edited the php.ini file to show errors instead of logging them...for this debug session that is. The error is:
Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s): (/var/www/clients/client0/web2/web:/var/www/clients/client0/web2/tmp:/usr/share/php5) in Unknown on line 0
Fatal error: Can't load /usr/share/phpmyadmin/index.php, open_basedir restriction. in Unknown on line 0
vondie
21st October 2009, 18:25
This is the same issue here:
http://www.howtoforge.com/forums/showthread.php?p=207016
Still trying to get it solved on my end though.
till
22nd October 2009, 14:00
You can not access files outside the website for security reasons. Thats why I recommend to create a new website just for phpmyadmin and install phpmyadmin inside the website instead of using the phpmyadmin of the linux distribution.
If you really want to use the phpmyadmin from the linux distribution and you are aware of the possible problems when opening directory for sahred access to all of your clients, then edit the file
/usr/local/ispconfig/server/conf/vhost.conf.master
and replace the line:
php_admin_value open_basedir <tmpl_var name='document_root'>/web:<tmpl_var name='document_root'>/tmp:/usr/share/php5
with:
php_admin_value open_basedir <tmpl_var name='document_root'>/web:<tmpl_var name='document_root'>/tmp:/usr/share/php5:/usr/share/phpmyadmin
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.