#1  
Old 9th November 2005, 20:28
PsyVision PsyVision is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default PHP/MySQL Issues

Hey Guys,

I've got a server up and running fine and i've been going through all of the parts testing it, mail works, ftp now works, mysql works okay.

However, PHP/MySQL integration produces these errors (they may be strictly PHP but the files should also access MySQL):

Code:
Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear/config.php) is not within the allowed path(s): (/home/www/web1/) in /home/www/web1/web/scripts/database.php on line 3

Warning: main(config.php) [function.main]: failed to open stream: Operation not permitted in /home/www/web1/web/scripts/database.php on line 3

Fatal error: main() [function.require]: Failed opening required 'config.php' (include_path='.:/usr/share/pear') in /home/www/web1/web/scripts/database.php on line 3
The script database.php on line 3 does:

Code:
require('config.php');
The code in config.php just sets some variables, nothing fancy.

This has worked fine on my current web host that I use, I presume I need to wort out some open_basedir restrictions. How do I do this?

Cheers
Reply With Quote
Sponsored Links
  #2  
Old 9th November 2005, 20:37
PsyVision PsyVision is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay so changing my line of code to:

Code:
require('./scripts/config.php');
Makes it work, albeit with the erros below:

Code:
Notice: Undefined index: output in /home/www/web1/web/index.php on line 5

Notice: Use of undefined constant select - assumed 'select' in /home/www/web1/web/scripts/database.php on line 29
I presuming I have some PHP security/error/warning settings too high or something?

On my previous host using the just config.php instead of ./scripts/config.php works fine. Is there some setting that allows me to set a default "base" directory? I'm thinking i need to play with my PHP options...
Reply With Quote
  #3  
Old 9th November 2005, 20:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

I guess you have enabled PHP Safe Mode for that web site. Disable it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 9th November 2005, 20:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,609 Times in 4,420 Posts
Default

Quote:
Originally Posted by PsyVision
I presuming I have some PHP security/error/warning settings too high or something?
Yes, set a higher warning level in you php.ini.
Reply With Quote
  #5  
Old 9th November 2005, 21:36
PsyVision PsyVision is offline
Junior Member
 
Join Date: Nov 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Cheers guys.

I've turned on debug messages as PHP wasn't showing anything before.

I'll adjust the default warning level too. and see what happens.
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
This forum is for general Linux installation/configuration issues, not for ISPConfig! falko Installation/Configuration 29 24th March 2014 16:55
Web Issues - Access Forbidden! rytech Installation/Configuration 23 22nd June 2006 16:25
Several minor issues dahljh Installation/Configuration 2 30th October 2005 23:22
Domain issues mphayesuk General 11 14th September 2005 18:24
Log file issues Zoon Installation/Configuration 3 4th September 2005 12:55


All times are GMT +2. The time now is 02:27.


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