December 25, 2013

When we install Drupal 8 we get a Magic Quotes error. In this article, we are going to discuss about, How to solve the Magic quotes error in Drupal 8 installation. Drupal 8 does not support PHP 5.2. It supports only PHP 5.3. Because support for PHP 5.2 ended in September 2011. Most of the hosting companies still not updated their PHP version. Still they are using PHP 5.2. So when we trying to install Drupal 8 in those hosting environment, we will produces the below error message.

PHP's 'magic_quotes_gpc' and 'magic_quotes_runtime' setting are not supported and must be disabled.

Here are the steps to solve the Magic Quotes error.

Step 1 : Create php.ini file

Create a php.ini file in the root folder of your drupal 8 and add the below codes in the php.ini file.

magic_quotes_gpc = Off
extension=pdo.so
extension=pdo_mysql.so

It will not required you to ask your hosting company to change the php.ini. you can create your own php.ini and use it for your website.

Step 2 : Edit the .htaccess file

After creating the php.ini file, open the .htaccess file and add the below codes to use your own php.ini file.

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/username/public_html/Drupal8folder
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>

Step 3 : Recheck

Now try to install Drupal 8. It will not produces any magic_quotes error. 

2 comments:

  1. Installing drupal 8 have many error in first time so here define solving the error in drupal 8 installation in detail.

    ReplyDelete
    Replies
    1. Can you provide, what are the errors you got when you installing the Drupal 8. So that I can provide solution for that...

      Delete