By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,336 Members | 2,315 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,336 IT Pros & Developers. It's quick & easy.

Testing PHP locally

P: n/a
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?
Jul 15 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Eric Capps wrote:
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-)
Jul 15 '06 #2

P: n/a
Eric Capps wrote:
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.
js*******@attglobal.net
==================
Jul 16 '06 #3

P: n/a
Eric Capps wrote:
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.

Jul 16 '06 #4

P: n/a
"Eric Capps" <no@thanks.comwrote:
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.
Jul 16 '06 #5

P: n/a

Eric Capps wrote:
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.

Jul 17 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.