Title: Installation problem:relative path
Last modified: August 18, 2016

---

# Installation problem:relative path

 *  Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-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)

1 [2](https://wordpress.org/support/topic/installation-problemrelative-path/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/installation-problemrelative-path/page/2/?output_format=md)

 *  [thomas](https://wordpress.org/support/users/thomas/)
 * (@thomas)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21553)
 * 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&#8217](http://www.yoursiteurl.com/wordpress&#8217);;…
   just change that url into your WP directory…
 *  Thread Starter Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21554)
 * 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&#8221](http://www.yoursiteurl.com/wordpress&#8221);
   
   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
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21555)
 * 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"`.
 *  [philipx](https://wordpress.org/support/users/philipx/)
 * (@philipx)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21736)
 * 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!
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21737)
 * I’ve never had problems with double // in paths. It just ignores it.
 *  [philipx](https://wordpress.org/support/users/philipx/)
 * (@philipx)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21738)
 * obivously not on my system (RH 8, PHP 4.3.2) because it keeps complaining about
   not finding the files 🙂
 *  [absolut](https://wordpress.org/support/users/absolut/)
 * (@absolut)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21749)
 * 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.
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21753)
 * Absolut path. That’s a parody waiting to happen.
 *  Thread Starter Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21782)
 * 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.
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21799)
 * Try replacing `getenv('DOCUMENT_ROOT') . $relpath` with `dirname(__FILE__) ` 
   and tell me how that goes.
 *  Thread Starter Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21819)
 * in my profile i have 4 posts, but none is shown in edit/post.
 *  Thread Starter Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21820)
 * 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’); ?>
 *  [tvleavitt](https://wordpress.org/support/users/tvleavitt/)
 * (@tvleavitt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21859)
 * allusion: your suggestion worked (I had the same problem, with DOCUMENT_ROOT 
   pointing somewhere else (shared server environment).
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21860)
 * .72 isn’t going to have this problem.
 *  Thread Starter Anonymous
 * [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/#post-21864)
 * 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)

1 [2](https://wordpress.org/support/topic/installation-problemrelative-path/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/installation-problemrelative-path/page/2/?output_format=md)

The topic ‘Installation problem:relative path’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 16 replies
 * 6 participants
 * Last reply from: Anonymous
 * Last activity: [22 years, 11 months ago](https://wordpress.org/support/topic/installation-problemrelative-path/page/2/#post-21894)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
