Re: Resolving a warning

From: Date: Thu, 17 Jun 2004 00:55:00 +0000
Subject: Re: Resolving a warning
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188454@lists.php.net to get a copy of this message
Ryan Schefke wrote --- napísal::
Hi All, I've built my own shopping cart and use a library supplied by USAePay. The library is accessed via an include statement in my code. Because of theirs a desire to keep this library outside of my public web file directory USAePay recommended using: include "/usr/local/lib/php/usaepay.php"; I put the file "usaepay.php" in that directory (using a dedicated linux box with root access) and run my script with the above include. I get the following: Warning: main(): open_basedir restriction in effect. File(/usr/local/lib/php/usaepay.php) is not within the allowed path(s): (/home/httpd/vhosts/tgwedding.com/httpdocs:/tmp) in /home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/payment7.php on line 11 How can I resolve this?
The library must be either under /home/httpd/vhosts/tgwedding.com/httpdocs or /tmp. /tmp is out of question, so the only directory left is your docroot. But as you are saing you are root on the server, you can change open_basedir setting to /home/httpd/vhosts/tgwedding.com:/tmp and put the library to /home/httpd/vhosts/tgwedding.com/usepay/ directory.

« previous php.general (#188454) next »