How to solve Drupal 7 installation issues in Hostgator shared hosting server?

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

Thats all.

Now, the drupal 7 works fine.

Thanks to following links
http://kb.siteground.com/how_to_have_different_php__mysql_versions/
http://support.hostgator.com/articles/hosting-guide/hardware-software/php-5-3
http://stackoverflow.com/questions/12946835/directive-allow-call-time-pass-reference-warning

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s