Re: Running a PHP script everyday

From: Date: Sat, 30 Jul 2005 22:47:30 +0000
Subject: Re: Running a PHP script everyday
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-219700@lists.php.net to get a copy of this message
On Sat, 2005-07-30 at 18:21, sub@pudlz.com wrote: > I can't figure out how to get into command line access through my webhost. > I've tried telnet and it fails. > > My host uses cPanel. When I setup the crontab it e-mails me back this > response: > > /bin/sh: public_html/wap/mailer/dailylist.php: /usr/bin/php > : bad interpreter: No such file or directory > > I'm assuming that it means it can't find "/user/bin/php" > > I ran a "whereis php" through a cronjob and got this: > > php: /usr/src/php-4.3.8/php.ini-recommended /usr/src/php-4.3.8/php.ini-dist > /usr/src/php-4.3.8/php.gif /usr/src/php-4.3.8/php4.spec > /usr/src/php-4.3.10/php.ini-recommended /usr/src/php-4.3.10/php.ini-dist > /usr/src/php-4.3.10/php.gif /usr/src/php-4.3.10/php4.spec /usr/bin/php > /usr/lib/php /usr/lib/php.ini /usr/local/bin/php /usr/local/lib/php > /usr/local/lib/php.ini /usr/include/php There it is in /usr/local/bin/php > I tried them all except the ones with "src" And still get the same message, > but of course it doesn't say /user/bin/php, it says whichever one I put in > the file. Are you sure you tried /usr/local/bin/php ?? > Now the main PHP file calls to 3 other PHP files in it. Do I need to put > that at the top of each of them as well. I didn't think so because they > aren't being executed. They are called using the include statement. No, but you will need to use one of the following for them: include() include_once() require() require_once() > Also when I use #!/usr/include/php I get the response back from the cron > job, but when I use "#!/usr/include/php -q" like the tutorial says nothing > happens. What does the "-q" do? See: /usr/local/bin/php --help Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#219700) next »