Reputation: 6155
On ZendFramework 2 I need to run a script via cron:
I have setup my cron as follows from Cpanel:
php /home/cloud/public_html/production/trunk/public/index.php invoke
which is run twice a day.
On checking my email, I get the following warning when the cron is invoked:
X-Powered-By: PHP/5.5.15
Set-Cookie: PHPSESSID=30c0ee6dd4c9b11c5c1bb716b802b352; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html
<br />
<b>Warning</b>: strpos(): Empty needle in <b>/home/cloud/public_html/production/trunk/vendor/zendframework/zendframework/library/Zend/Http/PhpEnvironment/Request.php</b> on line <b>518</b><br />
<br />
<b>Warning</b>: strpos(): Empty needle in <b>/home/cloud/public_html/production/trunk/vendor/zendframework/zendframework/library/Zend/Http/PhpEnvironment/Request.php</b> on line <b>524</b><br />
The script is not being invoked when the cron executes...
Upvotes: 0
Views: 444
Reputation: 6155
The following two posts helped solve this issue:
Essentially the issue is a hosting problem which is pretty easy to sort out, all I did was to change how I called my cron:
/usr/local/php /home/cloud/public_html/production/trunk/public/index.php invoke
Upvotes: 2