Quantcast
Channel: BitNami Answers - latest questions
Viewing all articles
Browse latest Browse all 2052

Cron job with lampstack

$
0
0

Hi

I'm trying to do a cron job with the lampstack, the commands that I use are:

crontab -e

59 4 * * * /opt/bitnami/php/bin/php /opt/bitnami/apache2/htdocs/test.php

ctrl-o (save)

ctrl-x (exit)

the code of the php script is very simple:

$var=fopen("test_file.txt","a+"); fwrite($var, "test string");

?>

I just want to do a test, the permissions are:

777 for test_file.txt
755 for test.php

the cron job don't works and if i try to send the simple command:

php /opt/bitnami/apache2/htdocs/test.php

the script runs but nothing is written on test_file.txt, where am I doing wrong?


Viewing all articles
Browse latest Browse all 2052

Trending Articles