WordPress.org

Support

Support » Installation » Installation problem:relative path

Installation problem:relative path

  • I’ ve installed wordpress. Instalation message was ok, but then nothing was displayed when loading index.php or b2login.php. I`ve modified the config file adding “$abspath = ‘../wordpress/’;” at the bottom of it, and then there was the main page . But now when I try to log in, entering username and password a blank page is shown.
    Can anybody help me ?. Thanks .
    Here the end lines of my b2config.php file:
    $relpath = ”;
    $url = explode(‘/’, $siteurl);
    for ($i = 3; $i < count($url); $i++) {
    $relpath .= ‘/’. $url[$i];
    }
    $abspath = getenv(‘DOCUMENT_ROOT’) . $relpath . ‘/’;
    $b2inc = “/$b2inc”;
    $pathserver = &$siteurl;
    $abspath = ‘../wordpress/’;

Viewing 15 replies - 1 through 15 (of 16 total)
  • Well, I think you don’t need to add the $abspath = ‘../wordpress/’;
    Just remove that line. If you want to install it in your /wordpress/ folder, just change this line:
    $siteurl = ‘http://www.yoursiteurl.com/wordpress’; … just change that url into your WP directory…

    changing only $siteurl to ‘http://www.yoursiteurl.com/wordpress” does not work. In my b2config.php file siteurl was set to “http://www.yoursiteurl.com/wordpress”
    Index.php is only displayed ok if I put $abspath = ‘../wordpress/’; at the bottom of b2 config.php file, other options =blank index.php page

    If you do set $abspath manually, it should be an absolute path to the root of your filesystem. Something like $abspath = "/home/username/public_html/wordpress".

    I’m having the same problem and I believe there are a couple of problems (0.7):
    1) b2config.php line 332 (all approx, I may have modified it, sorry)
    $abspath = getenv(‘DOCUMENT_ROOT’) . $relpath . ‘/’;
    $b2inc = “/$b2inc”;
    However, in b2login.php right at the top you have:
    require_once($abspath.$b2inc.’/b2template.functions.php’);
    obviously this is going to end up wrong because $abspath ends with ‘/’ therefore you’ll have something like:
    /var/www/html/wordpress//b2inc/b2template…
    the double // (one from $abspath one from “/$b2inc”) leads to a bad path.
    if you take the / from the end of $abspath, you’ll most likely run into problems in places like wp-admin/b2edit.showpost.php:231 because:
    include($abspath.’blog.header.php’);
    it’ll obviously search for:
    …/html/wordpressblog.header.php (no / in between).
    Hopefully all these problems would be eventually fixed.
    Thanks!

    I’ve never had problems with double // in paths. It just ignores it.

    obivously not on my system (RH 8, PHP 4.3.2) because it keeps complaining about not finding the files 🙂

    I had the same problem too, the getenv(‘DOCUMENT_ROOT’) showed /home/httpd/html, which isn’t where I put my files. I manually set the $abspath variable though and it worked after that.

    Absolut path. That’s a parody waiting to happen.

    where´s the new version allusion promised with an alternative to servers where DOCUMENT_ROOT is not set properly. I´m a b2 user (i had no problem setting it up on my server), ..i hope someday i will be a wordpress user.

    Try replacing getenv('DOCUMENT_ROOT') . $relpath with dirname(__FILE__) and tell me how that goes.

    in my profile i have 4 posts, but none is shown in edit/post.

    I just add “/” to 3th line in index.php an index is displayed ok. All my test post are shown, but still i cannot edit posts because none is in the edit/post page.
    <?php /* Don’t remove this line, it calls the b2 function files ! */ $blog=1;
    require_once(‘blog.header.php’);
    require($abspath.’–****–/__***wp-links/links.php’);
    ?>

    allusion: your suggestion worked (I had the same problem, with DOCUMENT_ROOT pointing somewhere else (shared server environment).

    .72 isn’t going to have this problem.

    Thanks allusion…I`ll be waiting anxious for .72 .I hope then i will be able to post with wordpress.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Installation problem:relative path’ is closed to new replies.
Skip to toolbar