|
PHPRunner comes with built-in web server. However you may want
to install your own web server. This page explains how to install a
local web server (XAMPP) and configure PHPRunner to use it.
This guide uses Windows XP and XAMPP 1.7.0. XAMPP is a free
package that includes an easy-to-set up web server (Apache),
database server (MySQL), and a server-side scripting language
(PHP). More
about XAMPP.
Download
XAMPP
1. Visit http://www.apachefriends.org/en/xampp.html.
2. Select XAMPP for Windows.
3. Select the Installer version of XAMPP for Windows (we
download the Installer version of the basic XAMPP package).
4. Clicking the Installer link takes you to SourceForge where
you can download the file.
5. Save the file to your Desktop or My Documents area.
Install
XAMPP
Note: If you
are running the Skype VOIP application, or if you are running IIS
Server, you will need to exit them before proceeding. Apache cannot
start as a service if Skype or IIS is also running though when
XAMPP is not in use, you can exit XAMPP to use Skype or IIS.
1. Run the installer xampp-win32-1.7.0-installer.exe.
2. Select the language you wish the installation process to
use.
3. Choose a place to install XAMPP.
Note: for
Windows Vista, Apache Friends recommends not installing XAMPP into
your c:\Program Files\ folder.
4. On the next screen you can select to install Apache and MySQL
as services, which will make them start automatically every time
you start Windows and will allow other applications you may have,
such as Skype, to run simultaneously. If you don't choose this
option, you will need to use the XAMPP Control Panel application to
start the servers individually each time you need them. This may be
desirable if you don't intend to use your servers that often. Any
way, leave the Install FileZilla
as service box unchecked.
In our example we install Apache and MySQL as services.
5. XAMPP will then install. At one point, a command-line window
will open; do not be alarmed this is normal! After the installation
is complete, you will get a message indicating so. Click
Finish.
6. Then Apache and MySQL will install as services. At one point,
a command-line window will open; do not be alarmed this is normal!
After the installation is complete, you will get a message
indicating so. Click Ok.
7. Next, you are prompted to start the XAMPP control panel,
which can also be opened by selecting Start » All Programs » XAMPP
» XAMPP Control Panel, or by running c:\xampp\xampp-control.exe.
This tool lets you start and stop the various servers installed as
part of XAMPP. Since Apache and MySQL already started, select
No.
Now the installation finished.
Using
XAMPP
The XAMPP control panel is used to control and monitor the
status of services that XAMPP has installed. When the control panel
is running, the following icon will be visible in your system tray
. Double-clicking on this icon will bring
up the Control Panel.
Since Apache and MySQL installed as services you do not need to
start/stop them in the Control panel. They start automatically
every time you start Windows.
Go to http://localhost/ in a browser. If you are directed to a
page with the XAMPP logo, your installation was successful.
You can add or change the files in C:\xampp\htdocs to change
what you see at http://localhost/. Right after installation, this
folder contains all the files for the XAMPP welcome web page. You
can remove or backup these files so that they do not conflict in
anyway. XAMPP configuration interface is available at
http://localhost/xampp/index.php and is located at
C:\xampp\htdocs\xampp.
Note: To send
mails via PHP you need to modify php.ini file. In XAMPP it is
stored at C:\xampp\php. Change the line ;sendmail_from = me@example.com to
sendmail_from =
your_email_address.
When connecting to MySQL, type "localhost" in the Host/Server name (or IP) field and "root" in the
User field. Leave
Password field blank.
PHPRunner will configure the virtual directory and the web site
URL. So you do not need to add this information manually on the
Output directory page. The
virtual directory name is the same as project name.
Note: If you
use Apache not as a service, then select output directory inside
c:\xampp\htdocs\.
Example: output directory - c:\xampp\htdocs\project1, URL to open
in browser - http://localhost/project1.
|