Archive for October, 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 = [email protected] with sendmail_from = [email protected]
  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!

Tags: ,

Comments No Comments »

If you’ve every attempted to upgrade / update cpanel via easyapache via the control panel or shell access and return the following erorr, changes are the rpm database is corrupt and needs to be rebuilt;

!! Package system can not be repaired automatically !!
!! Please visit http://www.cpanel.net/support/could_not_ensurepkgs.htm for help with this error. !!
!! Restoring original working apache !!

To correct this, you simply need to check to make sure that yum and any rpm’s are not running by doing the following;

ps auxwww | grep yum
ps auxwww | grep rpm

After that, you need to do the following;

rm /var/lib/rpm/__db.* -rf
rpm -rebuilddb

This will rebuilt the rpm database and depending on what needs to be updated it can take some time to update. Once this is done however you should be able to run easyapache without error.

Tags: , , , ,

Comments No Comments »