Search…

X3 Photo Gallery Support Forums

Search…
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

X3 with DB panel

29 Jan 2016, 08:04

Hello

After a clean install of X3 i want to make panel conect to DB buth i become this error massage :
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/mojeslik/www/panel/install/install.php:10 Stack trace: #0 /home/mojeslik/www/panel/install/install.php(202): INSTALL->__construct() #1 {main} thrown in /home/mojeslik/www/panel/install/install.php on line 10
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: X3 with DB panel

29 Jan 2016, 10:34

netopir wrote:After a clean install of X3 i want to make panel conect to DB buth i become this error massage :
Someone upgraded the server to PHP 7.0 and forgot to install the MYSQL extension?
http://www.mojeslike.eu/?diagnostics
Image
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: X3 with DB panel

29 Jan 2016, 11:03

Hi

I contact the support of the hosting provider and wait of replay.

thanks Karl.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: X3 with DB panel

09 Feb 2016, 11:09

Hello

So the support wroth that MSQLI is installed look here http://www.mojeslike.eu/test.php .
Is MSQLI not good or is there a problem with this when using X3 with DB.
And is there a difrent with MSQL and MSQLI ?
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: X3 with DB panel

09 Feb 2016, 11:26

Hello

I make test with MSQLI:
Code
<?php
$servername = "**********";
$username = "**********";
$password = "**********";

// Create connection
$conn = mysqli_connect($servername, $username, $password);

// Check connection
 if (!$conn) {
     die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?> 
With conection successfully.

And then wit MSQL:
Code
<?php
$server   = "**********";
$database = "**********";
$username = "**********";
$password = "**********";

$mysqlConnection = mysql_connect($server, $username, $password);
if (!$mysqlConnection)
{
  echo "Please try later.";
}
else
{
mysql_select_db($database, $mysqlConnection);
}
?>
Become this error:
Code
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/mojeslik/www/dbtest.php:7 Stack trace: #0 {main} thrown in /home/mojeslik/www/dbtest.php on line 7
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: X3 with DB panel

09 Feb 2016, 12:12

I think this is because of PHP7 ... I think perhaps PHP 7 comes with mysqli by default, but not mysql . The X3 panel uses mysql, but I will look into this ASAP. Mysqli is a newer, improved php database driver.

I may have a fix for this in a new release next week. For now, you may need to use the non-DB version.
 
netopir
Experienced
Topic Author
Posts: 46
Joined: 11 Nov 2014, 14:37

Re: X3 with DB panel

09 Feb 2016, 13:53

Hello

Ok thanks.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: X3 with DB panel

26 Feb 2016, 02:34

MySQLi ("i" stands for "improved") support is now added for the X3 admin panel. It was important to update to MySQLi, because new PHP7 does not come with the older MySQL extension by default. This feature will be available in a new release next week.

MySQLi
https://en.wikipedia.org/wiki/MySQLi