IIS 6.0 W2K3 & Pligg 9.9.5 - Install (Step by Step)

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-04-2009, 11:51 AM
New Pligger
 
Join Date: Jan 2009
Posts: 3
I had some issues getting Pligg running on W2K3 IIS 6.0, I put together this write up, hopefully will save some others a bit of time.
Feel free to edit as you see fit, I'm sure it could use some cleanup.

Please note database schema and correlated tables use pligg_ nomenclature are referenced throughout.

~Enjoy

FAQ & Install Tips
"CGI application misbehaved by not returned complete set of HTTP headers"
Check your version of PHP and ensure php.ini cgi.force_redirect = 0

IIS returns Pligg requests involving .php as 404, and other files return 200
Double check .php web service extensions are set to "Allowed" and proper handler of .php extension (C:\PHP\php-cgi.exe) has been mapped
within IIS.

Attemps to complete Pligg installation steps result in half loaded pages, IIS returns 500 or 502 from install.php
Check the loadable php libraries are in the correct location, double check php.ini extension=php_mysql.dll, and the correlating declaration, verify you have latest build of php ~defer from using the install when possible, always use the .zip



HTML Code:
IIS 6.0 W2K3 & Pligg 9.9.5 - Install
Author: yfki
Date: 1/3/2008

/----------------------------/
  Section 1 - Install Apps
/----------------------------/

1) Extract php-5.2.8-Win32.zip --> C:\PHP
2) Install mysql-essential-5.1.30-win32.msi
	2a) Standard Configuration
	2b) Install as Service & Include Path
	2c) ** Remember the password used during install for the root account
3) Install mysql-query-browser-1.1.20-win.msi
4) Install mysql-administrator-1.1.9-win.msi
5) Extract Pligg Beta 9.9.5.zip --> C:\Inetpub\wwwroot\Pligg



/----------------------------/
  Section 2 - IIS Setup
/----------------------------/

1) Open IIS Admin
2) Under Default Website
	2a) Right Click Pligg --> Select Properties
	2b) Under Directory tab, add Write Permissions
	2c) Next to Application name on the bottom panel --> Click Create Button
	2d) Click the Configuration Button
	2e) Click Add --> Add the Executable C:\PHP\php-cgi.exe & the extension .php, click OK
	2f) Close Application Configuration --> Click OK
	2g) Click the Documents tab, then click Add, enter index.php --> Click OK
	2h) Select index.php in the list, and the click the Move Up button until it reaches the top of the list.
	2g) Close Pligg Properties --> Click OK at the bottom
3) Under Web Service Extensions
	3a) Click "Add a new Web Service Extension..."
	3b) Extension Name = PHP
	3c) Click Add --> Browse to C:\PHP\php-cgi.exe
	3d) Check the box that says "Set extension to Allowed"
	3e) Click OK
	


/----------------------------/
  Section 3 - PHP Setup
/----------------------------/	

1) Rename C:\PHP\php.ini-recommended --> php.ini
2) Open the file in editor

	2a) Line 542 Change
			from:  extension_dir = "./"
			  to:  	extension_dir = "C:\PHP\ext"

	
	*[In the steps below, make sure to remove the semicolon to uncomment]

	2b) Line 553 Change 
			from: 	;cgi.force_redirect = 1
			  to:    cgi.force_redirect = 0
	
	2c) Line 588 Change 
			from: 	;cgi.rfc2616_headers = 0
			  to:    cgi.rfc2616_headers = 1

	2d) Line 681 Change 
			from: 	;extension=php_mysql.dll
			  to:    extension=php_mysql.dll  
			    	
	2e) Below Line 623:     default_socket_timeout = 60
            Add these 2 lines:
				upload_tmp_dir="C:\WINDOWS\Temp"
				session.save_path="C:\WINDOWS\Temp"



/----------------------------/
  Section 4 - MySQL Setup
/----------------------------/	

1) Open MySQL Administrator
	1a) Server Host: localhost
	1b) Username: root
	1c) Root: (Password previously used during MySQL install - Section 1 Step 2c)
2) Click on the "Catalogs" 
	2a) In the lower left you will see all of the databases. (e.g information_schema, mysql, test)
	2b) Right-click in the white-area and click "Create new schema"
	2c) Schema name = pligg
3) Close MySQL Administrator

						

/----------------------------/
  Section 5 - Pligg Setup
/----------------------------/	

1) Right-Click C:\Inetpub\wwwroot\Pligg
	** This may not be required, but it is the only way I was able to workaround an error during Table Creation
	1b) Goto the Security Tab
	1c) Select "Internet Guest Account"
	1d) Beneath click the box for "Modify" under the "Allow" column, click OK

2) Rename C:\Inetpub\wwwroot\Pligg\libs\dbconnect.php.default --> dbconnect.php
	2a) Right-Click C:\Inetpub\wwwroot\Pligg\libs\dbconnect.php
	2b) Goto the Security Tab
	2c) Select "Internet Guest Account"
	2d) Beneath click the box for "Modify" under the "Allow" column, click OK


3) Rename C:\Inetpub\wwwroot\Pligg\settings.php.default --> settings.php
	3a) Right-Click C:\Inetpub\wwwroot\Pligg\settings.php
	3b) Goto the Security Tab
	3c) Select "Internet Guest Account"
	3d) Beneath click the box for "Modify" under the "Allow" column, click OK


4) Right-Click on the folder C:\Inetpub\wwwroot\Pligg\languages
	4a) Goto the Security Tab
	4b) Select "Internet Guest Account"
	4c) Beneath click the box for "Modify" under the "Allow" column, click OK


