Coplestone Posted November 22, 2015 Share Posted November 22, 2015 Hello Guys,I have an interesting issue in Magento. After a site backup and transfer onto a new domain the front-end of my website loads fine, however when I try to navigate to:domain.com/index.php/adminI get a white page. I have enabled debugging mode and it displays this error: 1 Array ( [type] => 64 [message] => Cannot redeclare class Mage_Admin_Model_Session [file] => /var/www/vhosts/domain.co.uk/sub-domain.co.uk/includes/src/__adminhtml.php [line] => 504 ) Since finding this new error, I've tried to comment/remove every class that it cannot redeclare in the __adminhtml.php file, one by one.. Only to find that by the time I've commented them all out and refreshed the admin page, it gives no error whatsoever. Just a white page.Any ideas?Any help is much appreciated. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 22, 2015 Share Posted November 22, 2015 (edited) the problem's not in the actual code. it's in the environment where the code is running. the code suddenly didn't alter itself and start including/requiring the same class definition multiple times just because you moved where it is running. the code is probably trying to load same-name classes, but from different locations, and it or php cannot build or resolve the different locations correctly. some suggestions - 1) make sure that the php include_path setting is the same between the old and new system and that is whatever is suggested by magento. 2) the code may be trying to use set_include_path()/ini_set() statements to control where it's telling php to search for files, but those functions are either disabled on the new server or the path separator character being used is hard-coded and doesn't match the usage for the operating system (this would only be the case if you switched to/from a Windows/non-windows operating system.) 3) php has had a few bugs involving file paths for included/required files. check the php bug reports for the php version being used and the php change log for versions higher than your version, to see if this may be the case. 4) i saw references to caching/'compiled' code when doing a search for this general error. make sure that any sort of php bytecode caching/accelerator/APC files that came from the old system have been deleted. perhaps there's a bug in the cache 'hit' logic and the actual php file and the cached/'complied' php code are both being included/required. Edited November 22, 2015 by mac_gyver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.