Jump to content

Class PDO not found in var/www/html/


Go to solution Solved by Genexys,

Recommended Posts

Php version : 7.2.24

Os:Linux Mint

HttpServer:Apache2

 

Here it is I have a local web server that I'm trying to handle mysql databases with PDO,but I get "Class pdo not found",php7.2-pdo is installed and activated but not loaded,I think I found where the problem is,pdo's extensions are in different directory than usual "usr/include/php/XXXXX/ext/pdo" where "XXXXX" is a number,but I run a phpinfo page the modules that are loaded are in  /etc/php/7.2/apache2/conf.d

Even if I make sure that extension_dir points to my extensions files it still doesn't work

I need some help to fix that,Thanks in advance!!

 

 

 

 

Link to comment
Share on other sites

I'm not familiar with Mint, but here are some things to check in your phpinfo output.

  • extension_dir - Should specify /usr/include/php/XXXXX/ext if that is where your pdo.so file is located.  All your extensions should be in the same directory.
  • Scan this dir for additional .ini files - should specify /etc/php/7.2/apache2/conf.d which is where the configuration files for your extensions would be located.  There should be a file (or symlink) here for PDO, make sure it exists.
  • Additional .ini files parsed - Should list the files in the conf.d directory, and the PDO file should be in the mix.

If some part of that isn't true then either there's some configuration error to be sorted out or Mint just does things differently.

 

Link to comment
Share on other sites

  • Solution

Thanks! I've already solved the problem which was simply because I have two different directory in which there are extensions ,I just specified the one that appears in phpinfo page and all errors were gone,now I simply need some help to add videos path into mysql db to make a streaming website...well that's not the right section(^^) but since you're the only one that answers me,see you in the coding help section to give me some tips!

Edited by Genexys
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.