This is a discussion on running php scripts from the command line in 4.2.3 within the PHP Language forums, part of the PHP Programming Forums category; I'm helping someone who is running a server with Debian testing, which only has PHP 4.2.3, not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm helping someone who is running a server with Debian testing, which only has PHP 4.2.3, not higher. He wants to run php from the command line, which I think is only supported starting with 4.3. Is there a way to do it with 4.2.3 ? I am trying to avoid installing a newer version of php from source, as the machine has a running webserver on it that I would not like to break for more than a few minutes. --Rob |
|
|||
|
Rob Ristroph wrote:
> I'm helping someone who is running a server with Debian testing, which > only has PHP 4.2.3, not higher. He wants to run php from the command > line, which I think is only supported starting with 4.3. Is there a > way to do it with 4.2.3 ? I am trying to avoid installing a newer > version of php from source, as the machine has a running webserver on > it that I would not like to break for more than a few minutes. Maybe this works in testing too. I used it in unstable root# apt-get install php4-cgi -- --= my mail box only accepts =-- --= Content-Type: text/plain =-- --= Size below 10001 bytes =-- |
|
|||
|
"Rob Ristroph" <rgr@sdf.lonestar.org> wrote in message
news:87oethxafo.fsf@rgristroph-austin.ath.cx... > > I'm helping someone who is running a server with Debian testing, which > only has PHP 4.2.3, not higher. He wants to run php from the command > line, which I think is only supported starting with 4.3. Is there a > way to do it with 4.2.3 ? I am trying to avoid installing a newer > version of php from source, as the machine has a running webserver on > it that I would not like to break for more than a few minutes. > > --Rob just type : php filename.php or make it into a shell script add the first line to the script #!/bin/php -q then chmod 755 the file the to run it ./filename.php or stick a copy in /usr/bin btw, if you are making a shell script, it does not need the .php extention. it doesnt need one at all I have a shell script that I wrote in php called srestart it restarts services properly on my boxes. ie: srestart httpd srestart mail srestart dns -- Mike Bradley http://www.gzentools.com -- free online php tools |
|
|||
|
>>>>> "Pedro" == Pedro Graca <hexkid@hotpop.com> writes:
Pedro> Pedro> Rob Ristroph wrote: >> I'm helping someone who is running a server with Debian testing, >> which only has PHP 4.2.3, not higher. He wants to run php from the >> command line, which I think is only supported starting with 4.3. >> Is there a way to do it with 4.2.3 ? I am trying to avoid >> installing a newer version of php from source, as the machine has a >> running webserver on it that I would not like to break for more >> than a few minutes. Pedro> Pedro> Maybe this works in testing too. I used it in unstable Pedro> Pedro> root# apt-get install php4-cgi This is exactly what I needed to do. Thank you very much. --Rob |