Path Issue

Having trouble installing serendipity?
Post Reply
chadi
Regular
Posts: 24
Joined: Sun Sep 16, 2007 4:22 pm

Path Issue

Post by chadi »

what do I edit to fix...

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/html/serendipity/serendipity_config_local.inc.php) is not within the allowed path(s): (/home/vhosts/:/usr/lib/php:/usr/local/lib/php/:/tmp/:/usr/local/xpanel/phpmyadmin/:/usr/local/xpanel/plugins/:/usr/local/xpanel/traffic_exceed/:/var/www/xpanel/public_html/) in /home/vhosts/islamaugme.bzhost.net/public_html/serendipity/serendipity_config.inc.php on line 221

It looks like it wants access to "/var/www/html/" folder, my site is located at "/home/vhosts/", and this path has proper permissions. My site root is /home/vhosts/islamaugme.bzhost.net/public_html/.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Path Issue

Post by garvinhicking »

Hi!

Are you working with symbolic links? Where does the /var/www come from, is it your DOCUMENT_ROOT?

In either case, s9y is instructed to look for it, most probably because it tries to open a file in dirname(__FILE__) or in $_SERVER['DOCUMENT_ROOT']. You'll need to ask your provider to either fixup the document-root/symlinking, or to make the open_basedir includepath also include /var/www/html/serendipity.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
chadi
Regular
Posts: 24
Joined: Sun Sep 16, 2007 4:22 pm

Good Question

Post by chadi »

I was hoping you could tell me, according to my provider they asked what /var/www was too? I thought perhaps is was serendipity trying to identify proper paths????

Whatever the case beyond the error I posted I am not able to to do anything from the admin page which I think is related. Beyond the simlinking thing, should I be able to hard code something to fix this?

Thanks
Chadi
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Good Question

Post by garvinhicking »

Hi!

Serendipity contains no hardcoded paths, so /var/www comes from a config option of your provider.

Create a simple test.php script with <?php phpinfo(); ?> in it and search the output for "/var/www" to see where it occurs.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
chadi
Regular
Posts: 24
Joined: Sun Sep 16, 2007 4:22 pm

Post by chadi »

Ok, what I have done to fix this issue (there may be other ways?)

is to Replace Line 221
$_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php'
with
'/home/vhosts/'mysite.myhost'/public_html/serendipity/serendipity_config_local.inc.php'

Now Serenity is living on a subdomain.

Thanks
Chadi
Post Reply