Mysql to mysql latest version

QuestionsMysql to mysql latest version
Gary asked 1 year 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 1 year ago

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

_________________________
Abu Ghufran - Dev Team
PHP Grid Framework
 
Gary answered 1 year 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 1 year 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
PHP Grid Framework
 
Your Answer

13 + 17 =

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 / 5. Vote count:

As you found this post useful...

Follow us on social media!

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

Let us improve this post!