Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Problem in Drupal 6 after updating PHP version from 5.3 to 5.5

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 423
    Comment on it

    Drupal 6, Fatal error: Cannot redeclare class view in /var/www/html/mysite/profiles/drupal_commons/modules/contrib/views/includes/view.inc on line 19

    I had a working website in Drupal 6 and with PHP 5.3.5. But after updating my PHP version to latest one in Ubuntu 14.04, my website stopped working and started throwing issue like:

    "Fatal error: Cannot redeclare class view in /var/www/html/mysite/profiles/drupal_commons/modules/contrib/views/includes/view.inc on line 19"

    I tried to check my view.inc file and also checked for another declaration of the class but there was no problem of redeclaration.

    After some goggling I found that this problem is related to Xcache and Opcache. I also tried to disable these from *.ini files but these are required for some other projects like for Drupal 8 (However these changes didn't solve the problem).

    After few more searching I found a better way, which is to update .htaccess file and it worked perfectly. So just add following lines to your project's .htaccess file:

     

    <IfModule mod_php5.c>
      php_value xcache.cacher Off
      php_value xcache.size 0
      php_value xcache.stat Off
    </IfModule>

    After this change, my site started working. However there were more problems related to some modules and caching setting but I was able to resolve these because I was able to access my site and admin setting pages.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: