<p>It sounds like the host switched PHP versions and didn’t enable some of the required modules. See <a href="https://stackoverflow.com/questions/32256416/pdo-not-working-in-godaddy-server">this answer</a> for a way to get them enabled again.</p>
<p>It’s also possible that the PHP version (and therefore the loaded modules) are different for HTTP requests and the CLI. How did you run the server check scripts?</p>
<p>The DB connection test script doesn’t use the PDO driver, internally, so while it does establish that the database is <em>reachable</em>, it doesn't simulate how Craft would actually connect to it.</p>

CC BY-SA 4.0
2024-07-02T21:54:57.023Z
Thanks for your answer — because GoDaddy insisted it was a DNS issue I uploaded the server check manually using the file manager in cpanel, then accessed in a browser. So I don’t think that can be it. I also checked the PHP version, noticed that various PDO modules were disabled, and reenabled them, but that didn’t fix it.
mitrol
CC BY-SA 4.0
2024-07-03T10:15:17.037Z
Thanks again. I downgraded from 8.3 to 8.2, doing so disabled some modules, so I reenabled them and it all came back up. 
mitrol
CC BY-SA 4.0
2024-07-02T21:15:50.077Z
2024-07-02T21:15:50.077Z
August Miller
<p>I have a client with a Craft 4 site on GoDaddy. I’m not thrilled with the hosting, but it has been working fine for months/years.</p>
<p>Suddenly, it’s showing an internal server error message on the front-end, and the admin panel.</p>
<p>The exact error in the logs is:</p>
<pre><code>2024-07-02 00:00:00 [web.ERROR] [craft\db\Connection::open] Class &quot;PDO&quot; not found {&quot;memory&quot;:13896368}
2024-07-02 00:00:00 [web.ERROR] [craft\base\ApplicationTrait::getIsDbConnectionValid] There was a problem connecting to the database: Craft CMS can’t connect the the database. {&quot;memory&quot;:13920368}
</code></pre>
<p>There are a few other lines but basically it repeats over and over.</p>
<p>GoDaddy insist it’s a DNS issue :| I’m no expert, but that looks like a DB connection problem to me.</p>
<p>Here’s where I’m confused:</p>
<p>I’ve run the server check: <a href="https://github.com/craftcms/server-check" rel="nofollow noreferrer">https://github.com/craftcms/server-check</a> and it passes everything.</p>
<p>I’ve also run the db connection test suggested in the Craft troubleshooting guide: <a href="https://gist.github.com/mattstein/c4a42e16989bcd488ce969d96fc8598b" rel="nofollow noreferrer">https://gist.github.com/mattstein/c4a42e16989bcd488ce969d96fc8598b</a> it comes back with &quot;------------------------------------------------ Database Connection Test PHP 8.3.8 DB driver: mysql ------------------------------------------------  Connected and found 109 tables.&quot;</p>
<p>So the server seems OK, the connection details are fine and the database is accessible, and it was working fine until Friday, when it just broke.</p>
<p>Any suggestions for something I can check next would be gratefully received.</p>
<p>At this point I’m close to just resetting the server and reinstalling the whole thing.</p>

<database><error-message><error><connection>
Baffled by connection issue
# Baffled by connection issue

(Asked by: username_0 on 2024-07-02)

I have a client with a Craft 4 site on GoDaddy. I’m not thrilled with the hosting, but it has been working fine for months/years.
Suddenly, it’s showing an internal server error message on the front-end, and the admin panel.
The exact error in the logs is:
2024-07-02 00:00:00 [web.ERROR] [craft\db\Connection::open] Class "PDO" not found {"memory":13896368}
2024-07-02 00:00:00 [web.ERROR] [craft\base\ApplicationTrait::getIsDbConnectionValid] There was a problem connecting to the database: Craft CMS can’t connect the the database. {"memory":13920368}

There are a few other lines but basically it repeats over and over.
GoDaddy insist it’s a DNS issue :| I’m no expert, but that looks like a DB connection problem to me.
Here’s where I’m confused:
I’ve run the server check: https://github.com/craftcms/server-check and it passes everything.
I’ve also run the db connection test suggested in the Craft troubleshooting guide: https://gist.github.com/mattstein/c4a42e16989bcd488ce969d96fc8598b it comes back with "------------------------------------------------ Database Connection Test PHP 8.3.8 DB driver: mysql ------------------------------------------------  Connected and found 109 tables."
So the server seems OK, the connection details are fine and the database is accessible, and it was working fine until Friday, when it just broke.
Any suggestions for something I can check next would be gratefully received.
At this point I’m close to just resetting the server and reinstalling the whole thing.

**Tags:** database, error-message, error, connection


---

## 1 answers

### Answer by username_1 on 2024-07-02. Score: 2 | Accepted answer

It sounds like the host switched PHP versions and didn’t enable some of the required modules. See [this answer](https://stackoverflow.com/questions/32256416/pdo-not-working-in-godaddy-server) for a way to get them enabled again.

It’s also possible that the PHP version (and therefore the loaded modules) are different for HTTP requests and the CLI. How did you run the server check scripts?

The DB connection test script doesn’t use the PDO driver, internally, so while it does establish that the database is *reachable*, it doesn't simulate how Craft would actually connect to it.

> **Comments:**
> **username_0**: Thanks for your answer — because GoDaddy insisted it was a DNS issue I uploaded the server check manually using the file manager in cpanel, then accessed in a browser. So I don’t think that can be it. I also checked the PHP version, noticed that various PDO modules were disabled, and reenabled them, but that didn’t fix it.  
> **username_0**: Thanks again. I downgraded from 8.3 to 8.2, doing so disabled some modules, so I reenabled them and it all came back up.   

---

