Current time: 06-25-2022, 08:23 AM Hello There, Guest! (LoginRegister)


Thread Closed 
PHP bugged
Author Message
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #1
PHP bugged
I receive:
Code:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/hosting-zone.eu/other-sites/support.hosting-zone.eu/htdocs/livechat/super/phplive.txt) is not within the allowed path(s): (/var/www/virtual/hosting-zone.eu/:/usr/share/php/) in /var/www/virtual/hosting-zone.eu/other-sites/support.hosting-zone.eu/htdocs/livechat/setup/index.php on line 311

Any ideas how to fix it?
01-24-2009 09:24 PM
Find all posts by this user
kurgans Offline
Moderator
*****
Moderators

Posts: 1,565
Joined: Feb 2008
Reputation: 23
Post: #2
RE: PHP bugged
hello

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


open_basedir = "/ var / www / virtual / zone.eu-hosting /: / usr / share / php: / www / hosting-zone.eu / other-sites / support.hosting-zone.eu / htdocs / livechat / setup "

Restar apache
(This post was last modified: 01-24-2009 09:56 PM by kurgans.)
01-24-2009 09:31 PM
Visit this user's website Find all posts by this user
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #3
RE: PHP bugged
No effect!
01-25-2009 12:36 AM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #4
RE: PHP bugged
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...)

/J
01-25-2009 04:35 AM
Visit this user's website Find all posts by this user
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #5
RE: PHP bugged
Yes, I noticed that. Now I will try to compile a new php.
01-25-2009 08:53 PM
Find all posts by this user
Mastacheata Offline
Junior Member
*

Posts: 86
Joined: Oct 2008
Reputation: 2
Post: #6
RE: PHP bugged
Personally I think you did something wrong in your php script.
The path you are trying to open is /var/www/hosting-zone.eu/... and the script is working in /var/www/virtual/hosting-zone.eu/...
Of course its possible that this was done with intent and then you'll have to add /var/www/hosting-zone.eu/... 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.
01-27-2009 09:48 AM
Find all posts by this user
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #7
RE: PHP bugged
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.
01-28-2009 06:08 AM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #8
RE: PHP bugged
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/hosting-zone.eu/... and not /var/www/virtual/hosting-zone.eu/...

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

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

Cheers
J
01-28-2009 07:35 AM
Visit this user's website Find all posts by this user
kurgans Offline
Moderator
*****
Moderators

Posts: 1,565
Joined: Feb 2008
Reputation: 23
Post: #9
RE: PHP bugged
Hey Joximu

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

Very good care
01-28-2009 07:46 PM
Visit this user's website Find all posts by this user
ceco91 Offline
Moderator
*****
Moderators

Posts: 95
Joined: Jan 2009
Reputation: 0
Post: #10
RE: PHP bugged
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:
Code:
open_basedir = "/var/www/virtual/hosting-zone.eu/:/usr/share/php/:/var/www/virtual/hosting-zone.eu/other-sites/support.hosting-zone.eu/htdocs/livechat/setup"
Apache's config says:
Code:
<IfModule mod_php5.c>
        php_admin_value open_basedir "/var/www/virtual/hosting-zone.eu/:/var/www/virtual/hosting-zone.eu/phptmp/:/usr/share/php/"
        php_admin_value upload_tmp_dir "/var/www/virtual/hosting-zone.eu/phptmp/"
        php_admin_value session.save_path "/var/www/virtual/hosting-zone.eu/phptmp/"
        php_admin_value sendmail_path '/usr/sbin/sendmail -f vu2007 -t -i'
    </IfModule>
(This post was last modified: 01-29-2009 08:30 AM by ceco91.)
01-29-2009 08:28 AM
Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)