473,836 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?
Jul 15 '06 #1
5 4487
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
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*******@attgl obal.net
=============== ===
Jul 16 '06 #3
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
"Eric Capps" <no@thanks.comw rote:
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3744
by: Hugh Cowan | last post by:
Hello, I don't program full-time (anymore), but I do try and stay on-top of the latest technologies and like most are always trying to upgrade my skills and remain current (as much as is possible). Most of my programming these days involves using PHP for creating script files for automating tasks and procedures (locally), and also for anything that might be needed by our divisional Intranet (not a huge site by any stretch of the...
0
3143
by: Shailesh | last post by:
Metalink says that, whenever we migrate from dictionary managed to locally managed tablespaces, 'Migrated tablespaces are not subject to the UNIFORM/SYSTEM policy of newly created locally managed tablespaces. you should see "USER" value in the ALLOCATION_TYPE column for migrated tablespaces'. Oracle documentation says that parameters like INITIAL, NEXT , MINEXTENTS, MAXEXTENTS will not apply to locally managed tablespaces. Suppose I...
0
1601
by: gg.2.starfire | last post by:
WebCheck (http://www.raycosoft.com/rayco/products/webcheck) is a program for testing and analyzing static or dynamic web pages. WebCheck fetches web pages, applies detailed tests to each web page and generates a concise report. WebCheck can pass form parameters, cookies and userids/passwords to web pages, and it can test web pages locally before they are installed on the web server. The program can e-mail the report and/or save it to a...
10
2053
by: Tobias Nilsson | last post by:
I have almost exactly the same problem as the guy below. Is it NOT possible running .NET code locally in Internet Explorer WITHOUT a webserver???? / Tobias --------- My company has in the past created local browser applications with front end in HTML/JavaScript and backend in the form of a Java applet. The applet code contained the business code and calculations. Benefit of this approach is
5
1737
by: Janaka | last post by:
I'm making a web application on my local server which will then be rolled out onto our live site. My problem is that i tend to have to comment out and make a few new hard-coded lines in my files to edit changes locally and then i have to reverse this process to make any changes live. See below // local myLink.NavigateUrl = "http://localhost/TestSite/Printout.aspx"; myLink.NavigateUrl = http://www.mysite.com/Printout.aspx; I'm thinking...
72
5286
by: Jacob | last post by:
I have compiled a set og unit testing recommendations based on my own experience on the concept. Feedback and suggestions for improvements are appreciated: http://geosoft.no/development/unittesting.html Thanks.
1
1546
by: Brett_A | last post by:
I have a SQL server db set up locally. I have a local DSN set up. I have DW connected to the SQL server db and can create Bindings and use Server Behaviors without any problem. When I try to test the site locally in the browser, I get the following error:
20
2452
by: earthwormgaz | last post by:
Hello, I'm after doing some C++ unit testing, I'm using CppUnit. I like the look of RudeMocks, but it doesn't work for Solaris/Sparc, so its no good to me sadly. So, I have class A, and it uses classes B and C. B and C have methods A uses, but they're not virtual, and I don't want to hack the code so that they are just to allow Unit Tests to work. This means that inheriting from B and C to provide Mock classes is a non starter.
1
1563
by: runway27 | last post by:
hi i use a windows vista laptop, i have ie7 and other latest browsers, i need to test how my html pages look in ie6 on my laptop. can anyone suggest any solution where in i can test my html pages developed locally on my laptop to see how it will look in ie6 without having to upload my html and css files to any website rather test it locally. please advice. thanks
0
9825
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9672
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7794
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6981
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5652
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4460
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 we have to send another system
2
4023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3116
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.