Table of Contents
Steps to install PHProjekt
Step One - Where to find an WAMP installer and other notes. Step Two - What FoxServ directories and shortcuts are important. Step Three - How to modify the windows 98 batch file to run correctly. Step Four - How to start the batch file or XP service using the service monitor. Step Five - How to test to see if the apache batch or service is running correctly. Step Six - Testing the PHP engine. Step Seven - Testing the MySQL server. Step Eight - Creating the MySQL database. Step Nine - Running the PHProjekt environment test script. Step Ten - Running the PHProjekt setup script. Step Eleven - Done!
How to Send E-mails (or Steps to Install An E-mail Server)
Step One - A link to PostCast, a free e-mail server. Step Two - What to change in the PHP installation to point it to the PostCast server. Step Three - What a working server looks like and simple troubleshooting questions.
|
Last Updated: May 17th, 2004 - Change Log at the bottom. License: Audience:Intended for those who are starting from scratch and need to install a web server (Apache), PHP and MySQL on a Windows system before installing PHProjekt. What is found here is a summary of many sources, like php.net, apache.org and MySQL.com who each have their own install instructions and FAQs. This guide covers a WAMP (Windows, Apache, MySQL PHP) install on Windows 98 however, XP is pretty similar expect for one point, which is noted. Other Guides:If this guide doesn't hold the clue you need to get past the problem, there are two others in German, here and here and for English, well none worth mentioning. If you are installing a LAMP system, here might be some help. |
The guide assumes FoxServ v3.0 and PHProjekt v4.x and important points are in bold.
Let's get started:
Steps to install PHProjekt
The best place is to find an installer that does all the Apache, PHP and MySQL installation for you and there are a few out there like Nusphere and PHPTriad . I used the FoxServ installer and will refer to exclusively.
When choosing a directory to install FoxServ under, the Apache install instructions say to use a directory that has no space in it, for instance c:\temp . Apparently Apache was build to work with Linux and it can't handle spaces.
If you have problems with just installing FoxServ, read the installation instructions or FAQ on the FoxServ site. If the answer is not there, then don't be afraid to use a forum, however, you may want to read this FAQ on asking questions in forums first.
If you are running windows XP, at the end of the FoxServ install, it will display a page of check marks, one of which is if you want to run Apache (the webserver) as a service. The answer is yes, run Apache as a service under XP.
After the FoxServ installer is finished, you should have a directory structure that looks something like:

The two important ones are "batchfiles" and "www" directories. FoxServ should have also installed a bunch of shortcuts under your Start menu that looks like:

Which need a bit of explaining:
"ApacheMonitor" - used for controlling the Apache service with windows XP.
"FoxServ Control Panel" is not either
"Remove FoxServ" self explanatory
"winmysqladmin" - This not only runs the MySQL server but also starts an admin interface and is talked about in steps below. It is another shortcut worth sending to your desktop.
"Start Apache Service" - I suggest making a shortcut of this on your favorite tool bar or your desktop (right click on it and use the "Send To" menu to send a shortcut to your desktop). Also right click on the shortcut and look at the properties and you will notice it points to:

What it is actually pointing to is "apache start service.bat" which is talked about in the next step. Of course, if you installed it in a different directory, it will not be in c:\temp
Now the instructions diverge a bit because it depends on your Windows version.
For Windows 98:
Edit "apache start service.bat" in any text editor and make sure that it contains:
cd c:\temp\foxserv\Apache\bin
apache
Of course, if your FoxServ installation is NOT in c:\temp make sure it points to the right directory. A good place to double check everything is here.
For Windows XP
When you installed FoxServ with XP, the installer will have installed it as an inactive service and there is nothing more to do. If you have questions, some pointers are here.
Now run the "Start Apache Service" shortcut and you should see:
Windows 98

If anything else happens, like
One common error it reports is something about "httpd.conf" (or similar) and the cause is that FoxServ was installed under a directory with a space in the name. Make sure the directory that FoxServ is installed under has NO spaces.
Or it says "Finished" in the window title then most likely you have too many other programs running.
Or it runs and then disappears right away, then there are troubles. Unfortunately at this point there could be many reasons why it doesn't work and your best bet is to go here.
Windows XP
First, run the "Apache Monitor" (as described in Step Two)
And then right click on the icon in the system tray and select "Open
Apache Monitor" and then click on the start button. If successful
you should see:
If you don't see the "Apache" in the "Service Status" box, did you uncheck the "run as service" during install? Another thing to try is restarting your computer. You can also see if the service is enabled by clicking on the "Open Services" and you should be able to find the Apache service there but not running.
Great, you now have a web server which is watching port 80 on your computer and here is how to test it:
Create an "index.htm" file in the "www" directory under the FoxServ directory. I think FoxServ already has one, check.
Then point your browser to
http://127.0.0.1/ , does the index page come up? 127.0.0.1 is a reserved local loop back IP address.
http://localhost/ should work as well.
If your computer has an IP address, and with no firewall, you should also be able to surf from your IP address.
Problems? Did you check the obvious, like a firewall? If you have problems here, then go back to step four and make sure the service is running and if it is, well, umm, then you should probably start fishing around on the Apache site.
OK, at this point you have a working Web Server! Note that the "www" directory now forms the root of your website, in other words, whenever Apache gets a request for a webpage, it looks there first and any sub directory can be accessed by http://localhost/[directorynamehere]. For example, if you have the directory structure "c:\temp\FoxServ\www\mypage\" then you can access it in the browser with http://localhost/mypage
Now test the PHP installation:
I think FoxServ creates a PHP test file called "phpinfo.php" under the "www" directory, which you should be able to bring up in your browser. If not, just create it and put inside:
<?php
echo phpinfo();
?>
If it works, you will see in your browser something similar to:

