Jump to content

1.5.3.1 After 1 month use cannot solve white page in both front and back office


Recommended Posts

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

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

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

×
×
  • Create New...