Re: PHP on XP Setup HELP
From: Terence (tk.lists_at_fastmail.fm)
Date: 11/04/03
- Next message: pouzzler: "Re: PHP 4.3.3 with GD2 library installer"
- Previous message: Dr.Bob: "Re: No luck making a databast connection"
- Next in thread: Glutinous: "Re: PHP on XP Setup HELP"
- Reply: Glutinous: "Re: PHP on XP Setup HELP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 04 Nov 2003 19:06:55 +1100
WCH wrote:
> I am trying to setup my XP Pro system at home to code PHP for a dbase
> website project. I am not running any kind of server from my house and just
> plan on doing a chunk of the coding here...then transfering it over to the
> server. I have dl'ed and installed the windows installer of PHP 4.3.1 (we
> aren't using the latest version). But when I rung the simplest of php
> scripts...nothing shows in the html (i.e. <?php print "Hello World." ?>).
> I've added the php directory to my path in hopes that this would fix my
> problem...but it hasn't.
>
> So basically, how can I setup my home pc to recognize php for coding
> purposes without running a server? I would just like to be able to use
> front page or dreamweaver to edit and view.
>
> Thanks in advance.
>
>
PHP is an interpreted programming language, so the PHP software (that
you downloaded) must include an interpreter. The interpreter interprets
the scripts that your write and does something with them. As it happens,
there is a command-line executable which does the job just nicely (see
c:/php/cli/php.exe for the "Command Line Interface" version of the PHP
interpreter).
So here's the thing with the server business... As you know, PHP was
designed for web page functionality. Now since the users of your PHP
pages are not gonna download your scripts and run them from the command
line interpreter, you want the webserver, which fed them the web pages
in the first place, to do this for them/you.
So, the web server must pass on requests for your scripts to a PHP
interpreter. In the old days, it used to simply invoke an executable
such as c:/php/cli/php.exe using the Common Gateway Interface (CGI) but
that proved to be very inefficient. These days, all modern web servers
have interpreters that are in some way embedded into the web server
itslef. PHP ships with these modern modules that can be embedded into
their respective web servers (for instance, IIS, Apache, and others).
These modules act as interfaces that embed the standard PHP interpreter
library (not the command-line executable).
So you see, you really cannot run PHP without running a server (namely,
a web server) unless you specifically wrote a command-line PHP script
(which is reasonably popular, but that's another story) which is not to
be used as a web page.
As far as your windows environment is concerned, you don't need to run
IIS and incur the associated liabilities that it has a history of (ie.
security vulnerabilities). I use a windows box for development and I run
windows apache configued with the PHP apache module. I usually deploy to
a unix machine.
After you have installed apache 1.x.x, go to c:\php\install.txt and look
for the section that says "Installing PHP for Apache as module" and
follow the instruction there. If you have problems, see
http://au.php.net/manual/en/faq.installation.php
I usually copy c:/php/php4ts.dll and the contents of c:/php/dlls/*.dll
to the c:/windows/system32/ directory and any .dll modules in the
c:/php/extensions/ directory that I may uncomment in the extensions
section of the php.ini file.
make sure the installer put your php.ini file in your c:/windows directory.
good luck.
- Next message: pouzzler: "Re: PHP 4.3.3 with GD2 library installer"
- Previous message: Dr.Bob: "Re: No luck making a databast connection"
- Next in thread: Glutinous: "Re: PHP on XP Setup HELP"
- Reply: Glutinous: "Re: PHP on XP Setup HELP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|