Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Class 'PDO' not found #420

Open
0xmaayan opened this issue Aug 9, 2020 · 1 comment
Open

Uncaught Error: Class 'PDO' not found #420

0xmaayan opened this issue Aug 9, 2020 · 1 comment

Comments

@0xmaayan
Copy link

0xmaayan commented Aug 9, 2020

using
new PDO('mysql:host=localhost;dbname=db_name', $user, $pass);

getting Uncaught Error: Class 'PDO' not found.

when echo phpinfo() I don't see PDO on the Configuration section.
on the terminal when doing php -m I do see PDO.

What am I missing?

@reddingwebpro
Copy link

Hello, I just saw this post, and it's probably too late. But there are different configuration files for the command line and the PHP running on Apache. That is why when you do the php -m from the commandline you see it. When looking at the echo php() output, you'll see the location of the php.ini being loaded, go into there and you can enable PDO. Be sure to sudo service apache2 restart to make the setting take effect.

Also, since it seems like Nick has abandoned this product, I'd like to direct you to my variation called Cognac box, which you can find at: https://github.com/reddingwebpro/cognacbox -- it is running currently supported versions of both Ubuntu and PHP which might provide for a better experience and I actively monitor the issue forum over there. We just released another version with more patches yesterday. Best of luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants