Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Cannot check for updates - Undefined variable: php_errormsg

edited September 2006 in Vanilla 1.0 Help
Hi all,

I've been searching around the forums, in the Troubleshooting section and in the FAQ, but I couldn't find any solution, so here is my problem:

Whenever I try to check for updates, I get the following message:

Notice: Undefined variable: php_errormsg in /membri/tmc/Vanilla.1/library/Framework/Framework.Functions.php on line 523

What's wrong with it?


Thanks for your time.

Comments

  • Options
    MarkMark Vanilla Staff
    From php.net:

    $php_errormsg is a variable containing the text of the last error message generated by PHP. This variable will only be available within the scope in which the error occurred, and only if the track_errors configuration option is turned on (it defaults to off).

    I turn the errors on in appg/headers.php using ini_set, but your php.ini may disallow that setting. That is likely what the problem is...
  • Options
    This is a test
  • Options
    Well, my knowledge of PHP is poor, I'm still learning it (by myself);

    So, does that mean that I'll not be able to check for updates?

    Thanks.
  • Options
    MarkMark Vanilla Staff
    Open up library/Framework/Framework.functions.php and change the lines around line 513 from this:

    $ErrorNumber = ''; $ErrorMessage = ''; $Handle = @fsockopen($Host, $Port, $ErrorNumber, $ErrorMessage, 30);

    To this:

    $ErrorNumber = ''; $ErrorMessage = ''; $php_errormsg = false; $Handle = @fsockopen($Host, $Port, $ErrorNumber, $ErrorMessage, 30);

    That *should* do it. I've not tested it myself, though.
  • Options
    Yes, it works, but as far as I have understood, the error gets hidden. So, I will not be able to check for updates, right?

    Thanks a lot!
This discussion has been closed.