Re: Resolving a warning
| From: | Curt Zirzow | Date: | Thu, 17 Jun 2004 00:59:58 +0000 |
| Subject: | Re: Resolving a warning | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188452@lists.php.net to get a copy of this message | ||
* Thus wrote Ryan Schefke (ryan@triomfgroup.com):
>
> 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";
Actually you're better off not hard coding that path. A simple
include "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
Two things:
1. which is probably already set, is to make sure your include_path
has /usr/local/lib/php in listed in it as the first item.
2. add to open_basedir: /usr/local/lib/php
You'll be all set.
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!