DATAGRID connection PROBLEM in PHP 7.2

Talk about installation process and problems

Moderator: alexandrleonenko

pumpel
Newbie
Newbie
Posts: 3
Joined: Oct 23rd, '18, 08:18

DATAGRID connection PROBLEM in PHP 7.2

Postby pumpel » Oct 23rd, '18, 08:46

My webhotel/provider has now changed to version PHP 7.2.
For many years I've been using the PHP 5.6-version, where DATAGRID functions without problems.

BUT NOW - after the change from PHP 5.6 to PHP 7.2 there's problem with "connecting my DATAGRID to my MySQL-database".

When I run the following

define ('DATAGRID_DIR', "datagrid/");
require_once (DATAGRID_DIR.'datagrid.class.php');
$sql = 'SELECT ID,fornavn, etternavn, tlf, mail, paameldingsdato FROM baattur';
$default_order = array('fornavn'=>'ASC');
$dgrid->DataSource('PDO','mysql', $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS, $sql, $default_order);


I get the following error on the last line (line 79):

"
Fatal error: Uncaught Error: Call to a member function DataSource() on null in /customers/9/b/8/tromsoo.com/httpd.www/baattur/test2.php:79 Stack trace: #0 {main} thrown in /customers/9/b/8/tromsoo.com/httpd.www/baattur/test2.php on line 79
"

What could be wrong?



Just forget it.
I've solved the problems.

Thanks
Last edited by pumpel on Oct 26th, '18, 10:32, edited 2 times in total.

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

Re: DATAGRID connection PROBLEM in PHP 7.2

Postby administrator » Oct 23rd, '18, 13:01

Use PDO extension for connection. PEAR will not work for you on PHP7
viewtopic.php?f=10&t=5418

pumpel
Newbie
Newbie
Posts: 3
Joined: Oct 23rd, '18, 08:18

Re: DATAGRID connection PROBLEM in PHP 7.2

Postby pumpel » Oct 24th, '18, 12:33

Question:
I've installed version 8.2.7 of DATAGRID.
When I run the following

define ('DATAGRID_DIR', "datagrid/");
require_once (DATAGRID_DIR.'datagrid.class.php');
$sql = 'SELECT ID,fornavn, etternavn, tlf, mail, paameldingsdato FROM baattur';
$default_order = array('fornavn'=>'ASC');
$dgrid->DataSource('PDO','mysql', $DB_HOST, $DB_NAME, $DB_USER, $DB_PASS, $sql, $default_order);


I get the following error on the last line (line 79):

"
Fatal error: Uncaught Error: Call to a member function DataSource() on null in /customers/9/b/8/tromsoo.com/httpd.www/baattur/test2.php:79 Stack trace: #0 {main} thrown in /customers/9/b/8/tromsoo.com/httpd.www/baattur/test2.php on line 79
"

What could be wrong?


Just forget it.
I've solved the problems.

Thanks
Last edited by pumpel on Oct 26th, '18, 10:32, edited 2 times in total.

MichaelBus
Newbie
Newbie
Posts: 1
Joined: Oct 18th, '18, 09:40

Re: DATAGRID connection PROBLEM in PHP 7.2

Postby MichaelBus » Oct 25th, '18, 11:25

What does the PDO extension do that PEAR can't?

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

Re: DATAGRID connection PROBLEM in PHP 7.2

Postby administrator » Oct 25th, '18, 14:29

It's much better, faster and secure.
Please read this:
https://github.com/vladykin/miaow/issues/9

colbymartin
Newbie
Newbie
Posts: 1
Joined: May 25th, '19, 16:34

Re: DATAGRID connection PROBLEM in PHP 7.2

Postby colbymartin » Jun 25th, '19, 07:14

BUT NOW - after the change from PHP 5.6 to PHP 7.2 there's problem with "connecting my DATAGRID to my MySQL-database". When I run the ...
Migrate Databases to the Cloud. 5X the Performance of MySQL, 3X of PostgreSQL. Open source-compatible fast, scalable, secure, and reliable database.
A how do you get bunions, albeit common, can be a frustrating foot condition to deal with. However, with the right self-care strategies and some diligence on your part, most people can manage their what can you do for bunions well.


Return to “Installation”