• Resolved microscopicearthling

    (@microscopicearthling)


    Hey guys,
    I got wordpress installed in a sub-directory (of root) called “blog”. At the root, I have my self-coded CMS running. The CMS interface displays a link called Blog, which simply links to http://mydomain/blog/.

    Problem is whenever I try to access wordpress, I keep getting this message:

    Fatal error: Call to undefined function wp() in /home/user/public_html/blog/wp-blog-header.php on line 18

    I tried a lot of stuff, but can’t figure out why it refuses to work. But it’s pretty clear that it’s gotta be some path + file reading problem, which causes the wp-blog-header.php not be able to spot the wp() function.

    Is this because of some .htaccess problem? Coz my CMS uses a htaccess similar to wordpress to generate pretty urls too..

    CMS htaccess
    ————-
    # Let the Script handle all pretty URLs
    RewriteEngine On
    RewriteBase /
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteRule .* index.php [L]

    WordPress htaccess
    ——————-
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    As you can see there’s hardly any difference other than the RewriteBase.

    Can anyone please throw some light on this issue?

    Thanks a tonne,
    m^e

Viewing 4 replies - 1 through 4 (of 4 total)
  • are you sure you uploaded every wp file? try to re-upload.

    Thread Starter microscopicearthling

    (@microscopicearthling)

    Yep.. pretty much! That was the first thing that crossed my mind – so I checked and cross-checked and re-uploaded the whole of wp nothing less than 6 times. Even tried installing it through Fantastico.. none worked.

    I’m so totally stumped !! Never seen anything like this happen.

    Well if you guys want to check for yourself, here’s my domain: http://www.huahinlive.com

    Thread Starter microscopicearthling

    (@microscopicearthling)

    This is quite weird.. On a stray thought, I tried doing an exact same install (replicated directory structure as my remote host) under my XAMPP setup on locahost.. and it fails with the exact same message !!

    Thread Starter microscopicearthling

    (@microscopicearthling)

    Well well.. what do you know !! It all was happening because of a messed up wp-config.php.

    For some reason the line breaks got wiped out (probably during Windows -> Unix transition) and quite obviously the variable called ABSPATH was never defined. That caused an entire series of breakdowns…

    Anyways, problem solved 😀

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress is Subdirectory and .htaccess problems’ is closed to new replies.