Advertisement:

Author Topic: PHP Upgrade Causing Errors  (Read 1385 times)

Offline radiocitybill

  • Semi-Newbie
  • *
  • Posts: 52
PHP Upgrade Causing Errors
« on: April 14, 2012, 07:25:50 PM »
My virtual hosting provider recently updated PHP to version 5.3.10 and MySQL to version 5.1.61-cll. I had noting a somewhat large PHP5 error log in my SMF directory with this error repeated numerous times for three solid minutes:

3-Apr-2012 20:00:21 UTC] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/accountname/public_html/domaindirectory/smf/Sources/Subs-Db-mysql.php on line 132

Like anybody else they passed the buck and said I am not sure what this would mean for the software that the PHP warning is for but my suggestion would be to contact the developers of the software and see if they know of any bugs with their software and PHP 5.3. Our support does not cover the web development side of things so you will need to address this issue.

Are there any issues with PHP 5.3 and SMF 2.0.2 that would cause this or is my hosting provider blowing hot air at me? The installation had been working without issue prior to the upgrade of PHP.

Offline 青山 素子

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,113
  • 戦場ヶ原、蕩れ!
    • @motokochan on Twitter
    • Animeneko Network
Re: PHP Upgrade Causing Errors
« Reply #1 on: April 15, 2012, 04:16:37 PM »
Interesting. SMF should work just fine with PHP 5.3, there are a lot of people using this configuration.

I have a feeling that the problem may be in the MySQL changes. The error message is valid, but it shouldn't show up unless there is an issue with the database connection (or a programming error).
Motoko-chan
Director, Simple Machines

Note: I am not a member of the Simple Machines Forum project.


Offline Colin

  • Customizer
  • SMF Hero
  • *
  • Posts: 5,142
  • Gender: Male
  • SMF Customizer
Re: PHP Upgrade Causing Errors
« Reply #2 on: April 15, 2012, 06:43:52 PM »
If you are permitted to edit the php.ini then you could try to rollback your PHP version to if that was the issue. I too find it hard to believe that could be causing it though.

Offline radiocitybill

  • Semi-Newbie
  • *
  • Posts: 52
Re: PHP Upgrade Causing Errors
« Reply #3 on: April 16, 2012, 08:59:25 PM »
The errors had ceased not long after contacting the server host's tech support so I would not be surprised if they tweaked something. Thank you for your feedback on this.

Offline Colin

  • Customizer
  • SMF Hero
  • *
  • Posts: 5,142
  • Gender: Male
  • SMF Customizer
Re: PHP Upgrade Causing Errors
« Reply #4 on: April 16, 2012, 09:03:09 PM »
Glad you got it working. *Marking topic as solved.