Firefox PHP

<b>Installing Phorum on Win32/IIS</b>

<b>Installing Phorum on Win32/IIS</b>
January 08, 2002 10:08AM
<HTML>thanks a lot to Marc Lutolf ( who contributed these:

Installing Phorum on a WIMP environment (Windows/IIS/MySQL/PHP)

This installation procedure is designed to get you up and running quickly.
It's assumed you have a Windows NT or 2000 setup with IIS running.

I specifically make no allowances for security considerations. It's assumed that once you've succeeded in getting Phorum to run in a test environment and are feeling comfortable, it'll be easier to go back and tweak security to your specific needs. Note that the installation docs of PHP, MySQL and Phorum all devote space to security considerations. When you get serious about your Phorum setup you'll be well advised to read them carefully.

1. Install PHP: go to [] and download the latest stable release. The PHP Windows release comes in a zip package or as a Windows installer. Download the installer because this is the easiest way to set up in the environment we're talking about.
The installer is an .exe file. Click twice and run it. Once it's done you'll have PHP fully installed. No further care and feeding needed.

2. Install MySQL: go to [] and download the latest stable release for Windows. This will be a .zip file. Once you've got it, extract it to an empty folder to avoid a plethora of files all over your desktop. Click twice on setup.exe to get the installer running. Once the process is done MySQL will be installed on your machine.
However, you're not quite done yet. You need to install MySQL as a Windows service unless you want to be turning on and off with a command line interface. To do this, open a DOS window (Startmenu-->Programs-->Accessories-->Command Prompt) and type in the command
C:\mysql\bin\mysqld-nt --install
Yes, this assumes you installed MySQL directly under the C: drive, thanks for asking. If you have problems with this step, read the MySQL documentation found at []
You can download these docs as a set of html files or browse them online. The part about Windows services is found under " Starting MySQL on Windows NT or Windows 2000"
Once you've installed MySQL as a service, open the services control panel (Startmenu-->Settings-->Control Panel-->Administrative Tools-->Services). The services are ordered alphabetically. Scroll down until you find the one called MySQL (you do see it, don't you?), click on it twice to open it and start it up. You may want to configure it to start up when the computer powers up, otherwise you'll have to turn it on manually each time.

3. Install phpmyadmin: This is a handy application which lets you manage MySQL with a GUI (and as a Windows user you love GUIs). You can download it at []
This is a .zip file that unzips as a folder you need to stick on your web server. I put it under C:\InetPub\wwwroot\PHP\, which is the directory I use for all my PHP web applications. The call with the browser is then (assuming your web is at wwwroot)
If you are running on your local client, "host" will be "localhost". Otherwise it's the web's domain name or IP number.

4. Create a database for Phorum: Point the browser to phpmysqladmin/index.php as per above. The first option on the left under "MySQL" is "Create new database". Enter a name in the field, let's say "PhorumTest" and hit the "Create" button. Your database will appear in the list of db's in the column on the far left. That's all, close the browser. Don't bother creating any tables or anything.

5. Now comes Phorum: Download the latest stable release of Phorum from []
Again this is a .zip that opens as a folder e.g. I tend to rename it to something a bit shorter, let's say phorum331. Stick the folder under the web server analogous to step 3, say C:\InetPub\wwwroot\PHP\phorum331. Now start the phorum installation by pointing the browser at [host] and run the install script as described in the Phorum install.txt. Enter the host as "localhost" or your web servers domain or IP, and "PhorumTest" (or whatever name you chose) as the database name. Don't bother with users and passwords for the db, you're just testing, remember? But do give yourself an admin name and password.

6. Finally, the IIS hack: The hack is described in the Phorum FAQ list, but here's the gist of it. Get your text editor and open the file Phorum331/admin/login.php. This file contains 2 lines of code
header("Location: $PHP_SELF");
They should be at lines 12 and 38. If you don't see them, try searching with your editor.
Replace each of these lines with the following code:
print '<head><meta http-equiv="refresh" content="0;URL=index.php"></head><body></body>'; exit();
Now you know what a hack looks like.

7. It should be clear sailing from here on: point your browser at [host]
You'll be asked your admin login and password. If you enter them and get an error when you hit the login button, the hack was not properly implemented. Otherwise you'll be presented with Phorum's admin menus.

*** Security Issues ***
I can't repeat enough that these instructions completely ignore security issues. The objective here is to get you a working Phorum with minimum complication. To run a bulletin board in production will require that you go back and tighten security appropriately in MySQL and Phorum.

One final consideration concerning security. Depending on your Windows installation, moving the phpmyadmin and phorum folders under the web server may leave them with insufficient access settings. The result can be that an application seemingly installs correctly, but then doesn't work properly because it lacks the permission to read or write to certain files.
This can be corrected by allowing the application folders to inherit permissions from their parent folder (in my example called C:\InetPub\wwwroot\PHP). Windows allows you to have folders inherit permissions from parents or propagate them to subfolders.
To see how this is done right-click on a folder, then go Properties-->Security. Clicking on the "Advanced" button you'll open a window with two checkboxes corresponding to inheritance and propagation (the top one, inheritance, is usually checked). Use these to transfer permissions as you see fit. Careful, though, permissions propagate to ALL a folder's children, not just the one you may want to have changed.
The top level of your web server usually has the permissions you need. In my example I'd have the folder PHP inherit permissions from wwwroot, and then have phpmyadmin and phorum331 inherit from PHP. I wouldn't propagate permissions from wwwroot, because there might be other subfolders under it whose permissions I don't want changed.)</HTML>

Re: Installing Phorum on Win32/IIS
February 24, 2002 01:33AM
That IIS hack is the first time ive seen that anywhere and was the only thing that got it working. Had me stumped :-)

thanks for putting that up
<b>Re: Installing Phorum on Win32/IIS</b>
May 17, 2002 05:43AM
<HTML>maybe add it to the SF DM?</HTML>

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Appreciate the excellent doc file. I had a reall hard time logging in. I seen the IIS hack but never really thought of it. After following your doc, it is not time to find the reason why I can not login into the forum itself. Same message as the admin. But that is for another forum and another thread.

Thanks for the DOC file.
Thaks for your good work Thomas.
I've Phorum running quite well on my intranet, with Windows XP.
Sam Bauers
Re: Installing Phorum on Win32/IIS
April 20, 2003 11:59AM
I didn't need the hack at all under the ATAPI version of PHP

Windows 2000 Server
PHP 4.3.0 ATAPI (manual install)
Phorum 3.4.2

But I did need the hack I posted in the bug reports section to get "display user IP" working under ATAPI.

Sorry, you do not have permission to post/reply in this forum.