Fatal error: Uncaught Error: Call to undefined function mysq

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Fatal error: Uncaught Error: Call to undefined function mysq

Postby CoZmicShRedd » 28. May 2016 17:54

Error
Code: Select all
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in G:\xampp\htdocs\cozworld\lgsl\lgsl_files\lgsl_class.php:130 Stack trace: #0 G:\xampp\htdocs\cozworld\lgsl\lgsl_files\lgsl_class.php(308): lgsl_database() #1 G:\xampp\htdocs\cozworld\lgsl\lgsl_files\lgsl_list.php(15): lgsl_query_group() #2 G:\xampp\htdocs\cozworld\lgsl\index.php(33): require('G:\\xampp\\htdocs...') #3 {main} thrown in G:\xampp\htdocs\cozworld\lgsl\lgsl_files\lgsl_class.php on line 130


Need to adjust this so it works with PHP 7 can someone help me fix this coding?

$lgsl_database = mysql_connect($lgsl_config['db']['server'], $lgsl_config['db']['user'], $lgsl_config['db']['pass']) or die(mysql_error());
$lgsl_select_db = mysql_select_db($lgsl_config['db']['db'], $lgsl_database) or die(mysql_error());

Thank you in advance! ;)
CoZmicShRedd
 
Posts: 2
Joined: 02. September 2015 23:30
Operating System: Windows 2008

Re: Fatal error: Uncaught Error: Call to undefined function

Postby Nobbie » 28. May 2016 18:02

See https://wiki.php.net/rfc/remove_depreca ... ty_in_php7

The API "mysql" has been removed from PHP7 (it has been declared as "deprecated" in PHP 5.x). Either use "mysqli" API (functions or objects/classes) or use older Xampp with older PHP.
Nobbie
 
Posts: 8769
Joined: 09. March 2008 13:04

Re: Fatal error: Uncaught Error: Call to undefined function

Postby CoZmicShRedd » 29. May 2016 18:10

I was mainly asking for coding help that link explains nothing I can understand....
CoZmicShRedd
 
Posts: 2
Joined: 02. September 2015 23:30
Operating System: Windows 2008

Re: Fatal error: Uncaught Error: Call to undefined function

Postby Nobbie » 29. May 2016 19:37

CoZmicShRedd wrote:I was mainly asking for coding help


Oh sorry, but this forum is not meant for coding help. It is meant for installation problems instead. Anyway, if you have no skills about programming in PHP, you wont solve this issue. It definately requires advanced PHP programming skills. And its far from the scope of this forum.
Nobbie
 
Posts: 8769
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 90 guests