Go Back   Web Server Hosting Forum by BODHost > Support > Tutorials and Documentation
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-25-08, 17:10
BOD Member
 
Join Date: Jul 2007
Posts: 296
Default Windows VPS::Manual Installation of PHP

With the help of this steps you can manually install PHP on Windows VPS as well as on a Dedicated servers.For installing PHP on a Windows server you must have some knowledge of Plesk control panel.

1) First you will need to login to your Windows VPS or a Dedicated server and after that browse to php download page. Please remeber to download PHP 4.4.2 zip package and not the installer.

Note:
Download ISAPI/NSAPI binaries (11/03/2002).

2) Once you finish that, create a folder named PHP in C:\ and unzip php4.4.2 archive into C:\PHP\. After that, copy "php4ts.dll" from C:\PHP\ (not cut/paste, just copy) to C:\Windows\System32\

3) Now unzip the FastCGI binary and copy isapi_fcgi.dll into C:\PHP\

4)After that you will require to add PATH for PHP.

right-click My Computer -> Properties -> Advanced tab -> Environment Variables -> double-click the Path variable in the list of System variables.

At the end of the string add this:

;C:\PHP

do not put ; in front of C:\PHP if there is already one there. It should not look as ;;C:\PHP.

Now, you can run PHP as ISAPI or CGI. Here is how you do it for both cases:

----------------------------
running PHP as ISAPI
----------------------------


Open IIS, expand local computer and click on 'Web Service Extensions'. Click on 'Add a new Web service extension...' and for the name type in: "PHP ISAPI Extensions" (without the quotes), click 'Add...' button and select isapi_fcgi.dll in C:\PHP. Check 'Set extension status to Allowed' and click OK.

Now add .php extension so that IIS can serve .php files: right-click on 'Web Sites' in IIS, then choose Properties and click on Home Directory tab. Click 'Configuration', Mappings, click 'Add'. Browse to isapi_fcgi.dll in C:\PHP, click OK, and enter ".php" (without quotes) in the 'Extension field'. Select 'Limit to' button and enter: GET,POST,HEAD

Ok ok ok ok... endless OK clicking. Once you're out, right-click on Websites again and choose Properties and then Home directory. Change the "Execute permissions" dropdown to "Scripts only". Also make sure that the 'Read' is checked in permissions you'll see above. Click OK and select all sites and click OK once again.

Open the Windows registry (Start -> Run -> regedit) and do the following:

Locate and expand "HKEY_LOCAL_MACHINE", right-click on "Software" and select "New", "Key" and type "FASTCGI".

Right-click on your new "FASTCGI" key and select "New, "Key" and type ".php".

Right-click on ".php", select "New", "String Value" and type "AppPath". Double-click on this new value and type "c:\PHP\php.exe".

Right-click on ".php", select "New", "String Value" and type "BindPath". Double-click on this new value and type "php-fcgi".

Close the registry.

Rename C:\PHP\php.ini-recommended to php.ini and move it to C:\Windows\

Then open php.ini and locate "extension_dir" (CTRL+F). Make it like this:

extension_dir = "C:\PHP\extensions"

Save and restart IIS.

-------------------------
running PHP as CGI
-------------------------

Open IIS, expand local computer and click on 'Web Service Extensions'. Click on 'Add a new Web service extension...' and for the name type in: PHP CGI Extensions, click 'Add...' button and select php.exe in C:\PHP. Check 'Set extension status to Allowed' and click OK.

Now add .php extension: right-click on 'Web Sites' in IIS, then choose Properties and click on Home Directory tab. Click 'Configuration', Mappings, click 'Add'. Browse to php.exe in C:\PHP, click OK, and enter ".php" (without quotes) in the 'Extension field'. Select 'Limit to' button and enter: GET,POST,HEAD

Ok ok ok ok. Right-click on Websites again and choose Properties and then Home directory. Change the "Execute permissions" dropdown to "Scripts only". Also make sure that the 'Read' is checked in permissions you'll see above. Click OK and select all sites and click OK.

Open the Windows registry (Start -> Run -> regedit) and do the following:

Locate and expand "HKEY_LOCAL_MACHINE", right-click on "Software" and select "New", "Key" and type "FASTCGI".

Right-click on your new "FASTCGI" key and select "New, "Key" and type ".php".

Right-click on ".php", select "New", "String Value" and type "AppPath". Double-click on this new value and type "c:\PHP\php.exe".

Right-click on ".php", select "New", "String Value" and type "BindPath". Double-click on this new value and type "php-fcgi".

Close the registry.

Rename C:\PHP\php.ini-recommended to php.ini and move to C:\Windows\

Then open php.ini and locate extension_dir. Make it like this:

extension_dir = "C:\PHP\extensions"

Make sure that you disable force redirect, otherwise CGI won't work. To do so, find cgi.force_redirect (CTRL+F) and make it look like this:

cgi.force_redirect = 0

Save and restart IIS.

--------------------------------------------

Create a new file in c:\Inetpub\wwwroot called test.php and put in it. Load it in IE like http://localhost/test.php and you should see PHP output.

There you go, you have manually installed PHP on Windows.
__________________
insert sig here
Reply With Quote
  #2 (permalink)  
Old 08-25-08, 17:11
BOD Member
 
Join Date: Jul 2007
Posts: 296
Default HOWTO Change MSDE Pass and Plesk Setup

Last night I was determined to get the Plesk MSSQL connection going the easy way without the command line so everyone get a chance if things are not going as smooth as it should be. This howto will explain you how to change the MSSQL admin password (commonly known as "sa" user) and integrating it into Plesk for hosting use.

First of all, login to RDC using your windows (I think this is already known so I'll save it) and open an IE window from the VPS. Download the MSDE Manager. You will have to add the site to the trusted network, so please do so. After the download you can delete it if you are unsure about leaving it there.

Unzip the content of the file and proceed to install the program. The default settings will do for now, so go to "next, next next". Easy huh? Well, here's the "trick".

Open the MSDE Manager by going to:

Start --> All Programs --> MSDE Manager --> MSDE Manager 7

Once you get into the program, go to:

File --> Connect...

In "Server" leave it to "(local)" (no quotes please). For "Security" select "Use Integrated Security" and leave those 2 fields blank. Click "connect".

Now select: "Logins" and "Change a Login's Password".

Select the "sa" user and create a new password for it. Once this is done click on "Change Now".

Now you have changed the MSSQL administrator's password. You can close the program and logout of Remote Desktop (This is veyr important. Be sure to Logout from RDC from the start menu and do not close it from the "x" above".

Now login to Plesk and go to "System" --> "Server".

Select "Databases".

At the "Microsoft SQL Server" tab change the following:

Server Name: (get from My Computer -> System Properties -> Computer Name)
Administrator's Login: sa
Administrator's Password: The password you just set in MSDE Manager
Confirm Password: confirm it.

Click on "OK".


If you setup everything correctly, you'll see that the 2 buttons above will get colored instead of greyed out. This means that the database connection was completed successfully.

That's it!! Now you can go and start creating MSSQL databases from your Plesk Admin or for your customers once we get out of beta!!
__________________
insert sig here
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 02:56.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.