|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| I compiled a standalone php executable into /usr/bin/, and my crontab uses that to run my php scripts. |
|
#3
| |||
| |||
| how do I compile a stand alone php executable? |
|
#4
| ||||
| ||||
| 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.
__________________ -Paul Wieland______________ http://www.sickdimension.com Dual G5 2.0Ghz / 2.5GB Ram / 620 GB HD / 23" CD |
|
#5
| |||
| |||
| 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 |
|
#6
| |||
| |||
| put it in your home directory and then open a terminal and type: gunzip php-cgi-4.1.1.gz That should unzip it. |
|
#7
| |||
| |||
| 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% |
|
#8
| |||
| |||
| One way to use cron with the module would be to put something like curl http://someurl.com/myscript.php in your shell script. I've used this often to trigger php scripts on machines that are using php as a module on both apache and IIS. |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sendmail on localhost w/ php | .jeremy_a> | Unix & X11 | 1 | November 8th, 2003 09:27 AM |