Posts Tagged ‘IIS6’

How do I install PHP (64-bit) on a Windows Server?

October 15th, 2009
  1. Log into your server through Terminal Services or Remote Desktop Connection.
  2. Open a Web browser and load http://www.php.net/downloads.php
  3. Download the Windows PHP5.x ZIP package.
  4. Create a new directory, c:\PHP.
  5. Unzip the file you downloaded above into c:\PHP.
  6. Create a new directory, C:\PHP\phpsessions.
  7. Right click the C:\PHP folder and select Properties.
  8. On the Security Tab click Add.
  9. Type IUSR_COMPUTERNAME (where computer name is the name of your computer) in the text area, click Check Names and then click OK.
  10. Select the IUSR_COMPUTERNAME user, check the Full Control box and click OK.
  11. Open C:\PHP\php.ini-dist in Notepad.
  12. Within the file, make the following replacements:
    • Replace ;extension=php_mysql.dll with extension=php_mysql.dll
    • Replace ;session.save_path = “/tmp” with session.save_path = “C:\PHP\phpsessions”
    • Replace session.gc_maxlifetime = 1440 with session.gc_maxlifetime = 43200
    • Replace SMTP = localhost with SMTP = smtp.yourdomain.com
    • Replace ;sendmail_from = me@example.com with sendmail_from = user@yourdomain.com
  13. Save the file as C:\windows\php.ini.
  14. Copy C:\PHP\libmysql.dll and C:\PHP\ext\php_mysql.dll to the C:\windows\system32 folder.
  15. Open IIS located under Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager.
  16. Right click Web Service Extensions and select Add a new Web service extension.
  17. Enter php as the Extension Name, check Set extension status to Allowed and Click Add.
  18. Enter the path to C:\PHP\php5isapi.dll and click OK.
  19. Right click Web Sites and select Properties.
  20. On the ISAPI Filters tab, click Add.
  21. Enter php as the Filter Name, enter C:\PHP\php5isapi.dll as the Executable and click OK.
  22. On the Home Directory tab, click Configuration.
  23. Click Add.
  24. Enter C:\PHP\php5isapi.dll as the Executable, enter php as the Extension and click OK.
  25. On the Documents Tab, click Add.
  26. Enter index.php and click OK.
  27. A popup box may appear asking if you want to apply the settings to certain websites. Choose specific websites to enable PHP on or Select All and click OK.
  28. Right click your Computer Name, expand All Tasks and click Restart IIS.
  29. Choose Restart IIS from the dropdown menu and click OK.

*Make sure the permissions to your PHP folder have “NETWORK SERVICE”, “IUSR_*”, “SYSTEM” included.* If not php will not load!

SmarterMail on a 64 bit server with ASP.NET 2.0

December 11th, 2008
How To – SmarterMail on a 64 bit server with ASP.NET 2.0

Applies to: SmarterMail (all versions)

When the SmarterMail Service (mailservice.exe) is running in 64 bit mode, it is incompatible with IIS running in 32 bit mode. When running the webmail of SmarterMail under IIS a “Bad Data” exception may appear.

Bad Data.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: Bad Data.

There are several options available to remedy this situation.

Option 1: Switch IIS to run in 64 bit mode

  1. Verify that the web site is running as an ASP.Net 2.0 web site by going to the properties for the site and clicking on the ASP.Net tab.
  2. Click Start, click Run, type cmd, and then click OK
  3. Type the following command on one line to disable the 32-bit mode:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
  1. Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
  1. Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.

Please note that performing these steps will result in IIS running in 64-bit mode.  If you have other ASP.Net sites running on the server, ensure that they are compatible with 64-bit mode and are not running ASP.Net 1.1 before making changes.

If you do have other ASP.NET 1.1 sites running, please view this KB Article for further options: http://support.smartertools.com/Customer/KBArticle.aspx?articleid=170

Option 2: Switching the SmarterMail service to run in 32 bit mode

  1. Download and install ASP.NET 2.0 SDKs (Software Developers Kit). It is available from http://www.asp.net/downloads/essential/
  2. Once the SDK has been installed, use the corflags.exe program to force the SmarterMail service to run in 32 bit mode. With the following command. Replace <executable> with the path to the mailservice.exe file.
corflags.exe <executable> /32BIT+

To reverse this operation, perform the following command. Once again, replace <executable> with the path to the mailservice.exe file.

corflags.exe <executable> /32BIT-

For more information on the CorFlags Conversion Tool visit the following page:
http://msdn2.microsoft.com/en-us/library/ms164699%28vs.80%29.aspx