tixastronauta tixastronauta - 4 months ago 25
PHP Question

PHP Fatal error: Cannot call overloaded function for non-object

I've been seeing a lot of this errors on my apache error_log.

My setup:

  • I have 15 different websites that use the same PHP helpers repository (located in /usr/share/myphphelpers/helpers.php

  • On each website I call the helpers.php file via require_once('/usr/share/myphphelpers/helpers.php')

  • This error occurs on a specific function - all websites call this function (the event is user-triggered)

Could this be because all websites use the same resource file/function? What can I do?

Thank you in advance


Although I'm not yet sure of what portion of code was triggering this error, I know it was caused by server overload.

I had two m1.small Amazon instances running under a Load Balancer but they could not handle all the traffic. Adding another instance solved the problem.