If it doesn't, then look here for English help or here for help in German.
OK, Apache and PHP are now running and we can test the MySQL database - Run the "winmysqladmin"
shortcut mentioned in step four (unless it is running already) and under Windows 98, you should see a DOS window
and the admin interface briefly pop-up and then a system tray icon like this
. If you right click on it and select "Show Me", you should see
something similar to:

(To make it return to the system tray, hit the "Hide Me" button at the bottom left, not the minimize button - Yes, not the way I would have designed it either...)
If you get errors on start-up, the icon is missing, or none of the server information is filled in (it may take a second), then look at the FoxServ site or MySQL website for help.
OK, your MySQL database server is running but you need to create a test database and a username and password which PHProjekt will use to access it.
Under the "Databases" tab, right click on your host name, as shown below, and create a database:

The default database is "mysql" and should not be used for PHProjekt because it contains the username/password information for MySQL.
OK, the new database is created, now you need to create a username/password. With FoxServ, use the other admin interface which you can access here and should look like below, but WAIT, it asks for a username/password! The default user lets everybody and their dog in (we will change that later) and just typing anything in as the username with no password will work.

Bookmark the URL, it might come in handy later.
Click on the "Users" link and you should get:

A few notes:
If you use the drop down box on the left, the name of the database you created should be listed.
The "Host" column is important because it specifies from what domain your user's have access from and "%" is all domains. "User" is the username, "password" self explanatory and "Privileges" specifies what that user can do.
The first thing to do is give the "root" and "admin" users a password making sure to hit the "Reload MySQL" button to refresh the display. This admin interface is a bit kludgy because it asks for your username/password at unexpected places and the "Reload MySQL" may have to be hit again (and again) if a deleted user shows up. Here might be a good point to test your admin or root access by closing the browser, starting a new one and logging in again. If your new admin user doesn't work, just use the "everybody and their dog" username to get back in.
Now delete the "everybody and their dog" user ("% Any No [and all privileges]")
Now you have everything you need to get PHProjekt up and running, Apache, MySQL and PHP. Unzip PHProjekt under the "www" directory and run "env_test.php" file which should look like this:

Go through each test (except e-mail which is described below) and where it says "Database Access" enter your host name "localhost", username "admin", password (Whatever you named it in step eight), and database name (ditto). For example:

It worked if you got:

If it doesn't, and this is where most problems start, then most likely an incorrect hostname, user name, password or access permission was used. If you are still stuck, hit the PHProjekt Install Forum and do a search to see if anybody had the same problem and if not, then follow the the forum posting FAQ and post the problem in PHProjekt's Install Support forum.
Your next step is to bring up http://localhost/phprojekt/setup.php and you should get:

Click "First Time Installation", change to your language and hit submit. On the next screen, just like you did with env_test.php, enter your database information and hit submit and if you get no errors, finish the rest of the setup. If everything works, you should see:

If you do have errors, it is not surprising because this point tests all of the previous steps. Search the install FAQ on PHProjekt or the "Install Support" forum. One common problem is that the user doesn't have rights to add and modify tables in the database.
Your PHProjekt installation is ready!
How to Send E-mails
One feature that FoxServ doesn't include is an e-mail server which means that PHProjekt cannot send e-mails with what is described above. In order for e-mail to work, PHP (the scripting engine PHProjekt relies on) needs to know where the e-mail server is and unfortunately, you can't use your ISP's. There are lots of e-mail servers out there, but I have chosen PostCast because it is free and has an easy to use interface.
First download PostCast here (there should be a free non-trial version), install it and change any settings if necessary although they should be fine. Leave it running.
In order for PHP to know where the PostCast server is, you have to edit the PHP.ini file which is located under "c:\windows\" (yes even if you installed it under c:\temp\FoxServ, it will have placed php.ini under the windows directory)
First, shut down Apache (exit the batch file or stop the service)
Then edit PHP.ini with any text editor and change where it says
[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = whatever@whatever.com
First make sure "SMTP" points to "localhost" if you installed PostCast on the same machine as Apache and then change where the "sendmail_from" is from.
Now restart Apache.
Now to test, log into PHProjekt, go to the mail module and send an e-mail. You will know it works when in the top right corner, PostCast starts flashing an icon and then the e-mail appears, as shown:
Then depending on your settings it will immediately send the e-mail or wait for you to hit the "Start" button.
Problems? Well, again, make sure your firewall isn't blocking it because PostCast expects e-mails on port 25, is that blocked? There are lots of settings with PostCast, do you need to change any of them?
That's it!
May 17th, 2004 - Added information about httpd.conf bug, XP service info and PostCast e-mail server
August 5th, 2003 - Fixed spelling mistakes.
June 26th, 2003 - Renamed from Getting Started to WAMP Installation Guide
April 19th, 2003 - Various spelling mistakes and broken links
April 14th, 2003 - Added links to Other Guides and one to a LAMP install
April 13th, 2003 - Added License information and screen shot of database info
April 12th, 2003 - Updated to PHProjekt's style sheet
April 9th, 2003 - Genesis