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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.