Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th November 2011, 04:20
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default PHP open_basedir and phpMyAdmin

Hi,

I haven't been able to access phpMyAdmin through ISPConfig 3 or by URL since updating to 3.0.4. Each time I got a new error, I would resolve, then finally got to one that I couldn't seem to get. I Googled this a lot, and didn't (and still don't want to) disable PHP open_basedir in ISPConfig by clearing the entire file paths in the PHP open_basedir field and replacing with "none", then save. It works.

My understanding is that this is a big security risk. While I certainly don't want that, I have to be able to access the dbs.

Any help would be great.
Reply With Quote
Sponsored Links
  #2  
Old 13th November 2011, 17:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Just add the path to phpmyadmin to the openbasedir path separated by : in all existing websites.

You can also set the default for new websites under system > server config > web
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 13th November 2011, 18:01
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Hi Till,

Remember we already tried this. All the paths were there, which is where I get the error, like this in each site:

open_basedir restriction in effect. File(/usr/share/phpMyAdmin/libraries/common.inc.php) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/example.com/web:/srv/www/example.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /usr/share/phpMyAdmin/index.php on line 33

Was always like this with no problems with ISPC 3.0.3.3

Only way to access phpMyAdmin was to empty the PHP openbasedir in ISPConfig and insert "none", then save. Now I can access phpMyAdmin just fine, only concerned about security now.
Reply With Quote
  #4  
Old 13th November 2011, 18:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

As you see in the above error message (which lists the paths that you entered in the open basedir field) you had not added the new path to phpmyadmin there. And remeber that we are on a unix based os here, so upper / lower case in paths makes a difference. Adding the path works for everyone else and it works on my server as well, so it will work on your server too.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 13th November 2011, 18:54
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

I guess I just don't get the big picture or something. All of the paths to phpMyAdmin are in that list. So I don't what other path to phpMyAdmin to add. I hope that makes sense. Those paths in the error message were also EXACT matches to the paths listed in ISPConfig - the ones that I had to clear out to get access to phpMyAdmin. So what is the new path? What path am I missing?

Thanks
Reply With Quote
  #6  
Old 13th November 2011, 19:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Quote:
Originally Posted by midcarolina View Post
I guess I just don't get the big picture or something. All of the paths to phpMyAdmin are in that list. So I don't what other path to phpMyAdmin to add. I hope that makes sense. Those paths in the error message were also EXACT matches to the paths listed in ISPConfig - the ones that I had to clear out to get access to phpMyAdmin. So what is the new path? What path am I missing?

Thanks
The path where phpmyadmin is installed is not in the list. PHPMyadmin is installed in the path /usr/share/phpMyAdmin and this path is not in the open basedir string.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 13th November 2011, 19:24
midcarolina midcarolina is offline
Senior Member
 
Join Date: Jul 2011
Posts: 254
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Here is the PHP open basedir string on all three servers in System >> Server Config >> Web and also what is then converted into all websites as well:

[website_path]/web:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/tmp:/usr/share/phpMyAdmin:/etc/phpMyAdmin:/var/lib/phpMyAdmin

Note that /usr/share/phpMyAdmin is right behind /usr/share/php5: (This is a direct copy / paste from ISPConfig 3.0.4

Removing this string in each website and placing none in the field is the only way I can access phpMyAdmin through ISP or URL
Reply With Quote
  #8  
Old 13th November 2011, 19:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
 
Default

Read my post above in which TWO places you should add the string (System Server Config AND in all existing websites)! You prooved already with the above error message in #3 that you havent set it in the website as I told you. If you dont follow instructions closely, it will never work.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
open basedir

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


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


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