Migrate to MariaDB

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Migrate to MariaDB

Postby rich8899 » 03. December 2016 21:25

Hi, more questions about Xampp 5.6.28 :(, Before I install 5.6.28, I did a brief read on MariaDB, I was under the impression that most mysql_xxxx commands are compatible, but sure enough once I run my code like this one
$cnx=mysql_connect($host, $usr, $pwd) or die ('NOT CONNECTED!');
MariaDB gave me this error: "Fatal error: Uncaught Error: Call to undefined function mysql_connect()". What da hell? How do I fix it?

BTW, this is an unrelated question.
I posted on this forum a few time, but when I come back to check if I have any replies, I can never found my post, why is that? am I not allowed to post here?
rich8899
 
Posts: 4
Joined: 02. December 2016 17:38
XAMPP version: 1.7.3
Operating System: macOS

Re: Migrate to MariaDB

Postby Altrea » 04. December 2016 13:00

rich8899 wrote:Before I install 5.6.28, I did a brief read on MariaDB, I was under the impression that most mysql_xxxx commands are compatible, but sure enough once I run my code like this one
$cnx=mysql_connect($host, $usr, $pwd) or die ('NOT CONNECTED!');
MariaDB gave me this error: "Fatal error: Uncaught Error: Call to undefined function mysql_connect()". What da hell? How do I fix it?

It is not a problem of MariaDB imcompatibilities. PHP removed the old mysql_ functions with versions PHP 7.X. So either you are using a XAMPP version 7.X or the php_mysql extension is not enabled in your php.ini. Please check with help of phpinfo() which php version is running and if mysql extension is enabled.
The recommend way for both reasons is to use the new mysqli_ or PDO functions/classes.

rich8899 wrote:I posted on this forum a few time, but when I come back to check if I have any replies, I can never found my post, why is that? am I not allowed to post here?

New users here need to have at least one thread approved by a board moderator to be visible to others (spam protection)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8845
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Migrate to MariaDB

Postby Nobbie » 04. December 2016 14:49

rich8899 wrote:MariaDB gave me this error:


No it does not, its not an error of your SQL Databaseserver (this is even not involved), it is a message from PHP. See Altreas answer for more information.
Nobbie
 
Posts: 9562
Joined: 09. March 2008 13:04


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 4 guests