deprecated error

Discuss everything related to ApPHP AdminPanel. Any questions related to developing or using should be posted to this forum.

Moderators: ne_moj, zewa

zeinul_abideen
Newbie
Newbie
Posts: 2
Joined: Mar 17th, '15, 09:53

deprecated error

Postby zeinul_abideen » Mar 17th, '15, 10:18

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\xampp\htdocs\adminPanel\inc\database.inc.php on line 58
line 58 0f the database.inc.php ----> $this->conn = $func($this->host, $this->user, $this->password);
what do i do? please help. thank you in advance

administrator
Site Admin
Site Admin
Posts: 5922
Joined: Jan 7th, '09, 23:18
Contact:

Re: deprecated error

Postby administrator » Mar 17th, '15, 20:58

Thanks, we're planning to replace mysql with mysqli soon.

zeinul_abideen
Newbie
Newbie
Posts: 2
Joined: Mar 17th, '15, 09:53

Re: deprecated error

Postby zeinul_abideen » Mar 18th, '15, 11:56

at the meantime how do i go about it?

sadorect
Newbie
Newbie
Posts: 2
Joined: Mar 14th, '16, 12:23

Re: deprecated error

Postby sadorect » Mar 14th, '16, 12:40

Thank you for the PHP Admin Panel script. I downloaded and installed it on my localhost and had the following challenges.
First of all, installation could not proceed due to DEPRECATED MYSQL Error. So, the install.php file did not even run at all. I located the file and replaced all the mysql with mysqli which enabled the install file to open and complete the install process.
However, after the install, I was unable to login with the default admin credentials set. I keep getting a Wrong Username And Password Error.

What could be wrong?

sadorect
Newbie
Newbie
Posts: 2
Joined: Mar 14th, '16, 12:23

Re: deprecated error

Postby sadorect » Mar 14th, '16, 13:16

sadorect wrote:Thank you for the PHP Admin Panel script. I downloaded and installed it on my localhost and had the following challenges.
First of all, installation could not proceed due to DEPRECATED MYSQL Error. So, the install.php file did not even run at all. I located the file and replaced all the mysql with mysqli which enabled the install file to open and complete the install process.
However, after the install, I was unable to login with the default admin credentials set. I keep getting a Wrong Username And Password Error.

What could be wrong?



SOLVED

This issued has just been solved.
I used a mysql converter tool and it was successful https://github.com/philip/MySQLConverterTool

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: deprecated error

Postby ne_moj » Mar 15th, '16, 11:45

Hi sadorect.

You very quickly sorted out the problem. Cool 8-)

wbear
Newbie
Newbie
Posts: 2
Joined: Aug 15th, '16, 20:34

Re: deprecated error

Postby wbear » Aug 15th, '16, 20:41

For those of us that don't use github or run things like this on servers without vetting it (loads of code to run through), is there an updated version of the free admpanel that uses mysqli? I'm helping someone that's using this, and it's been the same version on his site (and the download) for a really long time, and doesn't work on newer servers.

Any help here?

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: deprecated error

Postby ne_moj » Aug 16th, '16, 09:35

Hello

http://www.apphp.com/php-adminpanel/ind ... =downloads
It AdminPanel version 1.0.5, it uses interface PDO to connect to a database, I think you should not have any problems with it.

wbear
Newbie
Newbie
Posts: 2
Joined: Aug 15th, '16, 20:34

Re: deprecated error

Postby wbear » Aug 16th, '16, 11:05

ne_moj wrote:It AdminPanel version 1.0.5, it uses interface PDO to connect to a database, I think you should not have any problems with it.

Actually, that doesn't appear correct. Just downloaded, and it's the same as the version I'm having trouble with, and is not PDO nor mysqli.

Examples would be:
Current download (matching existing also):

Code: Select all

   // Select the requested database
        if (!@mysql_select_db($this->database, $this->conn)) {
            return false;
        }


PDO:

Code: Select all

try{   
    $pdo = new PDO('sqlite:example.db');
}catch (PDOException $e){
     die ('DB Error');
}


SQLI:

Code: Select all

$con = mysqli_connect("localhost","my_user","my_password","my_db");

kenedy
Newbie
Newbie
Posts: 1
Joined: Dec 6th, '16, 23:00

Re: deprecated error

Postby kenedy » Dec 8th, '16, 11:21

The best thing you must do is to replace mysql with mysqli...
Graduated from Soran University with First Class Degree with Honours in Computer Science.


Return to “ApPHP AdminPanel {developers/users}”