Raised This Month: $12 Target: $400
 3% 

Call to undefined function mysql_connect()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HiddenConn1
AlliedModders Donor
Join Date: Aug 2009
Location: Cambridge, UK
Old 02-26-2020 , 08:22   Call to undefined function mysql_connect()
Reply With Quote #1

Code:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/<snip>/stats.unifiedgaming.net/includes/class_db.php:87 Stack trace: #0 /home/<snip>/stats.unifiedgaming.net/hlstats.php(130): DB_mysql->DB_mysql('localhost', '<snip>_<snip>...', '<snip>', '<snip>', 0) #1 {main} thrown in /home/<snip>/stats.unifiedgaming.net/includes/class_db.php on line 87
Code:
[25-Feb-2020 17:59:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DB_mysql has a deprecated constructor in /home/<snip>/stats.unifiedgaming.net/includes/class_db.php on line 58
[25-Feb-2020 17:59:42 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Table has a deprecated constructor in /home/<snip>/stats.unifiedgaming.net/includes/class_table.php on line 48
I am getting this error when trying to install HLStatsX on my website. How can I fix this?
__________________
HiddenConn1 is offline
andrepires68
Member
Join Date: Feb 2010
Location: Portugal
Old 03-15-2020 , 15:13   Re: Call to undefined function mysql_connect()
Reply With Quote #2

Hi, this is because you are running on a php version where those functions were replaced with their mysqli* functions. You will have to change those functions to be according with your php version. See https://bitbucket.org/Maverick_of_UC...ble-with-php-7
andrepires68 is offline
NomisCZ
AlliedModders Donor
Join Date: Mar 2014
Location: Czech_Republic
Old 03-15-2020 , 19:09   Re: Call to undefined function mysql_connect()
Reply With Quote #3

Hello,
PHP 7 and GeoIP2 version: https://github.com/NomisCZ/hlstatsx-community-edition
__________________
NomisCZ is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode