Sockets as a module or a separate PHP CLI instance?
If you can do --with-sockets=shared, for the configure, you should end
up with a sockets.so file that you can then use http://php.net/dl to
load into your scripts that need sockets...
At least, *some* extensions this works...
Definitely.
Just compile it as CLI or CGI, without the --with-apxs or --with-apxs2
or whatever pulls in Apache.
Then don't do 'make install' but just copy the bin/php over to
/usr/local/bin/php-with-sockets
Then you can do php-with-sockets -q whatever.php to run that one
special PHP binary.
Alternatively, you can download the PHP source to a whole new fresh
directory, compile it for CLI, and then leave it there, and use:
/path/to/php/src/php/bin/php -q whatever.php
so that you are running the special php binary from that source
directory instead of the usual one in /usr/local/bin (or wherever
yours lives)
I did that for a CVS version when I needed a patched PHP on a shared
host, and it worked pretty well for a cron job.
It would be kind of ***bersome for something you wanted to run by hand
from the shell a lot, but for a set it and forget it cron job, it was
fine for me.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
|