Hi Guys,
I am on the verge of giving up with crontab! Please help!
Ok, I have a php file which when visited in a web browser works fine. The page parses Xml using Xsl and then adds the info to a MySql database.
My problem is when I try and add this to the crontab.
The line I have come up with isâ¦.
1 * * * *
/usr/local/bin/php /home/httpd/vhosts/###.co.uk/httpdocs/xmlcron/DBcurrentstatus.php
With my binary php build at /usr/local/bin/php and the full path to file being /home/httpd/vhosts/###.co.uk/httpdocs/xmlcron/DBcurrentstatus.php.
This doesnât work and doesnât report any errors.
Using Shell, from the root, if I type in the line (without the 1****) should it work? I get the error message âCould not open input file /home/httpd/vhosts/###.co.uk/httpdocs/xmlcron/DBcurrentstatus.php.â
If I then try and su to the /home/httpd/vhosts/###.co.uk/httpdocs/xmlcron/ folder I canât as I get âpersmission deniedâ when trying to enter âhttpdocsâ.
I am logged in as the default user â###â while the file is on the â###.co.ukâ virtual host. (of the server)
I think I have one of two problemsâ¦
1. Either permissions are insufficient for cron to run /home/httpd/vhosts/###.co.uk/httpdocs/xmlcron/DBcurrentstatus.php.
2. Or there are problems because my php uses xsl/xml.
I get the following error message when trying to run the page using wget from shellâ¦
###@######.co.uk $ wget
http://67.19.218.114/67.19.218.115/#...rentstatus.php
--07:35:25--
http://67.19.218.114/67.19.218.115/#...rentstatus.php
=> `DBcurrentstatus.php'
Connecting to 67.19.218.114:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
DBcurrentstatus.php: Permission denied
Cannot write to `DBcurrentstatus.php' (Permission denied).
I have my own server but the hosts arenât being very helpful. Any help is much appreciated.
Thanks,
Dan