Click to See Complete Forum and Search --> : Script Error displaying unknown errors


william232
07-11-2006, 07:22 AM
hi,all

I have uploaded my custom script i have made it came up with these errors i have no clue what they mean but how can i fix this?


Warning: Unknown(): open_basedir restriction in effect. File(/home/william/public_html/demos/cms/index.php) is not within the allowed path(s): (/home/guru/:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/william/public_html/demos/cms/index.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: Unknown(): open_basedir restriction in effect. File(/home/william/public_html/demos/cms/index.php) is not within the allowed path(s): (/home/guru/:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/william/public_html/demos/cms/index.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening '/home/william/public_html/demos/cms/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0

NogDog
07-11-2006, 10:41 AM
It means that a directory has been specified for the open_basedir setting in your php.ini configuration file. PHP will therefore not allow you to open files which are not in that directory or one of its sub-directories.

bokeh
07-11-2006, 11:25 AM
The master value is stored in php.ini but the value that refers to your individual site on a shared server would be declared in the virtual host (not that it matters). Anyway it is unlikely you would be permitted to FTP a file to a directory on your webspace that PHP cannot access which leads me to believe you are using an incorrect path for the files you are trying to open.

william232
07-11-2006, 09:53 PM
How can i fix this?

NogDog
07-11-2006, 10:18 PM
Either change the php.ini file if you are allowed to, or else make sure any files you want to open from within your script are in one of the listed directories (or their sub-directories):

/home/guru/ or /usr/lib/php or /usr/local/lib/php or /tmp

william232
07-12-2006, 12:35 AM
will that work on shared hosting?

NogDog
07-12-2006, 01:50 PM
will that work on shared hosting?
I can't say for sure (only your web host admins could -- assuming they know what they're doing).