PHP and Crontab

Zimbop

Registered
I'm using PHP compiled by Marc Liyanage at http://www.entropy.ch/ (I think it's an Apache module). It works great in every respect, however, I would like to run .php files with cron and have tried using cronnix to do this but have had no luck.

I was using the shebang line #!/usr/bin/php which has worked on virtual web hosting accounts on linux in the past.

Now, there's no "php" in /usr/bin/php only "php-config" "phpextdist" "phpize" and "phptar".

So how do I execute "test.php". Is it possible with the apache module version of PHP or does it need to be the CGI version. And where is php, if in the terminal I go "whereis sendmail" I get "/usr/sbin/sendmail", but if I do "whereis php" I get nothing!

Regards

Zimbop
 
you will either have to find the binary somewhere or compile it yourself...which can be a bit tricky. I havn't tried compiling php since 4.1 and then it was such a pita.
 
I found a binary but don't know how to run it. The file is a .gz file but won't unzip or anything. If I just run it like it is it won't go. Any hints?

Found it at www.etropy.ch where the other tutorials are under the FAQ:

>Can I also get the CGI version of PHP?"
>Yes. Here is the binary (at version 4.1.1).

With a link to http://www2.entropy.ch/download/php-cgi-4.1.1.gz

I must be doing something dumb but please let me know what ;)

thx
 
put it in your home directory and then open a terminal and type:

gunzip php-cgi-4.1.1.gz

That should unzip it.
 
I did that but it tells me the file is not in gzip format. Are there other formats? Can i untar this or what? I tried most things even going into classic and using the old stuffit expander. Any tips are welcome. This is what Darwin tells me:

Welcome to Darwin!
[local:~] spif% ls
Desktop Icon? Public jbproject
Documents Library SME php-cgi-4.1.1.gz
Downloads Movies Sites
Eleven Music Temp
Fonts Pictures To Print
[local:~] spif% gunzip php-cgi-4.1.1.gz

gunzip: php-cgi-4.1.1.gz: not in gzip format
[local:~] spif%
 
elspif, I have that binary installed and it works fine, although I downloaded it months ago. I'll try and download it and expand it again and let you know what happens.
 
thx zimbop.

I got the file will try this weekend to unstuff with 6.5.1. The urgency to get the binary working has been solved since the main reason I needed it was to install PEAR. But i found a different solution that solved everything first go.

For those of you looking for an easy way to install PEAR even if you have restricted acces on your webserver (because of hosting companies' restrictions) try this http://dickmann.homeunix.org/pear/go-pear.html

Thx for your help though zimbop, I might need the php binary in the future for other purposes.
 
The version that I posted you should be able to use gunzip from the terminal. I recompressed it myself, no need to get 6.5.1
 
Back
Top