| Author |
Message |
Asterbing *nix forums addict
Joined: 24 Mar 2006
Posts: 53
|
Posted: Sat Jul 15, 2006 11:16 pm Post subject:
Testing PHP locally
|
|
|
I'm writing a web app that uses a PHP script to request information from
the server. I'd like to test it locally on my machine, but despite
having PHP installed, I can't seem to get it to process the .php file
automatically when it is read. Is there a way to turn automatic
processing of a file/directory on/off? |
|
| Back to top |
|
 |
IchBin *nix forums beginner
Joined: 16 Jul 2005
Posts: 45
|
Posted: Sat Jul 15, 2006 11:45 pm Post subject:
Re: Testing PHP locally
|
|
|
Eric Capps wrote:
| Quote: | I'm writing a web app that uses a PHP script to request information from
the server. I'd like to test it locally on my machine, but despite
having PHP installed, I can't seem to get it to process the .php file
automatically when it is read. Is there a way to turn automatic
processing of a file/directory on/off?
|
I am new at this so get your grain of salt out. Not sure if this is what
you mean. If using Apache there is an option tells apache to
automatically load a file when pointed to a directory.. I added
index.php to the list of files. Ex:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var index.php
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-) |
|
| Back to top |
|
 |
Jerry Stuckle *nix forums Guru
Joined: 24 Feb 2005
Posts: 1515
|
Posted: Sun Jul 16, 2006 12:13 am Post subject:
Re: Testing PHP locally
|
|
|
Eric Capps wrote:
| Quote: | I'm writing a web app that uses a PHP script to request information from
the server. I'd like to test it locally on my machine, but despite
having PHP installed, I can't seem to get it to process the .php file
automatically when it is read. Is there a way to turn automatic
processing of a file/directory on/off?
|
You also need a local webserver installed - either IIS or Apache will work.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
================== |
|
| Back to top |
|
 |
pressminebutton *nix forums beginner
Joined: 16 Jul 2006
Posts: 1
|
Posted: Sun Jul 16, 2006 12:23 am Post subject:
Re: Testing PHP locally
|
|
|
Eric Capps wrote:
| Quote: | I'm writing a web app that uses a PHP script to request information from
the server. I'd like to test it locally on my machine, but despite
having PHP installed, I can't seem to get it to process the .php file
automatically when it is read. Is there a way to turn automatic
processing of a file/directory on/off?
|
if you dont have a server installed i suggest wamp >>
http://www.wampserver.com/en/. which is short for
windows/apache/mysql/php. its simple to install and works like a charm
for local web development. |
|
| Back to top |
|
 |
Jim Carlock *nix forums addict
Joined: 10 Jul 2005
Posts: 79
|
Posted: Sun Jul 16, 2006 12:25 am Post subject:
Re: Testing PHP locally
|
|
|
"Eric Capps" <no@thanks.com> wrote:
| Quote: | I'm writing a web app that uses a PHP script to request
information from the server. I'd like to test it locally on
my machine, but despite having PHP installed, I can't
seem to get it to process the .php file automatically when
it is read. Is there a way to turn automatic processing of
a file/directory on/off?
|
The best way to go involves installing a webserver.
However, you can do simple tests and such on a Windows
system, if they don't use "include", "require" and in general
are really simple. You'd do this by putting the php.exe in the
path inside a command prompt, but this means that you'd
lose the ability to use a web-browser.
There's another more complicated way to get things more
permanent by editing the HKCR\.php key or possibly the
HKCR\phpfile key.
Not sure which direction you're heading or which OS you
work on.
--
Jim Carlock
Post replies to the group. |
|
| Back to top |
|
 |
dawnerd *nix forums beginner
Joined: 17 Jul 2006
Posts: 2
|
Posted: Mon Jul 17, 2006 4:40 am Post subject:
Re: Testing PHP locally
|
|
|
Eric Capps wrote:
| Quote: | I'm writing a web app that uses a PHP script to request information from
the server. I'd like to test it locally on my machine, but despite
having PHP installed, I can't seem to get it to process the .php file
automatically when it is read. Is there a way to turn automatic
processing of a file/directory on/off?
|
You can easily install a server bundle. I would recommend one called
apache2triad. I use it and it only takes a few minutes to install. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|