ispCP - Board - Support
PHP bugged - Printable Version

+- ispCP - Board - Support (
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: PHP bugged (/thread-5524.html)

Pages: 1 2

PHP bugged - ceco91 - 01-24-2009 09:24 PM

I receive:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/ is not within the allowed path(s): (/var/www/virtual/ in /var/www/virtual/ on line 311

Any ideas how to fix it?

RE: PHP bugged - kurgans - 01-24-2009 09:31 PM


Add the path in your php.ini (domain no master) openbasedir

open_basedir = "/ var / www / virtual / /: / usr / share / php: / www / / other-sites / / htdocs / livechat / setup "

Restar apache

RE: PHP bugged - ceco91 - 01-25-2009 12:36 AM

No effect!

RE: PHP bugged - joximu - 01-25-2009 04:35 AM

btw: the to be included path should already be "opened" - it's a subfolder....

looks like php bug or other problem (symlink, length of path, i dont's know...)


RE: PHP bugged - ceco91 - 01-25-2009 08:53 PM

Yes, I noticed that. Now I will try to compile a new php.

RE: PHP bugged - Mastacheata - 01-27-2009 09:48 AM

Personally I think you did something wrong in your php script.
The path you are trying to open is /var/www/ and the script is working in /var/www/virtual/
Of course its possible that this was done with intent and then you'll have to add /var/www/ to your open_basedir path.
In case this wasn't your intent you should check with your script and or symlinks etc.
Maybe you just added one parent folder (..) too much to the file_exists() parameter.

RE: PHP bugged - ceco91 - 01-28-2009 06:08 AM

The php script is writing properly. It writes in sub-folder. I think PHP is bugged but I cant compile new one because I have installed libiconv and there is a 3-year-old bug with php installation.

RE: PHP bugged - joximu - 01-28-2009 07:35 AM

Hi ceco91

I nevertheless think Mastacheata is right. I also did not see the difference :-)

the file which has to be accessed is (or is supposed to be) in /var/www/ and not /var/www/virtual/

there's a missing "virtual/" in the path...

That's why the file is not accessible - you'd had to "open_basedir" /var/www/


RE: PHP bugged - kurgans - 01-28-2009 07:46 PM

Hey Joximu

that good view, marking the route I was thinking about my work structure.

Very good care

RE: PHP bugged - ceco91 - 01-29-2009 08:28 AM

All virtual hosts are in "/var/www/virtual". It's a default ispCP path.
'/virtual' missed but the problem still exists. I have fixed this, no change.
My php config says:
open_basedir = "/var/www/virtual/"
Apache's config says:
<IfModule mod_php5.c>
        php_admin_value open_basedir "/var/www/virtual/"
        php_admin_value upload_tmp_dir "/var/www/virtual/"
        php_admin_value session.save_path "/var/www/virtual/"
        php_admin_value sendmail_path '/usr/sbin/sendmail -f vu2007 -t -i'