Click to See Complete Forum and Search --> : I have problemwith PHP


amorous_man
07-17-2007, 04:40 AM
Hi all, I have a problem with my project php. please help me.
this is the problems
"
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib/php/Zend/Config/Xml.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php on line 193

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib/php/Zend/Controller/Action.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php on line 193

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib/php/Zend/Controller/Front.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php on line 193

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib/php/Zend/View.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php on line 193

Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/lib/php/Zend/Filter/Input.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/') in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php on line 193
"

review at: http://exchange.centimet2.com/lxd/public
Thank you so much.

\\.\
07-17-2007, 10:26 AM
your script may be missing a functionFatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message '"function.is-rea" controller does not exist' in /home/centi5/public_html/exchange/lxd/library/Zend/Zend.php:229....
All line errors seem to point to is-readable, are you sure its not is_readable???

NogDog
07-17-2007, 01:32 PM
The problem is that you are working in a PHP configuration which has an open_basedir (http://us2.php.net/manual/en/features.safe-mode.php#ini.open-basedir) restriction in effect. This means that you can only access files from your PHP scripts which are within the directories specified in the open_basedir setting (or their sub-directories).

sitehatchery
07-17-2007, 03:16 PM
Here is the path you are using:
.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/nfs/home:/usr/home:/usr/local/bin/

Looks like a problem to me.

amorous_man
07-20-2007, 05:06 AM
I can find my error. because the script have done as well as in my local (window, apache). but not run itin host (linux).
anyone can help me?

NogDog
07-20-2007, 10:50 PM
See my first reply, follow the link I provided, and read carefully. As long as that open_basedir configuration setting is in effect, any files that you try to access will only be accessible if they are within one of the directories or their sub-directories specified in the open_basedir setting. That setting can only be changed or disabled by someone with sufficient privileges to modify the php.ini file or http.conf file on the server. If you cannot get it changed, then you will need to copy the files you need to access to a directory which is accessible by your script.

amorous_man
08-06-2007, 12:17 AM
Thanks you for your reponse. But I can't still fix my bug. please show me detail way to fix.
Thanks.:mad:

kvirri
08-06-2007, 05:44 AM
access a path only under basedir. modify the path at line 193 to point under basedir.
we can't really help you with a fix if you don't provide any code.

MykeXero
08-06-2007, 12:20 PM
if its your own server you can do the insecure route and disable open_basedir.... but as everyone else is saying here, you can only access specific directories allowed under open_basedir ....

amorous_man
08-11-2007, 10:13 PM
I want to know the way to fix it. But I know the problem.

NogDog
08-12-2007, 01:17 AM
OK, this is my last try.

You cannot bypass the open_basedir restriction by anything you can do in your script. You must either:

(a) Have the system administrator change the open_basedir setting and add the directory where the files you are trying to reference are located (/usr/lib/php/Zend/), or...

(b) Have the system administrator completely remove the open_basedir restriction, or...

(c) Copy all of the necessary files from the current Zend directory into a directory within one of the "allowed paths" directories listed in the error messages, then call them from that new location.