• I uploaded and installed WP on my web account at a free web space provider. Each installation steps were done correctly, and the login page also came along. I entered admin and the generated password to get this error message:
    Warning: main(): open_basedir restriction in effect. File(../wp-config.php) is not within the allowed path(s): (.) in /disk/raid0/g/i/giros/wp-admin/index.php on line 3
    I suppose it is because open_basedir is set to . in the PHP settings, and the 3rd line in that index.php is
    require(‘../wp-config.php’);
    So it tries to require a file outside it’s own directory, but it is not possible because of the open_basedir restriction. Unfortunately I can’t change the open_basedir because as I mentioned this is a free web space provider, and I am not allowed to change the PHP settings on the server. Any idea about what else could I do to make WP work would be very appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Please check whether you have uploaded all the files in the right place with the directory structure intact and the paths in the code are correct (if you have tweaked it). My host also has open_basedir restriction in effect but WP works fine.

    I didn’t mentioned all the error messages i get at the login step, only the first one, which I supposed to be the most important. These two messages also appear then, maybe you can say more about the problem from them:
    Warning: main(../wp-config.php): failed to open stream: Operation not permitted in /disk/raid0/g/i/giros/wp-admin/index.php on line 3
    Fatal error: main(): Failed opening required ‘../wp-config.php’ (include_path=”) in /disk/raid0/g/i/giros/wp-admin/index.php on line 3
    I uploaded the files as they were in the installation package (except I entered my database configuration). I didn’t changed the location of any file and didn’t entered any paths to anywhere.

    I have found thisissue with many themes. One solution is to find any php_require statements like this:
    <?/* php require(‘./post.php’); */ ?>

    and replace them with this:
    <?php include (TEMPLATEPATH . ‘/post.php’); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘open_basedir problem’ is closed to new replies.