Jump to content


Photo

PHP Warning: require(): File() is not within the allowed path(s)


Hello

if you have open_basedir restriction setup in your php.ini file that goes something like:

open_basedir = "/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp"

then you'll get the following php warnings:

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/classes/class_localization.php on line 787

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/classes/class_localization.php on line 787

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/classes/class_localization.php on line 787

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/base/ipsRegistry.php on line 875

require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/base/ipsRegistry.php on line 1309

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/ips_kernel/classDbMysql.php on line 1152

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/base/ipsRegistry.php on line 390

PHP Warning:  require() [<a href='function.require'>function.require</a>]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/sources/base/ipsRegistry.php on line 375

PHP Warning:  Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/username/public_html:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

cheers :)

Status: Not a Bug
Version: 3.1.4
Fixed In:


3 Comments

Updating status to: Not a Bug

You have a server misconfiguration issue. This isn't a bug in IPB. There are plenty of users that use open_basedir without issue.
I'm not saying IPB doesn't work anymore. Actually everything seems to work as usual apart from getting loads of warning (not errors) in my php error logs.
I would recommend submitting a ticket. If we do find a bug while researching your ticket, I'm happy to update this report.