MyBB Community Forums

Full Version: Allowed path(s) =???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Whenever a user tries to upload an image as an attachment to his posting, the following error message occurs:

Quote:Warning: checkattachment() [function.checkattachment]: open_basedir restriction in effect. File(/usr/share/php/functions_image.php) is not within the allowed path(s): (/home/www/web17/) in /home/www/web17/html/quickstart/Forum/inc/functions.php on line 894

Warning: checkattachment(functions_image.php) [function.checkattachment]: failed to create stream: Operation not permitted in /home/www/web17/html/quickstart/Forum/inc/functions.php on line 894

Warning: checkattachment() [function.checkattachment]: open_basedir restriction in effect. File(/usr/share/php/functions_image.php) is not within the allowed path(s): (/home/www/web17/) in /home/www/web17/html/quickstart/Forum/inc/functions.php on line 894

Warning: checkattachment(functions_image.php) [function.checkattachment]: failed to create stream: Operation not permitted in /home/www/web17/html/quickstart/Forum/inc/functions.php on line 894

Fatal error: checkattachment() [function.checkattachment]: Failed opening required 'functions_image.php' (include_path='.:/usr/share/php') in /home/www/web17/html/quickstart/Forum/inc/functions.php on line 894

What can I do?
Hmm... this sounds like PHP safe mode is enabled and is disallowing any file uploads. You might want to contact your host and see if they will allow that script to upload files.
Quote:sounds like PHP safe mode is enabled and is disallowing any file uploads

Users can upload their own avatars without any problems, however.
I just tried something and it makes it all the more strange: I can upload a *.txt - file as an attachment without any problems. The only trouble seem to be pictures as attachments. Anyone ever had the same problem?
It's me again. I aparently have solved the problem. I changed the funtions.php on line 894 from:

Quote:require "functions_image.php";

to:

Quote:require "/home/www/web17/html/quickstart/Forum/inc/functions_image.php";

Now everything works fine. No more error messages saying that File(/usr/share/php/functions_image.php) is not within the allowed path(s): (/home/www/web17/)