Jump to content

Fatal Error when inserting product


Recommended Posts

Hi

I'm having this error each time I try to add / edit a product. It only happens on Info & image tabs though :

 

Fatal error: Maximum execution time of 60 seconds exceeded in /srv/web/htdocs/classes/Search.php on line 103

 

Running 1.4.5.1, but was also happening on 1.4.3

 

Its very painfull since I gotta wait the 60 sec timeout. Products always get added / edited despite the error message.

 

Please help !

mika

Link to comment
Share on other sites

  • 4 weeks later...

The only thing I can think of is looking at the search.php file. In my file line 103 shows just a preg_replace that would be unlikely to take very long.

 

If you are in a development environment you might also insert some debugging code in the file with which you display the values of the variables that are handled in this function. You could also insert some displays of the time to see which instruction takes longest. It might happen that you will see your debugging texts many times repeated: in that case the function is called many times.

 

I see you are a newbie just like me. So you may find it a bit much to jump into the code. But it might give you some clues with which to ask or search further.

Link to comment
Share on other sites

  • 2 weeks later...

Hi musicmaster

 

Thank you for your answer.

 

I finally commented the 'sanitize' function in seach.php and things are OK.

It's not very safe, but for now it will do.

Gotta post the issue to the forge, because I asked prestashop core developpers and even them couldn't fix it.

 

Your method was valid but as the error happens inside some nasty regexp, it is a nightmare to debug.

 

ow, and I'm not exactly a 'newbie" :),

Link to comment
Share on other sites

×
×
  • Create New...