This is a discussion on Command-line interface within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi. In the docs, it says the command-line executable (that allows you to run PHP scripts on your console ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi. In the docs, it says the command-line executable (that allows you to
run PHP scripts on your console as opposed to inside the web server) was introduced in 4.3.0. But I was told by someone that he can do command-line stuff with 4.1.0. Is anyone else using the command-line executable with a version earlier than 4.3.0? Thanks! |
|
|||
|
>Hi. In the docs, it says the command-line executable (that allows you to
>run PHP scripts on your console as opposed to inside the web server) was >introduced in 4.3.0. But I was told by someone that he can do command-line >stuff with 4.1.0. > >Is anyone else using the command-line executable with a version earlier than >4.3.0? There are 3 ways to use PHP: web browser module, CGI, and standalone executable. Web applications generally prefer the web browser module approach if they can use it (does it work with browsers other than Apache?) The manual for PHP 2.0/FI, available on www.php.net if you look for it hard enough ( at http://www.php.net/manual/phpfi2.php#commandline ), has documentation on how to use the CGI executable as a command-line PHP interpreter. I believe the command-line feature has been around a long time, although it looks a lot like shoe-horning the CGI module into another use. I'm not sure this version allowed passing command-line arguments that you could get at, though. That seems to have been introduced around 4.2.0, along with other features for the command line like not producing HTTP headers by default. I've used it in the past, including before the existence of superglobals, which were introduced in 4.1.0 (I think). It's great to make backend scripts for maintaining a database that is mostly manipulated by PHP web pages anyway, but this part isn't activated by a web page (e.g. periodically expiring old entries, taking stuff entered by web page and actually DOING something with it after it goes into the database, etc.) I've since upgraded to a later version, but it existed and worked. Gordon L. Burditt |
|
|||
|
Ever Olano wrote:
> In*the*docs,*it*says*the*command-line*executable*(that*allows*you*to > run PHP scripts on your console as opposed to inside the web server) was > introduced in 4.3.0.**But*I*was*told*by*someone*that*he*can*do > command-line stuff with 4.1.0. > > Is anyone else using the command-line executable with a version earlier > than 4.3.0? You can use the CGI binary from the command line. To compile the CGI version you leave out the --with-apxs configure flag. -- Chris Hope The Electric Toolbox - http://www.electrictoolbox.com/ |
|
|||
|
Oh okay, thanks to both of you! He was probably referring to the CGI binary
then. "Chris Hope" <chris@electrictoolbox.com> wrote in message news:1086899626_33401@news.athenanews.com... Ever Olano wrote: > In the docs, it says the command-line executable (that allows you to > run PHP scripts on your console as opposed to inside the web server) was > introduced in 4.3.0. But I was told by someone that he can do > command-line stuff with 4.1.0. > > Is anyone else using the command-line executable with a version earlier > than 4.3.0? You can use the CGI binary from the command line. To compile the CGI version you leave out the --with-apxs configure flag. -- Chris Hope The Electric Toolbox - http://www.electrictoolbox.com/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|