ZF-12171: My batch stops without error and exception only when i launch it with crontab



I have a very strange problem with my batch. It works perfectly when i launch it manually but it stops without any notice, error or exception in the "foreach" when i launch the batch by crontab (i am on Ubuntu).

Algo of my batch: 1°) Get a list of uri from database (Mysql) 2°) Foreach on the uris: 2.1°) Download the file (pdf) from the URI (i use Zend_Http_Client to download the file) 2.2°) Insert the pdf file in the database (in binary)

I have try to comment the lines where i download the file (the lines with Zend_Http_Client) and i have no more problem with the foreach. So, i think that the problem is cause by the composant Zend_Http_Client.

//Initialisation $this->_httpClient = new Zend_Http_Client();

    $config = array('maxredirects'    => 5,
                    'timeout' => 10, 
                    'strictredirects' => false,
                    'useragent'       => 'Zend_Http_Client',
                    'keepalive'       => false);

// the request in the foreach $this->_httpClient->setUri($uri); $response = $this->_httpClient->request('GET');

Thank you for help and sorry for my very bad english!


I'm closing this as an incomplete because of the lack of an error message.

Please re-run your script, setting error_reporting to -1, and display_errors on, so that any errors are caught (and rule out things like timeouts, out of memory etc)

If you have an error message after that, which relates to Zend_Http_Client, please re-open, and add further information.