Jump to content

Problem with cron job and SimpleXML


ayoksus

Recommended Posts

Hi,

I have a php page that need to be executed by cron job. However, I couldn't get the cron job works.

If I refresh the page manually, it works fine, but it doesn't work when I execute it through cron job. To find what's happened, I use set_error_handler function to send the error to my email. However, I don't understand what the error says.

Implicit cloning object of class 'SimpleXMLElement' because of 'zend.ze1_compatibility_mode' 

 

Could anyone tell me what's wrong??

Thanks,

ayok

Link to comment
https://forums.phpfreaks.com/topic/264639-problem-with-cron-job-and-simplexml/
Share on other sites

From what I remember about compatibility mode, it's basically a shim for running PHP 4 code in a PHP 5 installation. In the former objects were treated as values, and if you passed them to functions then any changes would be to a copy; in the latter objects are always references and changes would affect the original object. Compatibility mode reverts that behavior.

 

Try turning it off in your php.ini. Note that it could easily affect a lot of code so do a bunch of testing.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.