Supermanzo Posted March 21, 2013 Share Posted March 21, 2013 Hello, i come from a 1.4.9 installation, i did a test upgrade and ran for some time a test 1.5.3.1. Seemed good and went live. After that i added a couple of other modules and all seemed ok. Now the site randomly without any apparent reason goes blank both in front and back office until i delete the class_index.php file. And i tried everything related to that in the forum and in the forge, but the problem is still present. I even payed a programmer in odesk and solved nothing. If anyone can give any help please please help me. Link to comment Share on other sites More sharing options...
Supermanzo Posted March 21, 2013 Author Share Posted March 21, 2013 I found out that this function in autoload.php // regenerate the class index if the requested class is not found in the index or if the requested file doesn't exists if (!isset($this->index[$classname]) || ($this->index[$classname] && !is_file($this->root_dir.$this->index[$classname])) || (isset($this->index[$classname.'Core']) && $this->index[$classname.'Core'] && !is_file($this->root_dir.$this->index[$classname.'Core']))) $this->generateIndex(); was triggered by something every second. The white page happens when trying to write the class_index.php file many times simultaneously and it corrupts (i tried pressing f5 on ftp and the size was changing like crazy). I understand that the autoload.php rewrites it only in case to update classes when something new is added to the site (so very rarely) but that function in my case have been corrupted. I disabled the regenerate index function, but if someone could help me find a solution to understand why this is corrupted and how to fix mantaining regenerate index function i would be happy. I compared my class_index.php to a default installation or github file and it has the same classes. Link to comment Share on other sites More sharing options...
Supermanzo Posted March 21, 2013 Author Share Posted March 21, 2013 I think this is of public interest cause i see all over the internet class_index.php and white page related bugs, and wrong rewriting issue many times are the problem. Link to comment Share on other sites More sharing options...
El Patron Posted March 21, 2013 Share Posted March 21, 2013 start here for blank page debug http://www.prestashop.com/forums/topic/224525-how-to-get-debug-information-for-500-error-or-blank-page/ Link to comment Share on other sites More sharing options...
Supermanzo Posted March 22, 2013 Author Share Posted March 22, 2013 Sorry, no output from the site, just white page, no errors. Link to comment Share on other sites More sharing options...
cocothecat Posted March 22, 2013 Share Posted March 22, 2013 If you get white pages AFTER installing modules I've found this to be a memory issue set by your host or server I've always added ini_set('memory_limit','128M'); To the bottom of config.inc.php located within the root config folder Link to comment Share on other sites More sharing options...
Supermanzo Posted March 22, 2013 Author Share Posted March 22, 2013 Not related to memory, the problem is fixed if you disable the regeneration in autoload.php, you can understand reading my second post. Link to comment Share on other sites More sharing options...
mrotacon Posted March 24, 2013 Share Posted March 24, 2013 I had this problem. Its because I had class files from the previous version of prestashop in some of the folders. It errors out because of duplicate function declarations, i.e. functions with the same name defined in previous files. Examples: do you have the file /classes/Shop.php if so - the files new path is /classes/shop/Shop.php If both files exist, functions defined in each are duplicated. There are numerous places this happens, Db.php being another. You would be able to see if you checked the tail end of your apache error log. I sorted it on my install by deleting the classes, controllers and override folders, and replacing with the ones from the 1.5.3.1 zip. After that - you will not get the class indexing issue. However, if you have edited any of these files, you will have to re-edit. The major issue here is the updater does not remove these files Link to comment Share on other sites More sharing options...
Recommended Posts