1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Cannot declare class XenForo_Autoloader

Discussion in 'Troubleshooting and Problems' started by KeVo, Aug 12, 2015.

  1. KeVo

    KeVo Active Member

    I'm receiving this error on the RC 2 of XF 1.5. Got it trying to upgrade my forum.

    Code:
    Fatal error: Cannot declare class XenForo_Autoloader, because the name is already in use in /home/nginx/domains/mydomain.com/public/library/XenForo/Autoloader.php on line 16
    
    Fatal error: Cannot declare class XenForo_Autoloader, because the name is already in use in /home/nginx/domains/mydomain.com/public/library/XenForo/Autoloader.php on line 16
    Help is appreciated. :)
     
    Last edited: Aug 12, 2015
  2. Jeremy

    Jeremy Well-Known Member

    That error occurs when code attempts to redeclare a class name. Does this occur with add-ons disabled?
     
  3. KeVo

    KeVo Active Member

    I added the following to my config file after your suggestion.

    Code:
    $config['enableListeners'] = false;
    
    Still getting this error when I try upgrading.
     
  4. Mike

    Mike XenForo Developer Staff Member

    Have you modified your config.php at all from what was automatically generated initially? There can be problems caused by that.

    Alternatively, there may be something unexpected happening with an opcode cache. If you have access, restart your PHP server (I'm guessing PHP-FPM).
     
  5. KeVo

    KeVo Active Member

    I decided to go ahead and use a backup. At the time of upgrading, I had my server running beta 3 of PHP7, so after I ran the backup, I down graded back to PHP 5.6.12 and it proceeded like a charm. Might not have been the issue, but that's the only thing different I did between the two times.
     

Share This Page