amw_drizz Posted January 7, 2006 Posted January 7, 2006 okay i have a few problems with my script i am creating to help in tracking donations. The problem is when users try to register they get the following error >Warning: main(): open_basedir restriction in effect. File(/config/config.php) is not within the allowed path(s): (/home/username:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/donations/scripts/forms/purchase_info_final.php on line 2 Warning: main(/config/config.php): failed to open stream: Operation not permitted in /home/username/public_html/donations/scripts/forms/purchase_info_final.php on line 2 Fatal error: main(): Failed opening required '/config/config.php' (include_path='.:/usr/local/lib/php:/usr/lib/php') in /home/username/public_html/donations/scripts/forms/purchase_info_final.php on line 2 the problem is that my general config for the entire script resides in one folder and cannot be access by the script. If i have it like >require_once("config/config.php"); then i trys and goes to the folder within were that script is located but when i try to use the general fall back to root web method it does not work >require_once("/config/config.php"); i get the error above, and i dont want to move the config file as when i decide to publish it and make it avalible to the general popualtion i dont want to edit multiple config files across the site with the same info any help would be appreciated thanks Quote
TCH-Andy Posted January 7, 2006 Posted January 7, 2006 You do not have permission to access /config/config.php on the server. You should use /home/username/public_html/config/config.php as the full path. where username is your cpanel username. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.