Author Topic: Fatal Error on installation  (Read 2701 times)

0 Members and 1 Guest are viewing this topic.

Offline amebb

  • New Users
  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Fatal Error on installation
« on: March 01, 2016, 09:54:10 AM »
Hi, I have just reinstalled the TGPx script and followed the correct instructions etc.

The settings and permissions have been set correctly etc.

But, i am now getting this error :

Fatal Error
Error:
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

Trace:
mysql_connect in mysql.class.php on line 39
Connect in install.php on line 174
CreateTables in install.php on line 66
Initialize in install.php on line 379

Can anyone help me with this please ???


My PHP version is 5.6


Thank you for your help.

Offline peeperd

  • Newbie
  • *
  • Posts: 45
  • Karma: +1/-0
    • View Profile
Re: Fatal Error on installation
« Reply #1 on: March 23, 2016, 04:13:04 PM »

Offline amebb

  • New Users
  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Fatal Error on installation
« Reply #2 on: July 08, 2016, 06:42:15 AM »
Hi sorry for the late reply . yes i have tried the link and still i get the same message.

Offline peeperd

  • Newbie
  • *
  • Posts: 45
  • Karma: +1/-0
    • View Profile
Re: Fatal Error on installation
« Reply #3 on: July 12, 2016, 09:27:54 AM »
if you can't do it pm me i will do it later

you need to rewrite all of your database connections and queries.

You are using mysql_* functions which are now deprecated and will be removed from PHP in the future. So you need to start using MySQLi or PDO instead, just as the error notice warned you.



Code: [Select]
?php

/* Database config */

$db_host        = 'localhost';
$db_user        = '~';
$db_pass        = '~';
$db_database    = 'banners';

/* End config */


$mysqli = new mysqli($db_host, $db_user, $db_pass, $db_database);
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

?>

Offline amebb

  • New Users
  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Fatal Error on installation
« Reply #4 on: July 13, 2016, 06:40:17 AM »
if you can't do it pm me i will do it later

you need to rewrite all of your database connections and queries.

You are using mysql_* functions which are now deprecated and will be removed from PHP in the future. So you need to start using MySQLi or PDO instead, just as the error notice warned you.



Code: [Select]
?php

Hi there

Thank you for your reply - much appreciated.

I am not sure on how to change the database connections etc.

If you can give me a hand or advice i would really appreciate it.

Thank you for your help.


Paul

/* Database config */

$db_host        = 'localhost';
$db_user        = '~';
$db_pass        = '~';
$db_database    = 'banners';

/* End config */


$mysqli = new mysqli($db_host, $db_user, $db_pass, $db_database);
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

?>

Unofficial JMB Support Forums

Re: Fatal Error on installation
« Reply #4 on: July 13, 2016, 06:40:17 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1233 Views
Last post August 05, 2013, 07:07:54 PM
by Chad
0 Replies
1069 Views
Last post October 04, 2014, 06:39:06 PM
by oman
1 Replies
1404 Views
Last post August 23, 2016, 01:02:36 PM
by Robert9
4 Replies
1728 Views
Last post July 08, 2016, 06:41:39 AM
by amebb
0 Replies
1047 Views
Last post October 17, 2016, 09:30:33 PM
by j3ss3jam3s

anything