Subject: Warning: open_basedir restriction in effect

Posted on: 19/12/03 11:44am
By: Anonymous

Can someone help me with the error below?

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/casinoceo.com/httpdocs/admin/install/install.php on line 513

Fatal error: Failed opening required '/home/httpd/vhosts/casinoceo.com/system/classes/template.class.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/casinoceo.com/httpdocs/admin/install/install.php on line 513

Re:Warning: open_basedir restriction in effect

Posted on: 19/12/03 02:37pm
By: Dirk

Hmm, assuming you entered /home/httpd/vhosts/casinoceo.com/ as your "path to Geeklog", I can't see anything obviously wrong.

Geeklog usually works with the open_basedir restrictions in effect, as long as you've got your paths right.

Is it possible that your hosting service does not allow you to have files outside of the "httpdocs" directory?

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 31/12/03 11:42am
By: Anonymous

same error here did you ever solve it? all my paths look a okay???

e-smith

Warning: open_basedir restriction in effect. File is in wrong directory in /home/e-smith/files/ibays/Primary/html/admin/install/install.php on line 513

Fatal error: Failed opening required '/opt/geeklog-1.3.8-1sr3/system/classes/template.class.php' (include_path='.:/usr/share/php') in /home/e-smith/files/ibays/Primary/html/admin/install/install.php on line 513

Re:Warning: open_basedir restriction in effect

Posted on: 01/01/04 05:12am
By: Anonymous

reinstalled geeklog, still no joy-even put into seperate directory as i suspected cgi-bin, why does it have the bit
(include_path='.:/usr/share/php') in the error there is nothing at this location?

Warning: open_basedir restriction in effect. File is in wrong directory in /home/e-smith/files/ibays/geeklog/html/admin/install/install.php on line 513

Fatal error: Failed opening required '/opt/geeklog-1.3.8-1sr3/system/classes/template.class.php' (include_path='.:/usr/share/php') in /home/e-smith/files/ibays/geeklog/html/admin/install/install.php on line 513

Re:Warning: open_basedir restriction in effect

Posted on: 01/01/04 05:28am
By: Dirk

It looks like you entered "/opt/geeklog-1.3.8-1sr3" as your "path to Geeklog". Is that the correct path?

It looks like your webserver (or rather the open_basedir restriction in PHP) doesn't like that path, so you'll either have to put the files somewhere else of maybe there is another path to the same directory (e.g. through a symlink). I would assume that your webserver is configured such that it would prefer to have all files below /home/e-smith.

The "(include_path='.:/usr/share/php')" bit is only PHP telling you where else it looked for the file.

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 01/01/04 07:15am
By: Anonymous

that worked cheers,

Re:Warning: open_basedir restriction in effect

Posted on: 03/01/04 10:25pm
By: Anonymous

I got much the same error message.....

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/domains/config.php) is not within the allowed path(s): (/var/www/domains/rmdesign.com/) in /var/www/domains/rmdesign.com/myadminwas/install/install.php on line 80

The "public_html" folder is named "www" I am beginning to understand this must be a 'sym link' but I am still confused as to how to specify to a folder that is above. Obviously it isn't /var/www/domains/rmdesign.com/www/

So even after rtfm, this bbs and google, I still don't know how to point outside of the public space, which means both config.php and lib-common.php preferences are wrong. Hopefully that explains the error message above.

If having files outside there isnt allowed by the hosting co., is it acceptable from a security standpoint to move all geeklog files to within the public area, but then use htaccess to protect them? Any advice appreciated. thanks.

Re:Warning: open_basedir restriction in effect

Posted on: 04/01/04 04:40am
By: Dirk

[QUOTE BY= Robert] The "public_html" folder is named "www" I am beginning to understand this must be a 'sym link'[/QUOTE]
No need for a symlink. Usually, simply copying everything from Geeklog's public_html folder into your www directory and changing $_CONF['path_html'] to read
$_CONF['path_html'] = $_CONF['path'] . 'www/';
should have the desired effect.

