• I am using:
    Wordpress 3.1.3
    Mysql 5.0
    PHP 5.2.17

    Site is: http:/www.fbod.net

    I had set up my website under a subdirectory to keep it separate from the existing homepage. Recently I transferred everything to the main directory so that the WordPress site would take over as my site’s homepage. I only moved the files to a new directory; The SQL database stayed the same.

    After the move I started getting “undefined variable” errors on several of my plugins. I have tried deleting the existing plugins and doing a re-install, but nothing was fixed.

    The weird thing is that for some of the errors I know exactly what the error is and I can fix it, but I have no idea why it’s happening. An example being:

    Notice: Undefined variable: content in /htdocs/wp-content/plugins/wow-guild-retrieve/wow-guild.php on line 127

    Inside wow-guild.php it defines $content like this:

    $content .= “blahblah”;
    $content .= “morestuff”;

    The error apparently comes from the fact that it doesn’t like using concatenation on the first definition of a variable. This is an easy fix and it kind of makes sense, but it is frustrating because this was never an issue until I changed directories.

    There are also similar errors that have nothing to do with concatenation and I’m hoping that something I can do/undo, that I may have missed when transferring, will fix all of these new errors.

Viewing 2 replies - 1 through 2 (of 2 total)
  • it doesn’t like using concatenation on the first definition of a variable

    That would be correct behaviour as variables are supposed to be defined before being used.

    Thread Starter Lailoken

    (@lailoken)

    That would be correct behaviour as variables are supposed to be defined before being used.

    Like I said, it makes sense; I get why that would cause an error. The thing is that I have 3 or 4 plugins with similar syntax and none of them gave me an error prior to changing directories.

    Also, because there are other undefined variable errors that don’t involve concatenation I figured it might just be a symptom of something that I did/didn’t do rather than several plugins spontaneously deciding to throw out errors after months of working correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unknown variable errors after moving directories’ is closed to new replies.