I have some PHP code that pulls data from multiple sources and then dumps the results into a DB2 Database. This PHP code works when you enter the URL for the PHP code. Now trying to have it run twice a day using a crontab. It doesn't seem to be working and the log file shows nothing. I'm using wget and thought it was timing out, so I have tried the following crontabs:
00 06 * * * wget http://website/phpcode.php >> /home/website/crontab.log
00 06 * * * wget -T0 http://website/phpcode.php >> /home/website/crontab.log
00 06 * * * wget --timeoute=0 http://website/phpcode.php >> /home/website/crontab.log
When I try to run the phpcode.php from the Linux command line I get:
Fatal error: Call to undefined function db2_connect().
Any idea's how to get the code to work using the crontab with wget?