Mod-PHP setting prevents access to phpMyAdmin

Discussion in 'Installation/Configuration' started by vondie, Oct 21, 2009.

  1. vondie

    vondie New Member

    I am creating my first site under ISPConfig 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.
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Did you check the apache logs as the php.ini may contain to not display errors and rather write them to a logfile.
  3. vondie

    vondie New Member

    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.
  4. Ben

    Ben ISPConfig Developer ISPConfig Developer

    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.
  5. vondie

    vondie New Member

    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
  6. vondie

    vondie New Member

    Last edited: Oct 21, 2009
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    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


    and replace the line:

    php_admin_value open_basedir <tmpl_var name='document_root'>/web:<tmpl_var name='document_root'>/tmp:/usr/share/php5

    php_admin_value open_basedir <tmpl_var name='document_root'>/web:<tmpl_var name='document_root'>/tmp:/usr/share/php5:/usr/share/phpmyadmin

Share This Page