HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   phpmyadmin blank & open_basedir restriction in effect (http://www.howtoforge.com/forums/showthread.php?t=61333)

5t3f4n 7th April 2013 19:21

phpmyadmin blank & open_basedir restriction in effect
 
hi,

can't access phpmyadmin anymore - openening the URL https://123.4.567.891:50443/phpmyadmin/ returns blank page. open_basedir entries in ISPConfig haven't been changed either.

apache error log outputs:

PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s): (/usr/share/php:/usr/l$
PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
PHP Fatal error: Unknown: Failed opening required '/usr/share/phpmyadmin/index.php' (include_path='.') in Unknown on line 0

was reading lot of forum posts here but nothing has helped to resolve.

anyone any ideas?

thx

8omas 7th April 2013 19:29

The problem is the same as with round cube. Search the forum.

try pasting something like this at the end of /etc/phpmyadmin/apache.conf

Code:

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_admin_flag allow_url_fopen Off
php_value include_path .:/usr/share/php:/usr/share/pear
php_admin_value upload_tmp_dir /tmp
php_admin_value open_basedir /usr/share/php:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp
php_flag register_globals off
</IfModule>


5t3f4n 7th April 2013 20:28

thx 8omas, but didn't do the trick.

error.log shows same message and phpymyadmin returns blank page.

i checked with different alias as well as suggested here (http://www.howtoforge.com/extending-...ispconfig-3-p3)

anything else i can test?

8omas 7th April 2013 23:46

please post the phpmyadmin.conf file
p.s.
Keeep in mind that the tutorial you read is old and is not recommened for ISPConfig v 3.0.5.and above. You have to be vary careful with backup, firewall and redirections.

5t3f4n 8th April 2013 09:12

good morning,
this is from /etc/apache2/conf.d/phpmyadmin.conf

Code:

# phpMyAdmin default Apache configuration

Alias /dbmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
        </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>

<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location /dbmyadmin>
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI}  [L]
    </Location>
  </IfModule>
</IfModule>

<IfModule mod_php5.c>
        AddType application/x-httpd-php .php
        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_admin_flag allow_url_fopen Off
        php_value include_path .:/usr/share/php:/usr/share/pear
        php_admin_value upload_tmp_dir /tmp
        php_admin_value open_basedir /usr/share/php:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp
        php_flag register_globals off
</IfModule>


8omas 8th April 2013 12:16

Try replacing <IfModue mod_php5.c> (IN the <Directory /usr/share/phpmyadmin> </Directory>) with this

Code:

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
                php_admin_flag allow_url_fopen Off
                php_admin_value upload_tmp_dir /tmp
                php_value include_path .:/usr/share/php:/usr/share/pear
                php_admin_value open_basedir /usr/share/php:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp
        </IfModule>


so as the result will be sth like this
Code:

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
                php_admin_flag allow_url_fopen Off
                php_admin_value upload_tmp_dir /tmp
                php_value include_path .:/usr/share/php:/usr/share/pear
                php_admin_value open_basedir /usr/share/php:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp
        </IfModule>

</Directory>

Then restart - reload apache

5t3f4n 8th April 2013 23:10

thx 8omas, spot on - running again!

ginner159 4th November 2013 02:04

Thanks alot!
 
Thanks i was having this problem too after a php script for the api ran funny. no idea how it broke lol


All times are GMT +2. The time now is 13:05.

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