Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm having problems using cron to run a encrypted php file. The file is encrypted using Source Guardian v8.0 and i can run it successfully when i call th script directly from the browser. The frequency is to run every 24 hours and i'm testing by setting this to every 5 minutes so i can test it quickly. The frequency works ok and im getting the emails to the email address i specify in the job.

my emails contain this:

X-Powered-By: PHP/5.3.26
Content-type: text/html

but the resultant script(which updates a db table) is not running.

My web host (shared hosting) advised i use:

php -c /home/myUserName/public_html/path/to/my/daily/repeated/script.php

Source Guardian Support suggest full paths and specifying the php.ini path, thus:

/usr/local/bin/php -c /usr/lib/php.ini -f /home/myUserName/public_html/path/to/my/daily/repeated/script.php

Previously i was using:

php /home/myUserName/public_html/path/to/my/daily/repeated/script.php

Nothing seems to run this script!! with/without switches; full paths or not ... any suggestions appreciated

share
    
Try manually running the command on the console to check for errors. –  marven 2 mins ago
    
Sounds like you haven't configured the Source Guardian loader in the php.ini for CLI, only in the php.ini for the webserver. –  Barmar 37 secs ago
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.