Error on Homepage

The site was working fine for a week then i got this today
Fatal error: Class ‘PDO’ not found in /home/nanaport/public_html/primary/index.php on line 33

What went wrong? Is it a bug in gibbon’s code or php 5.4.31

Steve, PDO is the class that Gibbon uses to establish secure, flexible database connections. It comes preinstalled with PHP mostly, but I have seen distros and upgrades that do not include it. Without, you will get this error.

Can you put <?php phpinfo() ?> (http://php.net/manual/en/function.phpinfo.php) in a new file on your server, and check the output for mention of PDO.

What OS/version are you using?

I use a linux hosting and gibbons 8.0.02

I uploaded the info file and it shows pdo installed and enabled. Please review the result here http://nanaportal.com/info.php

Steve, what Linux distro and version? It is a shared server, or dedicated? Can you please try and put info.php in the subdomain that is having the problem? e.g. secondary.nanaportal.com, and see if PDO is still installed.

I’ve moved it to the secondary subdomain. I’m not sure the distro is important cos i’m on a shared linux server and all shows pdo is installed. I use a mac 10.9.3 and all was well till i uploaded it online. Please see http://secondary.nanaportal.com/info.php

Steve, if you can turn on error reporting on the secondary sub domain, then we can see what the actual error is. Thanks!

Yes i turned error reporting on for the entire server, even had to do it specifically for the secondary subdomain. Strange thing is i see no errors on d page.

Yes i turned error reporting on for the entire server, even had to do it specifically for the secondary subdomain. Strange thing is i see no errors on d page.

If you replace Gibbon’s index.php with an index.php page with an error in its code (e.g. <?php asdfdfg ?> does it give you an error message?

Still the same. I may have to re-upload the entire site!

i just re-uploaded the site and all works well now. Phew. Wonder what went wrong

i just re-uploaded the site and all works well now. Phew. Wonder what went wrong

Excellent. Some times FTP has upload errors: only takes one file error to bring the system down. Should be very rare though.

I ran into this problem just now. The site was working fine until today. I didn’t do anything to the site. Below is the error code. Please show me the instruction to fix it.

[19-Mar-2024 07:47:54 UTC] PHP Fatal error: Uncaught Error: Class ‘PDO’ not found in /home/vui7whtevve1/public_html/sinfosys/src/Database/MySqlConnector.php:51
Stack trace:
#0 /home/vui7whtevve1/public_html/sinfosys/gibbon.php(80): Gibbon\Database\MySqlConnector->connect(Array)
#1 /home/vui7whtevve1/public_html/sinfosys/index.php(38): require_once(‘/home/vui7whtev…’)
#2 {main}
thrown in /home/vui7whtevve1/public_html/sinfosys/src/Database/MySqlConnector.php on line 51

I was able to find out that the PHP extensions of my hosting were outdated. And I have hosting agent updated them in backend and now I can load the site.

Hi @wrkvstal, welcome to the Gibbon forums. Thanks for sharing your solution, which may help anyone else who encounters the same error.