473,487 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Command-line interface

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!
Jul 17 '05 #1
2 1601
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/
Jul 17 '05 #2
>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
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3671
by: Hugh Macdonald | last post by:
I'm calling a command from within a python script and I need to be able to both catch the output (stdout and stderr) from it and also have the PID (so that I can kill it) I can do one or other...
8
1333
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
12
5295
by: Rhino | last post by:
I am having an odd problem: the sqlj command on my system doesn't work. I am running DB2 (LUW) V8 (FP8) on WinXP. I haven't done an sqlj program since Version 6 of DB2 (LUW) so I checked the...
2
9256
by: Chris Bolus | last post by:
I'm a teacher using MS Access on an RMConnect 2.4 network. On some workstations both I and my students sometimes get an error message when attempting to insert a command button on a form which...
8
1692
by: Charles Law | last post by:
I am implementing the command pattern in VB.NET, where the commands have been serialised. That is, I have several classes that all inherit from my base Command class, that implements ICommand...
2
6654
by: micahstrasser | last post by:
I have been trying for days to send a command to the command prompt through the shell() function in vb.net. For some reason it is not working. Here is the code: Private Sub Button1_Click(ByVal...
14
4943
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
3
4822
by: Michael Roebuck | last post by:
Hi all I'm very new to VB - I am trying to run a DOS command from within a VB2005 asp.net web site using a command button? The DOS command will take the form of the command followed by several...
0
1680
by: czerwww | last post by:
Can someone please help me? I have class for database connection and I need set command.commandTimeout. How can I do that? Code: Imports System.Data.SqlClient Imports System.Data Public Class...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.