Error in configuration (localhost)
#1

Hello gents

Recently I downloaded a UCP (User Control Panel) from sa-mp.com, I've installed it in htdocs etc etc.
Код:
$connect = mysqli_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("test") or die(mysql_error());
where ''test'' it's my database, is also connected to my samp gamemode

PHP код:
Fatal errorUncaught ErrorCall to undefined function mysql_connect() in C:\xampp\htdocs\S32_Admin_UCP\S32_Admin UCP\connect.php:3 Stack trace#0 C:\xampp\htdocs\S32_Admin_UCP\S32_Admin UCP\index.php(3): include() #1 {main} thrown in C:\xampp\htdocs\S32_Admin_UCP\S32_Admin UCP\connect.php on line 3 
https://sampforum.blast.hk/showthread.php?tid=330786 here's the UCP. By the way, I've installed other UCPs, same error... any idea why is happening ?
Reply
#2

Just as a random ******... First result for "Fatal error: Uncaught Error: Call to undefined function mysql_connect()"

http://stackoverflow.com/questions/1...-mysql-connect
Reply
#3

You're actually mixing mysql and mysqli. The "mysql" extension has since long been deprecated and was finally removed in PHP7. Use mysqli or PDO. In general I think you can do a search-and-replace: mysql_ to mysqli_.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)