[QUOTE BY= Robert] If having files outside there isnt allowed by the hosting co., is it acceptable from a security standpoint to move all geeklog files to within the public area, but then use htaccess to protect them? Any advice appreciated. thanks.[/QUOTE]
Having the files outside of the document root is always the better solution. For example, my hosting service accidentally disabled .htaccess files once, in which case such a directory would be world-readable again. Under normal circumstances, it should be safe, though.

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 07:05am
By: Anonymous

I am having similar problems. The error message:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/httpd/vhosts/mysite.com/config.php) is not within the allowed path(s): (/home/httpd/vhosts/mysite.com/httpdocs) in /home/httpd/vhosts/mysite.com/httpdocs/admin/install/install.php on line 80

My public_html folder is 'httpdocs' and this is where I placed all the geeklog public_html files. Changing $_CONF['path_html'] to $_CONF['path'] . 'httpdocs/'; didn't do anything. I am lost here. Any advice?

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 07:36am
By: Grotesnor

To add to my previous posting, my config.php is in a folder 'geekfiles' below 'httpdocs' because my provider doesn't allow me to create folders above it. I have tried different paths in config.php and lib-common.php but with no result sofar. These path issues are getting pretty confusing now.

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 08:07am
By: Dirk

Going by the error messages and the way you describe things, it looks like you should have
$_CONF['path'] = '/home/httpd/vhosts/mysite.com/httpdocs/geekfiles/';

$_CONF['path_html'] = '/home/httpd/vhosts/mysite.com/httpdocs/';

I.e. in this case, it's better to set the path_html variable as an absolute path directly.

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 09:34am
By: Grotesnor

Thanks for your quick reply. But unfortunately I haven't had any succes. I have tried different paths, in fact, I think I have tried every possible combination. I'm beginning to think my provider doesn't allow me to use paths in this way.

I'm confused as to which path the error message refers to. I've changed the path in lib-common.php and in config.php as well.

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 09:55am
By: Dirk

When you call up the install script (without doing anything) it will display a "hint" at the bottom of the page. Can you quote what it says there?

The error message you quoted above makes it pretty clear that the server is set up such that it expects everything to be below /home/httpd/vhosts/mysite.com/httpdocs, so if both the path and path_html variables start with this path, you should be fine.

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 11:09am
By: Grotesnor

The hint at the bottom of the page is:
/home/httpd/vhosts/mysite.com/httpdocs/admin/install/install.php.
The paths in my config.php and lib-common.php are respectively:
$_CONF['path'] = '/home/httpd/vhosts/mysite.com/httpdocs/geekfiles/'; (where my config.php file resides),
$_CONF['path_html'] = $_CONF['path'] . '/home/httpd/vhosts/mysite.com/httpdocs/'; (where my public_html files are) and
require_once( '/home/httpd/vhosts/mysite.com/httpdocs/geekfiles/config.php' );

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 01:54pm
By: Dirk

Your $_CONF['path'] looks fine, but you should leave out the $_CONF['path'] when setting the $_CONF['path_html'] (see my other post above).

bye, Dirk

Re:Warning: open_basedir restriction in effect

Posted on: 16/01/04 06:55pm
By: Grotesnor

You were right, my mistake. But I still get the same result. I'm almost ready to give up. Maybe this just isn't going to work. Thanks for your time anyway.

Re:Warning: open_basedir restriction in effect

Posted on: 17/01/04 04:19am
By: Dirk

[QUOTE BY= Grotesnor] But I still get the same result. I'm almost ready to give up. Maybe this just isn't going to work.[/QUOTE]
Hmm, that would be the first time that someone did not get Geeklog to work with open_basedir restrictions in effect. So I'd like to know why it doesn't work.

Have you tried contacting your hosting service? I'd send them the error message you get and ask them what a valid path should look like.

bye, Dirk

Warning: open_basedir restriction in effect

Posted on: 05/02/04 04:21pm
By: vadertech

nevermind

Warning: open_basedir restriction in effect

Posted on: 11/02/04 04:52pm
By: Anonymous

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/install.php on line 513

Fatal error: Failed opening required '/home/httpd/vhosts/mydomain.com/system/classes/template.class.php' (include_path='.:/usr/share/pear:/php/includes:/usr/share/php') in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/install.php on line 513


I am having the same issue and am really confused... I have been trying to install Geeklog for hours now. Please offer some advice!

Warning: open_basedir restriction in effect

