Cron job not working Ubuntu Lemp stack

I have a problem getting a cron job to work with my Lemp stack. I have a tracker installed (CPVLab) that requires two php scripts run with cron jobs. One appears to be working with wget and url to php script. I can see start and finished entries in CPVLab error log. I tried running the other cron job with wget but it starts and never finishes then gives php errors., I am now trying this syntax: */15 * * * * php -f /var/www/ This gives the same problem, starts then does not finish. CPVLab is encoded with ioncube but maybe that’s not the issue here. Advice much appreciated. Thanks


Copied the ini file as suggested now works… thank you!

Thanks so much for your help. Found the .ini file but was located in /etc/php5/fpm I should copy to: /etc/php5/cli/conf.d/ corroct?

@zx1905cc Oh, a LEMP stack uses php5-fpm so you’ll find the ini file in /etc/php5/fpm/conf.d.

Thanks for reply

/etc/php5/ " apache2 not at this location" and /etc/php5/cli/conf.d/. does not contain an ioncube.ini file I built the Lemp stack using “easy engine” is the file structure different? Learning as I go here!

@zx1905cc I’m guessing that the ioncube loader extension is configured for php5-fpm/mod_php but not the cli version of PHP. You’ll need to copy the ioncube.ini file from /etc/php5/apache2/conf.d/ to /etc/php5/cli/conf.d/.

Thanks for reply Hmm interesting…when I paste the command manually in a terminal I get an ioncube loaders error. My says that ioncube is installed but clearly there is an error somewhere.

Does running the command manually work? php -f /var/www/

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Try using the full PHP CLI path,

 */15 * * * * php -f /var/www/

Also this Q&A might have a solution -