This page is a guide for for Installing PHPWEBSITE(phpws in short)
in the following setup on your webserver. If you have never setup php and mysql, then this guide might not be for you. For installation
problem from php and mysql, feel free to email me.
Use this guide at your OWN RISK!
I recommand of doing your first installation on a test server, not the actual live web server.
When you are more comfortable with these installations, then do the installation on you web server.
Thats how I did it, and it was very good practice.
Operating system: Windows 2003 server
Web server: IIS 6.0
PHP verison: php 4.4.1 (manually installed)
MYSQL verison: mysql 4.1 (installer)
NOTE: Please use the above setup if you are going to use this guide to setup your phpws
(Don't ask me about setting up php5.1.1 with mysql5 on phpws setup, I couldn't get them to work yet)
Click here for quick start (begining of the guide)
MYSQL setup section
PHP setup section
IIS setup section
MYSQL/PHPWS database section
PHPWS setup/installation section
PHPWEBSITE (or phpws in short) can be downloaded by this link: http://phpwebsite.appstate.edu/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=6&MMN_position=4:4G
Get the current stable verison: 0.10x phpwebsite 0.10.2
PHP 4.4.1 manually install zip files can be downloaded here : http://www.php.net/downloads.php
Download the php.4.4.1 zip package (without installer)

Mysql 4.1 installer can be downloaded here: http://dev.mysql.com/downloads/mysql/4.1.html
Go to windows downloads, download the windows (x86), this verison has the installer for windows.
make sure you don't pick the windows essentials (x86).

Now that you have all the programs. I'll start the installation setup.
You will NEED the web site root path, and have access to do it. This guide will be based on a localhost webserver.
You will also need to configure your IIS manager with inetmgr, run it on the run command.
You must remove other verison of php and mysql before you continue. Please backup all your files
If you don't know how to remove or backup these programs, google them online, you will have plent of them. For php backup (the manual installed verison), you just have to rename your current php folder into phpold, or phpbackup. Just make sure you backup or rename your php.ini file also.
MySQL setup
1. First of all, install mysql from the installer you have downloaded, pick custom install
2. install mysql 4.1, custom install, change the path to c:\mysql4.1, after install, reboot pc
3. MySQL setup is pretty simple, so I won't go into too much details about it, as long as you change the path for simplicity, you should be alright.
if not, look for mysql 4.1 installer guide.
2. install php4.4.1
install php4.4.1 in these steps:
A. Extract the zip files into c:\php
B. Next, we need to move some files, and create some folders.
C. copy all the files in folder sapi and dlls, and paste them into the c:\php folder
D. create a folder and name it sessions, RENAME the extenison folder into ext (i'm doing it because i am lazy)
E.
Find php.ini-recommnd, in the c:\php folder, rename it to php.ini, and press enter
F. Rright click, open it up with notepad, we will have to edit the followings:
1. Find the following:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = C:\njitsolution\
Uncomment the path for windows, and enter your web root folder path, for your path, it might be:
include_path =c:wwwroot\yourwebsite\
This must be correct, or your phpws install won't work
2. Find the
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php\ext"
uncomment extension_dir, put "c:\php\ext" on yours too, since we have just created the same path on your server. Make sure you have " ", or else php won't read it
3. Find the session save path
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = "c:\php\sessions\"
uncomment session.save_path, and put the same path on yours, since we have just created the session folder on your web server too
IIS SETUP
G. Now you can save it, and we will be configuration IIS manager:
1. Go to start/run, and type inetmgr, and press enter
2. now you should see the internet manager windows popup

3. Right click on the web sites folder, click on properties, home directory, configuration.

4. Click on configuation, on executable:, go to broswer and find the php4isapi.dll
and put .php in the extenison box

5. Go back to IIS manager, and find web service extenison folder:
click on add a new web service extenison
on the extension name, we can put anything, so lets put php 4 isapi
check the set extenision status to allowed
Click on add the php4isapi.dll, click ok

Make sure this is set to allowed.
MYSQL database for PHPWS (You must do this prior installing PHPWS)
I. Now php is setup with your IIS/webserver, you shoud do a php() info page, just to check the ext path, session path, and include path have been changed by you.
it's time to create a database for phpws setup now:
go to start, and find mysql, mysql 4.1, mysql command line client, enter the password you have chosen when you installed mysql
now you should see this comes up:

J. Now we need to create a database for the phpws setup:
Enter the following command on mysql command client.
create database phpws;
make sure you end the statment with a ;
1. Then try this command, show databases;
it should show phpws, and some mysql databases;
2. Now we need to use this command to fix a mysql bug:
SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('foobar');
where root is the username, and foobar is the password for root.
make sure you have the quote' 'and ( ) in that statement.
3. now php and mysql are ready for phpws setup

2. go to phpws\core folder, open up core.php with notepad
find:
/* This line is for *nix/linux environments */
ini_set('include_path', '.' . PATH_SEPARATOR . PHPWS_SOURCE_DIR . 'lib/pear/');
// Fixes validator warnings for the hidden sessions
ini_set("url_rewriter.tags", "a=href,area=href,fieldset=fakeentry");
/* This line is for windows environments */
//ini_set('include_path', '.' . PATH_SEPARATOR . PHPWS_SOURCE_DIR . 'lib\\pear\\');
/* Uncomment this line to attempt to use a higher memory limit */
//ini_set('memory_limit', '16M');
Now comment out the linux path, and uncomment the windows path and higher memory limit, so now it'll look like this:
/* This line is for *nix/linux environments */
//ini_set('include_path', '.' . PATH_SEPARATOR . PHPWS_SOURCE_DIR . 'lib/pear/');
// Fixes validator warnings for the hidden sessions
ini_set("url_rewriter.tags", "a=href,area=href,fieldset=fakeentry");
/* This line is for windows environments */
ini_set('include_path', '.' . PATH_SEPARATOR . PHPWS_SOURCE_DIR . 'lib\\pear\\');
/* Uncomment this line to attempt to use a higher memory limit */
ini_set('memory_limit', '16M');
Save it and now we can go start up the install:
PHPWS installation:
1. You can use this path if you also refer your webserver as localhost:
http://localhost/phpws/setup/set_config.php
then you should see this window pops up (Hopefully)

2. For database username, use root, unless you have create a specfic user for the phpws database
database password is the one you have chosen for root
databasename (important), we'll use the database created in mysql client, so it's phpws
Web address is fine(if you are setting this up on a LOCAL TEST SERVER), don't change it.
If you are setting it up on a LIVE WEB server, then use this path:
www.njitsolution.com/phpws/ instead of localhost
File address box, this is very important:
you should see c:\wwwroot\ by default, but this is wrong. so change it to:
c:wwwroot\phpws\\
notice the correct one doesn't have \ after c:
Pick anything for hub hash, example is test1
for install password, make sure you write it down.
Click on create config file, and hopefully you will see this window

3. Click there to continue, it'll ask you the setup password (which you have written down), enter it and hit continue.
now you will have to create the first administrative account:
so make sure you write down these information on a piece of paper as well

Next, you will see the installation screen, for now just click on INSTALL CORE ONLY
After about 5 mins, you should see the installation result page:
as long as you see the "go to my insallation link" then you are good to go, so click that link.

After you click on it, you will be greeted by the login page!

Login with the administrative username and password, and you shold see the control panel page!

There, feel free to email me at [email protected] if you have any problems.
Again, only ask me about windows installation problems. Thanks
![]()