Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th April 2013, 20:21
5t3f4n 5t3f4n is offline
Junior Member
 
Join Date: Apr 2013
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 7th April 2013, 20:29
8omas 8omas is offline
Senior Member
 
Join Date: Jan 2011
Posts: 148
Thanks: 16
Thanked 35 Times in 26 Posts
Default

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>
Reply With Quote
  #3  
Old 7th April 2013, 21:28
5t3f4n 5t3f4n is offline
Junior Member
 
Join Date: Apr 2013
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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?
__________________
-- trying hard as a webserver admin
Reply With Quote
  #4  
Old 8th April 2013, 00:46
8omas 8omas is offline
Senior Member
 
Join Date: Jan 2011
Posts: 148
Thanks: 16
Thanked 35 Times in 26 Posts
Default

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.
Reply With Quote
  #5  
Old 8th April 2013, 10:12
5t3f4n 5t3f4n is offline
Junior Member
 
Join Date: Apr 2013
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default

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>
__________________
-- trying hard as a webserver admin
Reply With Quote
  #6  
Old 8th April 2013, 13:16
8omas 8omas is offline
Senior Member
 
Join Date: Jan 2011
Posts: 148
Thanks: 16
Thanked 35 Times in 26 Posts
Default

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
Reply With Quote
The Following 2 Users Say Thank You to 8omas For This Useful Post:
5t3f4n (9th April 2013), ginner159 (4th November 2013)
  #7  
Old 9th April 2013, 00:10
5t3f4n 5t3f4n is offline
Junior Member
 
Join Date: Apr 2013
Posts: 13
Thanks: 2
Thanked 0 Times in 0 Posts
Default

thx 8omas, spot on - running again!
__________________
-- trying hard as a webserver admin
Reply With Quote
  #8  
Old 4th November 2013, 03:04
ginner159 ginner159 is offline
HowtoForge Supporter
 
Join Date: May 2013
Location: Silsden, UK
Posts: 112
Thanks: 29
Thanked 6 Times in 6 Posts
 
Cool Thanks alot!

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

Bookmarks

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
open_basedir restriction in effect. File() is not within the allowed path(s) MrCompTech General 15 29th January 2012 20:02
open_basedir restriction in effect abintipl General 3 27th December 2011 21:03
Quota Exceeded errors IKShadow Installation/Configuration 14 20th January 2011 17:39
Blank phpmyadmin url jonaskellens Installation/Configuration 1 28th December 2009 14:34
phpMyAdmin installation fails due to open_basedir restriction kidalabama Installation/Configuration 2 28th September 2009 12:25


All times are GMT +2. The time now is 08:58.


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