RE: [PHP] Newbie needs compile

2002-05-11 Thread hassan

hi

you can also use http://www.webcron.org

At 13:29 06/05/02, John Holmes wrote:
   He did say he did /not/ want to invoke it from a browser :)
  I didn't think that PHP could run w/o one though, so my idea was to
use a
  text browser, have it run the script, then exit out.  As I said, I was
  probably wrong ;)

Actually, that's exactly how it's typically done, using wget or lynx.
Yes, you can compile a standalone version of PHP and use it directly,
but most hosts do not have that. So, you add a line to your cron file
that calls up your PHP script through lynx. Your script shouldn't return
anything, just do what it has to do, or it should redirect output to a
file or email. You can use the -dump switch for lynx to dump any output
that does occur.

I know he said he did not want to invoke it from a browser, but I think
he meant that he didn't want to have to physically go to and load up the
page himself.

---John Holmes...


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

___
Hassan El Forkani
Founder And Mantainer of :
http://WarmAfrica.com EveryOne's Africa
Freelance Internet Consultant / Web Applications Developper.
Email: [EMAIL PROTECTED]
Tel : 0021671880014
___


Re: [PHP] Newbie needs compile

2002-05-06 Thread Jason Wong

On Monday 06 May 2002 13:59, Julian wrote:
  I need to schedule to run a PHP script on server side, rather than invoke
  it from browser. Is there any way to compile it to .exe so it can run on
  Solaris/Apache environment?

Yes, full instructions in the manual.

 no such thing as .exe in Solaris ;)  just chmod 755 a file and it will
 execute.

  If yes, can you help me know how? Thanks a great deal!

 If you want to schedule something to run, say, every 5 minutes, then you
 add it to your cron jobs.  In FreeBSD, you have to edit /etc/crontab to do
 this, then restart cron.  Inorder to execute a PHP script like you
 want (and I could be way off on this one), I would install lynx and make
 cron call lynx with a link to your .php file.

He did say he did /not/ want to invoke it from a browser :)

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Beat your son every day; you may not know why, but he will.
*/

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




Re: [PHP] Newbie needs compile

2002-05-06 Thread Julian

 He did say he did /not/ want to invoke it from a browser :)
I didn't think that PHP could run w/o one though, so my idea was to use a
text browser, have it run the script, then exit out.  As I said, I was
probably wrong ;)
Sabre


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




Re: [PHP] Newbie needs compile

2002-05-06 Thread Miguel Cruz

On Mon, 6 May 2002, Julian wrote:
 I didn't think that PHP could run w/o one though, so my idea was to use a
 text browser, have it run the script, then exit out.  As I said, I was
 probably wrong ;)

Build the CGI version of PHP and you can run it from the command line like 
any other interpreter.

miguel


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




RE: [PHP] Newbie needs compile

2002-05-06 Thread John Holmes

  He did say he did /not/ want to invoke it from a browser :)
 I didn't think that PHP could run w/o one though, so my idea was to
use a
 text browser, have it run the script, then exit out.  As I said, I was
 probably wrong ;)

Actually, that's exactly how it's typically done, using wget or lynx.
Yes, you can compile a standalone version of PHP and use it directly,
but most hosts do not have that. So, you add a line to your cron file
that calls up your PHP script through lynx. Your script shouldn't return
anything, just do what it has to do, or it should redirect output to a
file or email. You can use the -dump switch for lynx to dump any output
that does occur.

I know he said he did not want to invoke it from a browser, but I think
he meant that he didn't want to have to physically go to and load up the
page himself.

---John Holmes...


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




Re: [PHP] Newbie needs compile

2002-05-06 Thread Sogno Kahlenberg

Hi Miguel,

It IS the CGI version. You mean I can

~~/php4/php /cgi-bin/cmanage/reindex.php

to run it? Any other key points? Thanx.


Miguel Cruz [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 On Mon, 6 May 2002, Julian wrote:
  I didn't think that PHP could run w/o one though, so my idea was to use
a
  text browser, have it run the script, then exit out.  As I said, I was
  probably wrong ;)

 Build the CGI version of PHP and you can run it from the command line like
 any other interpreter.

 miguel




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




Re: [PHP] Newbie needs compile

2002-05-06 Thread Miguel Cruz

Yes, that works fine. Make it ~/php4/php -q if you don't 
want to get the Content-Type: header.

miguel

On Mon, 6 May 2002, Sogno Kahlenberg wrote:
 It IS the CGI version. You mean I can
 
 ~~/php4/php /cgi-bin/cmanage/reindex.php
 
 to run it? Any other key points? Thanx.
 
 
 Miguel Cruz [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  On Mon, 6 May 2002, Julian wrote:
   I didn't think that PHP could run w/o one though, so my idea was to use
 a
   text browser, have it run the script, then exit out.  As I said, I was
   probably wrong ;)
 
  Build the CGI version of PHP and you can run it from the command line like
  any other interpreter.
 
  miguel
 
 
 
 
 


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




Re: [PHP] Newbie needs compile

2002-05-05 Thread Julian

 I need to schedule to run a PHP script on server side, rather than invoke it
 from browser. Is there any way to compile it to .exe so it can run on
 Solaris/Apache environment?
no such thing as .exe in Solaris ;)  just chmod 755 a file and it will
execute.

 If yes, can you help me know how? Thanks a great deal!
If you want to schedule something to run, say, every 5 minutes, then you
add it to your cron jobs.  In FreeBSD, you have to edit /etc/crontab to do
this, then restart cron.  Inorder to execute a PHP script like you
want (and I could be way off on this one), I would install lynx and make
cron call lynx with a link to your .php file.

Sabre


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