Support » Installing WordPress » File(../wp-config.php) is not within the allowed path(s) / failed to open stream

  • td_ruxpin



    I’d like to tap the expansive knowledge of you bright WordPress guys once more if I may. 🙂

    I’ve moved a wordpress blog to a new server as you can see described in this thread:

    I managed to fix my caching problem by disabling it altogether, however now I have a new problem.

    I can view the index.php page and it displays properly, however whenever I try to use these links:

    http://[my site]/apps/status/wp-admin/edit.php
    http://[my site]/apps/status/wp-admin/post.php
    http://[my site]/apps/status/wp-admin/

    I get these errors:

    [Mon Jun 26 16:25:32 2006] [error] PHP Warning: main(): open_basedir restriction in effect. File(../wp-config.php) is not within the allowed path(s): ([my include paths]) in ./admin.php on line 5
    [Mon Jun 26 16:25:32 2006] [error] PHP Warning: main(../wp-config.php): failed to open stream: Operation not permitted in ./admin.php on line 5
    [Mon Jun 26 16:25:32 2006] [error] PHP Fatal error: main(): Failed opening required ‘../wp-config.php’ (include_path=’.:[my include paths]’) in ./admin.php on line 5

    I’ve removed some non-essential data for privacy.

    Can someone please help me to figure out how to resolve this?

    I’ve searched the web as well as the support history here on the Support forums, and while I did find an article that was related to this issue it turned out to be a windows-server-specific problem.

    I’m moving my wordpress form a BSD server to a BSD server.

    I would apreciate any advice you could offer and be very grateful!

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • yosemite


    Your host has some restrictions in place regarding where scripts can be run. You can ask your host to change this for you (include /wp-admin/, etc….)




    I found out that wp can’t get access to ../[filename] because of the way the server is configured.

    If I replace




    …I can use the Post, Edit and Manage pages as well as all of the options pages, and the posts display properly.

    However, some things are still missing.

    For example, I can’t use attachments to post. I don’t get any errors from the php module and I can use the upload function, but the directory for the content doesn’t get created and the file doesn’t get uploaded. Any links to files in my posts come out as plain text instead of a link.

    I tried replacing __FILE__ in the ABSPATH in wp-congig.php but when I did I got an error that there was a ‘/’ where ‘ was expected, even when I escaped the slashes with \ (ie \/).

    Does anyone have a better workaround for this?



    Safe Mode

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File(../wp-config.php) is not within the allowed path(s) / failed to open stream’ is closed to new replies.