WordPress.org

Ready to get started?Download WordPress

Forums

Installation problem:relative path (17 posts)

  1. Anonymous
    Unregistered
    Posted 11 years ago #

    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/';

  2. thomas
    Member
    Posted 11 years ago #

    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...

  3. Anonymous
    Unregistered
    Posted 11 years ago #

    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

  4. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

    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".

  5. philipx
    Member
    Posted 11 years ago #

    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!

  6. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

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

  7. philipx
    Member
    Posted 11 years ago #

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

  8. absolut
    Member
    Posted 11 years ago #

    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.

  9. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

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

  10. Anonymous
    Unregistered
    Posted 11 years ago #

    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.

  11. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

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

  12. Anonymous
    Unregistered
    Posted 11 years ago #

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

  13. Anonymous
    Unregistered
    Posted 11 years ago #

    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');
    ?>

  14. tvleavitt
    Member
    Posted 11 years ago #

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

  15. Matt Mullenweg
    Troublemaker
    Posted 11 years ago #

    .72 isn't going to have this problem.

  16. Anonymous
    Unregistered
    Posted 11 years ago #

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

  17. Anonymous
    Unregistered
    Posted 11 years ago #

    all i did was change $b2inc = "/$b2inc"; to $b2inc = "$b2inc/"; and it started working. o_O

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.