Mysql to mysql latest version

QuestionsMysql to mysql latest version
Gary asked 7 years ago

Hi Abu, I am having to move my sites hosting to another provider who run php7, as I understand this doesn’t work with mysql code. I have the latest version of phpgrid but am having lots of issues when trying to upgrade my old phpgrid version. Can you tell me the files I should be replacing to move from old to new?

3 Answers
Abu Ghufran Staff answered 7 years ago

Simply override `lib/inc` & `lib/js` from latest build to the phpgrid folder in previous implementations.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Gary answered 7 years ago

Thank you, I tried that but throws errors everywhere. I notice in my old version the connection code is different, maybe thats it?
//old version
// include db config
include_once(“../config.php”);
// set up DB
mysql_connect(PHPGRID_DBHOST, PHPGRID_DBUSER, PHPGRID_DBPASS);
mysql_select_db(PHPGRID_DBNAME);
 
//new version
// include db config
include_once(“../../config.php”);
// include and create object
include(PHPGRID_LIBPATH.”inc/jqgrid_dist.php”);
// Database config file to be passed in phpgrid constructor
$db_conf = array(
“type” => PHPGRID_DBTYPE,
“server” => PHPGRID_DBHOST,
“user” => PHPGRID_DBUSER,
“password” => PHPGRID_DBPASS,
“database” => PHPGRID_DBNAME
);
Is the latest version the best to use?

Abu Ghufran Staff answered 7 years ago

PHP7 does not support mysql_* functions and removed them from php.
So you need to remove them from code and change it with new $db_conf setting.
Also make sure you set PHPGRID_DBTYPE to “mysqli” in ../../config.php file. (i added after mysql – mysqli)

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

10 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?