/----------------------------/
   Section 6 - Pligg Install
/----------------------------/	
	
1) Launch Browser to: http://localhost/pligg/install/
2) Click to continue in English
3) Click Next
4) Fill out MySQL DB Settings
	4a) Database Name: Name of the schema used in (Section 4, Step 2c)
	4b) Database Username: root
	4c) Databse Password: (Password previously used during MySQL install - Section 1 Step 2c)
	4d) Database Server: localhost
	4e) Table Prefix: pligg_

5) Click Check Settings, successful Output Will look like this:

	Database connection established...
	Found database...
	'/libs/dbconnect.php' was updated successfully.
	There were no errors, continue onto the next step...

6) Click Next, successful output will look like this:

	Creating database tables...
	Creating table: 'categories'...
	Creating table: 'comments'...
	Creating table: 'friends'...
	Creating table: 'links'...
	Creating table: 'trackbacks'...
	Creating table: 'users'...
	Creating table: 'tags'...
	Creating table: 'votes'...
	Creating table: 'pageviews'....
	Creating table: 'config'....
	Creating table: 'messages'....
	Creating table: 'modules'....
	Creating table: 'formulas'....
	Creating table: 'Saved Links'....
	Creating table: 'Misc Data'....
	Creating table: 'Totals'....
	Creating 'god' user...
	Inserting default categories...
	Inserting default modules...
	Inserting default formulas...
	Inserting default 'totals' data...
	Inserting default 'config' data...

	Tables were created successfully!
	falsefalse

	Pligg appears to have installed successfully!

	Things to do next:

	    * chmod "../libs/dbconnect.php" back to 644, we will not need to change this file again.
	    * DELETE the "./install" directory from your server once you have successfully installed Pligg.
	    * Login to the admin area (default username: god; default password: 12345)
	    * Change your password from the default password.
	    * Configure your installation using the admin area.
	    * Visit the Pligg Forums if you have any questions.
       
7) Follow the "Things to do next:" listed above



/----------------------------/
            Post Install 
/----------------------------/	

1) Fix Logout bug (? maybe latent defect)
	1a) C:\Inetpub\wwwroot\Pligg\libs\html1.php
	1b) Change Line 424
		From:	If ($x == "logout") {return my_pligg_base."/login.php?op=logout&return=" . $var1;}
		  To:	If ($x == "logout") {return my_pligg_base."/login.php?op=logout&return=index.php";}

2) Get Captcha To work
	2a) C:\PHP\php.ini Line 669 Change
		From:	;extension=php_gd2.dll
		  To:	;extension=php_gd2.dll

3) Turn off unecessary error reporting (pick your own debug level)
	3a) C:\PHP\php.ini Line 354 Change
		From:	error_reporting  =  E_ALL
		  To:	error_reporting  =  E_ERROR


4) Pligg "Home" Link is pointing to http://localhost instead of my domain
	4a)C:\Inetpub\wwwroot\Pligg\settings.php
	4b)Confirm $my_base_url 

	$my_base_url = 'http://www.foobar.com';
	$my_pligg_base = '/pligg';
	$dblang = 'en';
	define('table_prefix', 'pligg_');
	include_once mnminclude.'settings_from_db.php';



5) Avatar upload folder requires permission tweak in order to allow upload.
	5a) Right-Click C:\Inetpub\wwwroot\Pligg\avatars\user_uploaded
	5b) Goto the Security Tab
	5c) Select "Internet Guest Account"
	5d) Beneath click the box for "Modify" under the "Allow" column, click OK


6) Object Moved Error displayed after commenting on an article
	6a) C:\Inetpub\wwwroot\Pligg\story.php Lone 223
		From:	header('Location: '.$_SERVER['REQUEST_URI']);
		  To:	echo '<SCRIPT LANGUAGE="JavaScript">window.location="' . $_SERVER['REQUEST_URI'] . '";</script>';
Reply With Quote
  #2 (permalink)  
Old 01-05-2009, 12:48 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 3,803
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Thanks a lot for this guide. I had a company approach me hoping to do an IIS install, but I have no experience with IIS so I had to point them elsewhere. I'm sure several users will find this guide useful.

Now Available: Facebook Connect Module !
Reply With Quote
  #3 (permalink)  
Old 01-12-2009, 02:01 AM
New Pligger
 
Join Date: Jan 2009
Posts: 1
PLEASE if you are on IIS and running PHP as fastcgi.
DO NOT
set cgi.rfc2616_headers = 1. As instructed in OP above. lol

Also the correct path to fastcgi is NOT to php-cgi.exe

But set to C:\WINDOWS\system32\inetsrv\fcgiext.dll

See accurate instructions here:
Configuring FastCGI Extension for IIS 6.0 : Running PHP Applications : Hosting Applications on IIS 7.0 : The Official Microsoft IIS Site

The .dll contains config that will conect it to php-cgi.exe
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg 1.0.0 RC1 Yankidank Current Version 1 01-30-2009 01:51 PM
Install Pligg, step 2 doesn't show up findfindfind Questions and Comments 1 12-06-2008 06:29 AM
Вышел русский Pligg 9.9.5 / Russian Pligg 9.9.5 released kossmoss Questions and Comments 1 10-27-2008 08:17 AM
Pligg Beta 9.9.5 chuckroast Current Version 0 07-31-2008 07:26 PM
[SOLVED] GoDaddy hosting - Pligg .98 install problem Joe Sick Questions and Comments 3 10-05-2007 03:53 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development