Posted on: 11/02/04 05:10pm
By: Dirk

It looks like your hosting service doesn't want you to have files in the /home/httpd/vhosts/mydomain.com directory.

Often when open_basedir restrictions are in effect, it tells you where you are allowed to put files (as in the case of the poster above). However, in your case it doesn't do that, so I'd suggest asking your hosting service for advice.

If all else fails, you could put the files that normally reside outside of public_html into a password-protected folder inside of public_html, but the way you tried it is the preferred one.

bye, Dirk

Warning: open_basedir restriction in effect

Posted on: 11/02/04 05:45pm
By: Anonymous

Dirk... thank you for your fast response. I have contacted my host and the screwed with the PHP.ini file

1) Changed open_basedir = none to open_basedir = off
(that's how it was before.. do they have a clue?)

2) Affirmed that Safe Mode was off

Still getting the open_basedir error.

Also, on the check.php page, it's just loaded with errors like:
Parse error: parse error in /home/httpd/vhosts/mydomain.com/httpdocs/lib-common.php on line 4210

Warning: Use of undefined constant LB - assumed 'LB' in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/check.php on line 48
LB
Warning: Use of undefined constant LB - assumed 'LB' in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/check.php on line 49
LB


and


Testing logs directory ...
LBCould not open error.log and access.log
Warning: Use of undefined constant LB - assumed 'LB' in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/check.php on line 73
for writing.
Please check that you have set the logs directory and the files error.log and access.log in that directory to chmod 775.LB
Warning: Undefined variable: _CONF in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/check.php on line 74

Warning: Undefined variable: _CONF in /home/httpd/vhosts/mydomain.com/httpdocs/admin/install/check.php on line 75


Also, I did try the chmod 777 as detailed in the install doc.

Thanks for any advice, I really appreciate your time.

Mitch

Warning: open_basedir restriction in effect

Posted on: 11/02/04 11:01pm
By: Anonymous

Figured it out.... Had to edit the vhost.conf file for that domain. So it went something like this:

From Root
1)
cd /home/httpd/vhosts/mydomain.com/conf


2)
pico vhost.conf


3) Edit like this:

<Directory /home/httpd/vhosts/mydomain.com>
php_admin_value open_basedir "/home/httpd/vhosts/mydomain.com :/"
</Directory>


4) INSTALL CONF FILE
/usr/local/psa/admin/bin/my_apci_rst -v -u mydomain.com


5) RESTART APACHE
apachectl -k restart


Still having some issues however so this is not a complete solution but it has gotten me closer.

Let me know if you have any questions.

Best Regards,
Mitch
http://www.xpancom.com
mitchmoccia@xpancom.com

Warning: open_basedir restriction in effect

Posted on: 12/02/04 11:45pm
By: Anonymous

Uhhhhh Forget it all. Never worked... Switching to different script.

Warning: open_basedir restriction in effect

Posted on: 12/02/04 11:47pm
By: Anonymous


Warning: open_basedir restriction in effect

Posted on: 13/04/05 09:27am
By: Anonymous

I had this problem whith php and PLESK
the only thing i could do was to create a symlink to the right place and put it in the directory where the script was operating from.

i.e:
my script was running from
/home/httpd/vhosts/mydomain.com/httpdocs/somedir/anotherdir/

but was trying to access

/home/httpd/vhosts/mydomain.com/httpdocs/someotherdir/andanotherdir/

in order to write to.
however this just wasnt working under any kind of setuup even when i was messing around with php config variables (i have root ssh acces to the box)
anyway to cut a long story short i fixed it by chmoding the write directory
"chmod -R 777 /home/httpd/vhosts/mydomain.com/httpdocs/someotherdir/andanotherdir/"

then creating the symlink by using
#cd /home/httpd/vhosts/mydomain.com/httpdocs/somedir/anotherdir/
#ln -s /home/httpd/vhosts/mydomain.com/httpdocs/someotherdir/andanotherdir/ andanotherdir

this mean that instead of accesssing the write dir in long form from my script i could address it as simply "andanotherdir/"

bit of a fiasco for such a simple thing... i think it has somthing to do with PLESK in my case but if your server is running somthing similar it might have somthing to do with it
Z..

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=28107