Error in configuration (localhost) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error in configuration (localhost) (
/showthread.php?tid=632274)
Error in configuration (localhost) -
Lester23 - 11.04.2017
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 error: Uncaught Error: Call 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 ?
Re: Error in configuration (localhost) -
Sew_Sumi - 11.04.2017
Just as a random ******... First result for "Fatal error: Uncaught Error: Call to undefined function mysql_connect()"
http://stackoverflow.com/questions/1...-mysql-connect
Re: Error in configuration (localhost) -
Vince - 11.04.2017
You're actually mixing mysql and mysql
i. 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_.