Mambo on IIS
by Eric Woersching
Mambo is a free, open source content management system (CMS) that is developed in the PHP scripting language. It is a dynamic CMS and uses the free MySQL database for storing data. The following sections describe how to install and configure Mambo for use with FastCGI on IIS 6.0. This document assumes that you have completed the setup and configuration of the FastCGI extension and PHP libraries as described in Using FastCGI to Host PHP Applications on IIS 6.0.
Notes on PHP Setup
Mambo does not require many modifications beyond the default configuration provided by PHP. From the base configuration file provided by PHP, you only need to modify the following lines in your php.ini configuration file to get Mambo working:
- Define
extension\_dir
asc:\php\ext
(that is, the location of your php extensions directory) - Uncomment
extension=php\_mysql.dll
in the extensions list to enable MySQL support
Download and Unpack the Application
Download the latest stable release of Mambo. For this article we, use Mambo 4.6.2 downloaded from http://www.source.mambo-foundation.org/content/view/90/63/
. After downloading the zip package, extract its contents to C:\Inetpub\wwwroot\mambo
or another directory of your choosing.
Set Up the Database
Before starting the installation procedure for Mambo, create a database on your server. Also create a database user and grant this user db ownership permission to the database. Follow the instructions in the Setting Up a Database for a PHP Application on IIS article for a MySQL database. This walkthrough uses the following database information
- Database Name: 'mambo'
- Database User: 'mambouser'
- Account Password: 'mambo'
Directory Permissions Setup
Enable write permission on the Mambo directory for the account that your web server uses for impersonation. For example, if you have configured the web site to impersonate Anonymous users to "Internet Guest Account" (IUSR_*), then you must grant this user write access to the directory:
Configure the Application
Open your web browser and browse to
http://localhost/mambo/installation/index.php
. This takes you to the Mambo setup page, where you see the results of the Mambo pre-installation tests.When you have ensured that all the tests have passed, click "Next>>" at the top of the page.
Note
You can safely ignore the Session save path at this stage. If it is not set, Mambo will still function.
On the next page Mambo, asks you to enter the DB information. Enter the correct information and click "Next >>".
Note
If your MySQL Server is configured to have strict mode enabled, then this step may fail. You must disable strict mode for MySQL in order for Mambo to succeed with the database setup.
Enter your site's name. This is the global title of your Mambo-driven site. Enter a name, then press "Next >>"
In the next step, enter details for your site. The URL should be set to the external sitename to ensure proper configuration. In a local test setup, the URL may have an extra Mambo at the end (for example,
http://localhost/Mambo/Mambo
). Enter your administrator email and password. The final two options should be left in the default choices. Press "Next >>"
You are now finished setting up Mambo. Record your admin password. Delete the "installation" folder from
C:\Inetpub\wwwroot\Mambo
Note
You must change the access permissions on the Mambo folder. Now that installation is complete, write access is not needed.
Once the permissions have been specified, browse to http://localhost/Mambo/index.php
for the "public" site, or log on at http://localhost/Mambo/administrator/index.php
using the administrative username and password that you specified earlier.
Enabling search engine friendly URLs
When hosting Mambo on IIS 7.0 it is possible to configure it to enable search engine friendly URLs. To do that follow these steps:
Open configuration.php file in the folder where Mambo is installed and set $mosConfig_sef= "1"
Create a web.config file in the same folder where Mambo is installed and paste into it the following:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Rewrite content"> <match url="^content/(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index3.php" /> </rule> <rule name="Rewrite component"> <match url="^component/(.*)" /> <action type="Rewrite" url="index3.php" /> </rule> <rule name="Rewrite mos"> <match url="^mos/(.*)" /> <action type="Rewrite" url="index3.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Getting More Information
To discuss the FastCGI Extension for IIS 6.0, or file bug reports, use the FastCGI forums:
To get more information regarding running various PHP applications on IIS, refer to:
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for