• 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

KeVo

Active member
#1
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:

KeVo

Active member
#3
That error occurs when code attempts to redeclare a class name. Does this occur with add-ons disabled?
I added the following to my config file after your suggestion.

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

Mike

XenForo developer
Staff member
#4
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).
 

KeVo

Active member
#5
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).
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.