Page 1 of 1

Path Issue

Posted: Sun Sep 16, 2007 4:25 pm
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/.

Re: Path Issue

Posted: Sun Sep 16, 2007 4:33 pm
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

Good Question

Posted: Sun Sep 16, 2007 5:16 pm
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

Re: Good Question

Posted: Sun Sep 16, 2007 7:50 pm
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

Posted: Mon Sep 17, 2007 2:39 pm
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