You are not logged in.
I'm running mythtv on one box, and connecting to it with mythweb from another. I have php errors turned on as I had some configuration errors when I updated php.
I am now getting the following error:
Error at /srv/www/mythweb/includes/modules.php, line 28:
file_exists(): open_basedir restriction in effect. File(./modules/welcome.php/init.php) is not within the allowed path(s): (/srv/http/:/home/:/tmp/:/usr/share/pear/:/srv/www/)
I don't understand the
File(./modules/welcome.php/init.php)
part of that, there is no welcome.php directory.
In php.ini, I have
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/srv/www/
and every instance of welcome.php and init.php is in the /srv/www/ path.
What am I missing?
Last edited by timm (2009-11-11 13:48:40)
Offline
The same thing has been happening to me since a php update a month ago.
I've got no idea what's wrong, maybe a bug in the php package?
Offline
Commenting out the "open_basedir" line in php.ini gets rid of the error message, I don't know if it's a security risk. My server isn't open to the internet anyway.
Last edited by chair (2009-12-03 13:05:17)
Offline
Unless I'm mistaken, there was a subtle difference between /srv/www/ and /srv/www (without trailing slash) for open_basedir.
I think writing /srv/www/ will allow only this directory and no subdirectories whilst using /srv/www will allow this directory and subdirectories.
Offline
Just like timm I believe it's an error in the code. Obviously welcome.php/init.php doesn't exist. I created a bugreport including a very cheap fix:
http://svn.mythtv.org/trac/ticket/7997
Here's the text of the bugreport, if you're too lazy to go there by yourself:
Hi,
I already saw the 2 similar bugs that won't get fixed, but I believe that the code is still faulty. Have a look at the thrown message: "Warning at /srv/http/mythweb/classes/Modules.php, line 30: file_exists(): open_basedir restriction in effect. File(./modules/welcome.php/init.php) is not within the allowed path(s): (/srv/http)
In fact, the file ./modules/welcome.php/init.php is nonexistent. Modules.php makes a list of files in the modules directory, assumes they are subdirectories and tries to load init.php in each of the directories. welcome.php isn't a directory, hence you shouldn't treat it as one.
Here's a cheap fix: In includes/utils.php is a function called get_sorted_files. Replace
if ($file == '.' $file == '..') continue;
with
if ($file == '.' $file == '..' $file == 'welcome.php') continue;
Probably there's someone that can do a lot better than this, but this did it for me.
Offline