> But I sill wan't to hear from you php experts. Anybody do such thing in
> real example or this is can only be my dream.
Although I may not be the PHP expert you seek, I do have lots of command line
PHP scripts: mailings, spam filter, db maintenance.. I even have an IRC bot
written in PHP.
-
> Ok let be more specific about my idea. Because I'm better php programer
> than C I decided to write this in php. I use comandline php.
>
> I want to write some daemon to be started
>
> ./myprog &
>
> Than this has to be run until I cancel it. But I also want to check
> somehow, what this proc
Uros wrote:
Than this has to be run until I cancel it. But I also want to check
somehow, what this proces is doing right now.
If you want it to be realy nice, use shared memory. But this extension
is not enabled by default and is available only on unices.
--
PHP General Mailing List (http://
Hello Adam,
I was thinking about using parent and child proces. So when i start server
it will call some child process and that I can ask parent what his child is
doing.
I found some examples on php.net.
But I sill wan't to hear from you php experts. Anybody do such thing in
real example or this
Umm, have your PHP program output a integer to
a file somewhere, and just map the integer to
a status, example, if "1" exists in the file, it's
doing step 1, etc.
On Mon, 2003-07-07 at 09:30, Uros wrote:
> Hello,
>
> ok what about checking status what this program is doing right now.
>
> can t
Hello,
ok what about checking status what this program is doing right now.
can this be done with
http://www.php.net/manual/en/ref.pcntl.php
tia
Uros
Monday, July 7, 2003, 3:16:35 PM, you wrote:
AV> #!/usr/local/bin/php -q
AV> set_time_limit(0);
AV> while(true)
AV>
#!/usr/local/bin/php -q
Then:
chmod u+x scriptname
./scriptname &
On Mon, 2003-07-07 at 08:41, Uros wrote:
> Hello!
>
> Can somebody give me any workable example how to run some script written in
> PHP in Unix console.
>
> I wan't to write some server aplication. So it has to be run in the
>
Remember to
http://us4.php.net/manual/en/function.set-time-limit.php
That will allow your PHP program to run infinitely long -- and not time
out after x seconds.
-Dan
On Mon, 2003-07-07 at 09:08, Uros wrote:
> Hello,
>
> Ok let be more specific about my idea. Because I'm better php programer
Hello,
Ok let be more specific about my idea. Because I'm better php programer
than C I decided to write this in php. I use comandline php.
I want to write some daemon to be started
./myprog &
Than this has to be run until I cancel it. But I also want to check
somehow, what this proces is doing
> Can somebody give me any workable example how to run some script written in
> PHP in Unix console.
#!/usr/local/bin/php -q
> I wan't to write some server aplication. So it has to be run in the
> backgroud.
Have a look at the process control functions:
http://php.net/pcntl
--
Greg Donald
h
Uros --
...and then Uros said...
%
% Hello!
Hi!
%
% Can somebody give me any workable example how to run some script written in
% PHP in Unix console.
Sure.
php -q /path/to/script/name
(assuming you have the command-line version of php, which you may not,
and that your script doesn't nee
start your PHP files with:
#! /usr/bin/php
Replace /usr/bin/php with the path to php. You will need to make the
file executable by chmod ing it.
(try:
$ chmod +x ./yourscript.php
)
As a side note, starting any text file with #! followed by the path to a
language interpreter, and chmoding the
Hello!
Can somebody give me any workable example how to run some script written in
PHP in Unix console.
I wan't to write some server aplication. So it has to be run in the
backgroud.
--
Best regards,
Uros
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.p
13 matches
Mail list logo