Re: Set up cron using PHP

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

 



On Thursday 07 October 2004 13:17, Sheni R. Meledath wrote:
> Hello:
>
>          We need to set up a cron to send an automated email at regular
> intervals. For this I need to execute a PHP file which retrieves the
> required information to be mailed. On my virtual server PHP is loaded as a
> module. Could you please let me know how can I execute a PHP file from the
> shell prompt.
>
>          I have tried with the following commands:
>          % virtual /usr/local/etc/httpd/htdocs/onlineeml.php
>
>          It gives the below error:
>          /usr/local/etc/httpd/htdocs/onlineeml.php: cannot open ?php: no
> such file

just insert:
#!/usr/bin/php -q 

in the first line of the script and make it executable (chmod u+x .... ).

>
>          I am not able to execute any general php related commands (Eg: php
> -v, man p ect)from the Shell prompt. I am getting the error message as
> "php: Command not found.". I think this is because PHP is loaded as a
> module an not as a CGI version. In this context, could you please provide
> some details in executing a PHP script from the Shell prompt when the PHP
> is loaded as a module.
>
>
>
> Regards
>
> Sheni R Meledath
> Assistant Manager - Web Development
> *****************************************************************
> Cyber Gear LLC
> P.O. Box 53735
> Dubai, United Arab Emirates
> Tel: (971 4) 331-2627, Fax: (971 4) 331-8812
> Email: sheni@xxxxxxxxxxxxxx, http://www.cyber-gear.com
>
> VISIT OUR ASSOCIATE SITES:
> http://www.Click2Advertising.com
> http://www.DubaiCityGuide.com
> http://www.MiddleEastDirectory.com
> http://www.MiddleEastEvents.com
> http://www.MiddleEastPostBox.com
> http://www.PressReleaseNetwork.com
> *****************************************************************
>
> This message has been checked for all known viruses by McAfee. No liability
> is accepted by virtue of checking this message and you are recommended to
> have in place your own anti-virus detection procedures.

-- 
Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)
---------------------------------------------------------------------
Orbitel - the New Generation Telecom! See www.orbitel.bg.

Attachment: pgpUmFWruo9pU.pgp
Description: signature


[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