Hi,
I'm coming to install drupal on centos 5.5
I installev cia fantastico
and get the error message
"Fatal error: Class 'PDO' not found in /home/stu/public_html/drupal/includes/database/database.inc on line 185"

so visiting install.php i get

OK Web server Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
OK PHP 5.2.9
OK PHP register globals Disabled
Error PHP extensions Disabled
Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):
  • gd
  • pdo
Error Database support Disabled
Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension. See the system requirements page for more information.
OK PHP memory limit 128M
OK File system Writable (public download method)
Warning Unicode library Standard PHP
Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.
OK Settings file The ./sites/default/settings.php file exists.
OK Settings file The settings file is writable.

I have followed info on other support forums
updated cent os
downloaded and attempted to install the extentions
ended up with a message saying "nothing to do"
so asuming that means already installed.

Added
"
extension="pdo.so"
extension="pdo_mysql.so"
upload_max_filesize = 10M
post_max_size =64M
memory_limit = 64M
upload_tmp_dir = 64M
max_execution_time = 128

"
in a seperate php.ini file.
added
extension="pdo.so"
extension="pdo_mysql.so"
with and without the " as different support forums had the " in.
no difference.
Have restarted the server each time i made a change.

Still getting the same error message,
tho i increaced the max file size to 128m
and that changed on the phpinfo.php file so believe i've edited the correct file.

php info file shows ini file to be located
/usr/local/lib/php.ini

any suggestions?

Comments

sean conner’s picture

I encountered the same problem:

I put a php.ini file in the root folder with this text:

memory_limit = "128M"
register_globals = Off
extension="pdo.so"
extension="pdo_mysql.so"
upload_max_filesize = 10M
post_max_size =64M
memory_limit = 64M
upload_tmp_dir = 64M
max_execution_time = 128

And still get exactly the same problem. Even the Memory limit problem of 24M! What am I doing wrong and is there a durable solution now?

The bigger you think the more you achieve! :)

raees_afridi’s picture

I have problem in installing drupal

Error
PHP extensions Disabled
Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):
gd

Please solve this problem if anyone know...

Thanks

Raees Khan Afridi

http://www.peshawarcomputers.com
University of Peshawar, Pakistan.

zutou’s picture

familiar with your question ! wait for the reply !

Only local images are allowed.

I have been dealt a good hand in life, now I am just looking for a

few more cards!

TanvirAhmad’s picture

I just did the following....

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

t@n

sharmishtha’s picture

Did anyone got the solution? If yes, please post it.

amitgoyal’s picture

I was having the same problem when installing Drupal 7 on Ubuntu. After lot of searching on Google I found that we shouldn't install Pdo packages using Pear or Pecl.

As mentioned here, http://drupal.org/requirements/pdo, "Do not use the PECL PDO installer". So if those are already installed using Pecl then uninstall using following commands,

sudo pecl uninstall pdo_mysql
sudo pecl uninstall pdo
sudo apt-get install --reinstall php5-common php5-mysql
sudo /etc/init.d/apache2 reload

After that add the following in php.ini if these are not there,
extension=pdo.so
extension=pdo_mysql.so

Restart apache (sudo /etc/init.d/apache2 reload) and it should work for you as the same steps worked for me. :)

LoopGaroo’s picture

i did the sudo apt-get install --reinstall php5-common php5-mysql bit and restarted the server. as the only issue drupal install mentioned was the php extensions bit. it really did the job!

thanks a million your post is truly priceless!

mar111’s picture

Solution:

$ sudo apt-get install php5-gd php-db php5-mysql

For my its work !!

rubbeng’s picture

Thaks works for me!

ruben

ckeeran’s picture

I tried most of the other solutions in this post and the only one that resolved my PHP extension issue was $ sudo apt-get install php5-gd php-db php5-mysql

jomarocas’s picture

thanks its works for me

suhas chikkanna’s picture

Hi,

I have tried my best to co-relate the above solution to windows.....Does anyone knows to deal with the same problem in windows ?? As i am facing the same issue on windows XP. Thanks .

bawoor’s picture

whats web environment you are using? Make sure to activates PDO and GD modules/libraries at the server.

ꦱꦠꦽꦶꦪ

suhas chikkanna’s picture

Hi Bawoor,

Thanks for the reply. The concern is resolved now. After activating the PDO & GD modules in the php.ini file . Thanks you so much once again!!!!. :)

Tayyabkhan’s picture

Hi

Actually problem is only that you have not installed PHP5 GD and PDO Modules or not placed entry in "/etc/php5/conf.d/".
There enable entry files are auto generated when you install the Modules, if not for some reason you will have to place them as well.

Ubuntu:

            sudo apt-get install php5-gd php5-pdo -y

RHEL/CentOS:

            yum install php5-gd php5-pdo -y

Check If gd.ini and pdo.ini files are not created

            ls  /etc/php5/conf.d/

If files not found then just create files

1. First file

cd /etc/php5/conf.d/
vi gd.ini

Text in file.

             ; configuration for php GD module
             extension=ge.so

2. Second file

cd /etc/php5/conf.d/
vi pdo.ini

Text in file

  
             ; configuration for php PDO module
             extension=pdo.so

Tayyab Khan

dominicthma’s picture

While installing Drupal 8 on Windows 7/8 an error message shows up " Error PHP extensions Disabled
Drupal requires you to enable the PHP extensions in the following list....."

I have solved the above specified error by adding the following line in the PHP.INI file :

extension=php_fileinfo.dll

then save it and restart the apache---- Its done.... thanks

Rudenko’s picture

Hi, I faced an issue installing Drupal 7.31 under Windows XP.

The environment configuration is
Web server Apache/2.2.17 (Win32) PHP/5.3.5
PHP 5.3.5

The problem:
MBSTRING

Unicode library Standard PHP
Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.

I am not going to use Japanese or Chinese or any other language, which might require mbstring. But OK - I've enabled the extension (and restarted Apache for changes to come in force). It didn't help. There is also [mbstring] section in php.ini, where all preferences are currently commented out. Which of those should I enable? Or should I pay any attention to the warning above if I'm not going to use Japanese etc.?

Francewhoa’s picture

Another solution for "PHP extensions Disabled" GD at https://www.drupal.org/node/2386065

---
How to contribute to Drupal.

derkhadim’s picture

Thank you