Support » Fixing WordPress » File is not within the allowed path(s)

  • Resolved Soyoudiditagain


    Hi everybody, here’s my trouble :

    i’ve got 3 domains hosted on the same server.
    let’s call them, and

    i’m running a blog on and,
    both have the same sidebar, which is an external php file located on .
    i include it with a php include function and the relative path on the server, i mean i’m using the “../” things to get the file from’s folder to &, not URL.

    everything is alright on, who shows perfectly the “distant” sidebar, but (who’s running with the exact same theme) i only can see this error message :

    Warning: include() [function.include]: open_basedir restriction in effect. File(../../ is not within the allowed path(s): (/home/www/ in /home/web2/ on line 48
    Warning: include(../../ [function.include]: failed to open stream: Operation not permitted in /home/web2/ on line 48
    Warning: include() [function.include]: Failed opening '../../' for inclusion (include_path='.:/usr/local/lib/php') in /home/web2/ on line 48

    i just can’t understand why is okay while isn’t,
    anyone ?
    thanks in advance !


Viewing 1 replies (of 1 total)
  • Okay, for people who’ll have the same trouble, here’s why :
    This is due to PHP restrictions in place to protect against exploited PHP scripts. Typically it keeps PHP scripts from accessing files outside of their own document root for the domain they are running on.

    you have to disable this feature (or ask your server support to do so)

Viewing 1 replies (of 1 total)
  • The topic ‘File is not within the allowed path(s)’ is closed to new replies.