Advertisement:

Author Topic: [2.0.14] Bug report for SMF (SSI.php integration; update from 2.0.13)  (Read 1352 times)

Offline Douglas

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,082
  • Gender: Male
  • Non sibi sed patriae
    • @BearlyDoug on Twitter
    • TwoCentsRadio.net
Wow, can't believe I'm actually filing a bug report.

As you know, I make heavy use of SSI.php on Hogville and Fearless... I updated Fearless yesterday and Hogville this AM. (Both were on 2.0.13)

After getting the update situated and whatnot... it was brought to my attention that there were error messages on the home screen of both sites:
Code: [Select]
Warning: mysql_select_db(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /hogville/includes/lib.phtml on line 3

Warning: mysql_select_db(): A link to the server could not be established in /hogville/includes/lib.phtml on line 3

Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /hogville/index.php on line 1

Warning: mysql_query(): A link to the server could not be established in /hogville/index.php on line 1

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /hogville/index.php on line 1

Just because I know you're going to ask, here's the first few lines of lib.ptml:
Code: [Select]
<?php
require "/hogville/yabbse/SSI.php";
mysql_select_db("XX_hogville");
global 
$_SERVER$username$user_info;
$ID_MEMBER=$user_info['id'];
$username=$user_info['name'];
$group=$user_info['groups'][0];

I reverted the forum's index.php~ back up file to simply index.php and re-uploaded the entire Sources folder and SSI.php from a fresh 2.0.13 zip file, and the error went away.

there is something wonky with 2.0.14, when utilizing SSI.php externally of the forums. :)
Doug Hazard
* Web Developer / Operations Analyst for Richweb.com
* Sports Media Personality covering Collegiate Football and Basketball
* CFB Historian (GridironHistory.com)
* Tech Admin for one 1M+ post, one 2M+ post and one 8M+ post sites (last two are powered by 10+ servers)
* SMF Fanatic

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,106
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.0.14] Bug report for SMF (SSI.php integration; update from 2.0.13)
« Reply #1 on: August 04, 2017, 11:06:18 PM »
Hi Douglas...

We know that SSI didn't get the login security update for 2.0.14 -- there might be other issues.

Thanks for the report. We'll look into it
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,041
    • Arantor on GitHub
Re: [2.0.14] Bug report for SMF (SSI.php integration; update from 2.0.13)
« Reply #2 on: August 05, 2017, 04:02:21 AM »
Actually this one isn't entirely SSI at fault. SMF no longer uses any of the bare mysql_* functions, seeing that they've been removed from PHP in PHP 7.

Convert all the calls to use $smcFunc as they probably should have been for the last ~5 years and the problem goes away.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.