Friday 20 January 2012

How to enable PHP Extension in Windows Server 2003 IIS 6.0.

Installing PHP:-

1.    Download PHP.
2.    Create a directory in C:\PHP as installation directory. Then extract the files from php-5.1.4-Win32.zip into C:\PHP.
3.    Locate the file ‘php.ini-recommended’ in C:\PHP and rename it to ‘php’. (without the quotes of course)
4.    Open the ‘php.ini’ file and find the line which reads extension_dir = “./” and change it to extension_dir = “C:\PHP\ext”.
5.    Add the location of PHP directory to the server’s PATH environment variable so that Windows knows where to look for any PHP related executables (such as the PHP extension DLL‘s).
-To do this Right-click on My Computer,
-click Properties
-On the Advanced tab click Environment Variables.
-In the Environment Variables dialog box, under System variables highlight the Path variable and click Edit.
-Add ‘;C:\PHP’ (be sure to include the semi-colon separator) and click OK.
6.    Re-boot the server for this change to take effect.

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

Configuring IIS to work PHP under IIS 6.0:-

 
1.    First we need to create and then enable an appropriate Web Service Extension so that IIS will both recognise and allow PHP files to be processed by the appropriate script engine.

2.    There is easier way of doing this by using the ‘iisext.vbs’, which we can find in C:\Windows\System32. Once we have this “iisext.vbs” file, we have to run below command in command prompt under C:\Windows\System32 directory.

cscript iisext.vbs /AddFile c:\PHP\php5isapi.dll 1 PHPISAPI 1 “PHP ISAPI”

3.    Now we can see, this script creates a new Web Service Extension in IIS, named “PHP ISAPI” with a status of Allowed.
----------------------------------------------------------------

For more information and screen shots on this, go to http://www.iisadmin.co.uk/?p=4

Monday 9 January 2012

How to check MX record of any Domain?

-Open a commnad prompt.
-Type "nslookup"
-Type "set q=mx"
-Type Domain name for which we want MX Record.

See below example.

-------------------------------
P:\>nslookupDefault Server:  stcdcpr01.prime-uk.local
Address:  10.250.1.12

> set q=mx> google.comServer:  stcdcpr01.prime-uk.local
Address:  10.250.1.12

google.com      MX preference = 10, mail exchanger = aspmx.l.google.com
google.com      MX preference = 50, mail exchanger = alt4.aspmx.l.google.com
google.com      MX preference = 40, mail exchanger = alt3.aspmx.l.google.com
google.com      MX preference = 30, mail exchanger = alt2.aspmx.l.google.com
google.com      MX preference = 20, mail exchanger = alt1.aspmx.l.google.com
aspmx.l.google.com      internet address = 209.85.229.27
alt4.aspmx.l.google.com internet address = 74.125.81.27
alt3.aspmx.l.google.com internet address = 74.125.127.27
alt2.aspmx.l.google.com internet address = 209.85.173.27
alt1.aspmx.l.google.com internet address = 173.194.69.27

Friday 6 January 2012

Restore deleted object in 2008 Active Directory?

There are few tool by which we can check deleted objects. Few of them are:
1) ADRestoreNET
2) ADRestore.exe

How to use ADRestoreNET
-Download ADRestoreNET.
-Extract the zip file,
-Install ADRestore.NET.msi,
-Open ADRestore.NET from Start>Program,
-Select Domain Controller Name, and click on Enumerate Tombstone.
-It will display all deleted objects.
-Click on object which we want to restore.
-Click on properties to show object details.
-Click on restore option to restore it.

How to use ADRestore.exe?
-Download ADRestore.exe.
-Extract the zip file,
-Open command prompt,
-type "adrestore.exe" (Without qoutes)
-It will display the active directory deleted objects
-If we want to recover the deleted user
-type "adrestore /r" (Without qoutes)
-Click yes on objects which we want to restore.


Note: Once we will restore object, it will show in correct OU where it was stored previosly. But it would be in disabled mode, we have to enable it manually.