Re: Running a PHP script everyday

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2005-07-30 at 18:21, sub@xxxxxxxxx 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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux