Help Openbase Dir Restriction

liunx

Guest
okay i have a few problems with my script i am creating to help in tracking donations.<br /><br /><br />The problem is when users try to register they get the following error<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->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<br /><br />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<br /><br />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<!--c2--></div><!--ec2--><br /><br />the problem is that my general config for the entire script resides in one folder and cannot be access by the script. <br /><br />If i have it like <br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->require_once("config/config.php");<!--c2--></div><!--ec2--><br /><br />then i trys and goes to the folder within were that script is located<br /><br />but when i try to use the general fall back to root web method it does not work<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->require_once("/config/config.php");<!--c2--></div><!--ec2--><br /><br />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<br /><br />any help would be appreciated<br /><br />thanks<!--content-->
You do not have permission to access /config/config.php on the server.<br /><br />You should use /home/username/public_html/config/config.php as the full path. where username is your cpanel username.<!--content-->
k<br /><br />thanks<!--content-->
 
Back
Top