I installed Drupal 7 in a hostgator shared hosting server.
It used PHP 5.2
After installing Drupal 7, it throwed the following error.
PHP Fatal error: Class ‘PDO’ not found in /home/vncbishw/public_html/zha/quotelect/includes/database/database.inc on line 184
The error.log inside the drupal installation directory said as
[01-Dec-2013 22:06:17] PHP Warning: PHP Startup: Unable to load dynamic library ‘/opt/php53/lib/php/extensions/no-debug-non-zts-20090626/pdo_mysql.so’ – libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
[01-Dec-2013 22:06:17] PHP Fatal error: Class ‘PDO’ not found in /home/vncbishw/public_html/zha/quotelect/includes/database/database.inc on line 184
[01-Dec-2013 22:06:49] PHP Warning: PHP Startup: PDO: Unable to initialize module
How to solve this?
We have to enable PHP 5.4
Type the following in .htaccess file inside drupal installation folder.
AddType application/x-httpd-php54 .php
AddHandler application/x-httpd-php54 .php .php5 .php4 .php3
Checked the drupal site in browser.
Now it gave different error.
PHP Fatal error: Directive ‘allow_call_time_pass_reference’ is no longer available in PHP in Unknown on line 0
To solve this, Turn off the value of allow_call_time_pass_reference in php.ini file.
In the php.ini file in drupal directory, change as below.
allow_call_time_pass_reference = Off
Now, the drupal 7 works fine.
Thanks to following links