We are getting the below error on website, site is hosted on a cPanel server. We tried to switch to older PHP version PHP 5.3 and PHP 5.2 but the error still persists. Let us know how to fix the below error.
ERROR 2: get_class() expects parameter 1 to be object, integer given
0 Error occurred on in function get_class
1 called from line 589 of file DB.php in function isError
2 called from line 550 of file DB.php in function connect
3 called from line 92 of file functions.php in function check_db
4 called from line 616 of file session.php in function require_once
5 called from line 69 of file config.php in function require_once
6 called from line 28 of file index.php
Warning: get_class() expects parameter 1 to be object, integer given in /home/beritsyn/public_html/family/DB.php on line 589
ERROR 2: get_class() expects parameter 1 to be object, integer given
0 Error occurred on in function get_class
1 called from line 589 of file DB.php in function isError
2 called from line 550 of file DB.php in function connect
3 called from line 92 of file functions.php in function check_db
4 called from line 616 of file session.php in function require_once
5 called from line 69 of file config.php in function require_once
6 called from line 28 of file index.php
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are running PhpGedView version 4.2.4. You should be using version 4.3.0 (the "SVN" version). The current SVN version number is 7138.
Download the latest version from the SourceForge SVN repository, and unzip the ZIP file on your local PC. You can download from the GIT repository if you wish, but the GIT repository does not retain the SVN version numbers, so it will be more difficult to help you in the future.
On your server, make a backup copy of the entire PhpGedView directory as well as the database.
On your server, delete everything in the PhpGedView directory except file config.php and directories index and media.
Copy the downloaded PhpGedView (the "SVN" version) to your server's PhpGedView directory, except for directories index and media. There will not be a config.php file.
Delete the modules you aren't using. On my system, I only keep the GEDFact_assitant, JWplayer, lightbox, and slideshow modules.
If you wish, you can delete the language files for languages your site doesn't support, but you MUST keep the English files.
Set the file and directory permissions. Everything should have 755 permissions, except for directories index and media and their contents. These should have 777 permissions.
Launch the updated PhpGedView, log in as site administrator, and IMMEDIATELY go to the Manage GEDCOMS page and export the database. Then, import the just-exported GEDCOM. This action will ensure that the various indexes are correctly populated. There's no need to go through the download-and-upload procedure.
If everything is running properly, you can delete the backup copies you made earlier.
Last edit: Gerry Kroll 2016-08-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
We are getting the below error on website, site is hosted on a cPanel server. We tried to switch to older PHP version PHP 5.3 and PHP 5.2 but the error still persists. Let us know how to fix the below error.
site : http://norwayrelatives.com/family/
ERROR 2: get_class() expects parameter 1 to be object, integer given
0 Error occurred on in function get_class
1 called from line 589 of file DB.php in function isError
2 called from line 550 of file DB.php in function connect
3 called from line 92 of file functions.php in function check_db
4 called from line 616 of file session.php in function require_once
5 called from line 69 of file config.php in function require_once
6 called from line 28 of file index.php
Warning: get_class() expects parameter 1 to be object, integer given in /home/beritsyn/public_html/family/DB.php on line 589
ERROR 2: get_class() expects parameter 1 to be object, integer given
0 Error occurred on in function get_class
1 called from line 589 of file DB.php in function isError
2 called from line 550 of file DB.php in function connect
3 called from line 92 of file functions.php in function check_db
4 called from line 616 of file session.php in function require_once
5 called from line 69 of file config.php in function require_once
6 called from line 28 of file index.php
You are running PhpGedView version 4.2.4. You should be using version 4.3.0 (the "SVN" version). The current SVN version number is 7138.
Download the latest version from the SourceForge SVN repository, and unzip the ZIP file on your local PC. You can download from the GIT repository if you wish, but the GIT repository does not retain the SVN version numbers, so it will be more difficult to help you in the future.
On your server, make a backup copy of the entire PhpGedView directory as well as the database.
On your server, delete everything in the PhpGedView directory except file config.php and directories index and media.
Copy the downloaded PhpGedView (the "SVN" version) to your server's PhpGedView directory, except for directories index and media. There will not be a config.php file.
Delete the modules you aren't using. On my system, I only keep the GEDFact_assitant, JWplayer, lightbox, and slideshow modules.
If you wish, you can delete the language files for languages your site doesn't support, but you MUST keep the English files.
Set the file and directory permissions. Everything should have 755 permissions, except for directories index and media and their contents. These should have 777 permissions.
Launch the updated PhpGedView, log in as site administrator, and IMMEDIATELY go to the Manage GEDCOMS page and export the database. Then, import the just-exported GEDCOM. This action will ensure that the various indexes are correctly populated. There's no need to go through the download-and-upload procedure.
If everything is running properly, you can delete the backup copies you made earlier.
Last edit: Gerry Kroll 2016-08-16