Subscribe

Subscribe To Mail

Powered By

I Love:
Blogger

Powered by Blogger

Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

PHP under IIS

Installing PHP under IIS:
You need to have PHP 5.2 or some version (size: ~26MB)
Step 1:
Extract the zip or rar file of PHP and place it in C:/PHP
Note that the folder Name is PHP (in Caps)
The PHP folder should contain a set of DLL files and “.ext”, extras and “dev” directories.
Step 2:
Go to control Panel – Administrative Tools – Internet Information Service
If IIS is not installed, install it.
Click on Local Computer – web sites –Right Click on default web Page –Properties.
Under Property Tab –Home Directory –configuration –Add –Executable –browse on C:\php\php5isapi.dll (extension: .php) click Ok
Now in Home Directory type in local path C:\inetpub\wwwroot. Click Ok
Step 3:
In C:\PHP
You will see file named “php.ini-recommended”
Do following alternations by opening that file in note-pad and need to do some configuration changes for PHP to work with IIS and also for MYSQL.
So, its better you have some basic understanding of what that “php.ini-recommended” is?  
It contains “;”( semi-colon) after sentences. To make some connections with PHP you need to remove the “;”( semi-colon). Done!!!!
Let’s start. You need to find the following lines in that file and alter. Use “Ctrl+f”-Find in case of difficulty in finding the sentences
Note: First 2 steps will make PHP work with MYSQL
Find 1                                                                                                                                                  extension=php-mysql.dll; -Find this and alter. Note remove semi-colon at end                            
  so it becomes extension=php-mysql.dll
Find2                                                                                                                                           extension=php-mysqli.dll; -Find this and alter. Note remove semi-colon at end                                              
so it becomes extension=php-mysqli.dll         
                                                                                                                                                              Note: You need to locate some directory for PHP to work. Understood!!
Find3                                                                                                                                                    extension-dir=”/” -here you need to type something and also remove semi-colon.                                           So it becomes extension-dir=C:\PHP\ext.                                                                                                  
 Note: You are locating the extension directory for PHP to work. Understood!!
Find4                                                                                                                                session.save_path=”/tmp” –type following and remove semi-colon.                                                         
 So it becomes session.save_path=”C:\PHP\sessions
Find5  upload_tmp_dir=”/”   -type following and remove semi-colon.                                                                So it becomes upload_tmp_dir=”C:\PHP\upload
Please do take your own time in finding the exact tags and change it. Remember to take out the semi-colons and uncomment them.
Now, everything set!! Save this file as “php.ini”                                                                                  
Make a copy of “php.ini” in C:\Windows Folder.                                                                    
Restart your system.
Step3: Testing your PHP
Create the PHP test file by typing the following code in the Note Pad
``````````````````````````
Phpinfo();
?>
``````````````````````````````
Save as: test.php
Place this under C:\inetpub\wwwroot\test.php
Now type this in your browser
If it shows details of php, then succeeded.
Configuring MYSQL to work with PHP
To do this Go to C:\PHP and copy the libmysql.dll and paste it in C:\Windows\System32
Common Errors: Error 10061                                                                                                          
 This is a common error you get in IIS when there are some errors for  MYSQL                                     
 So trouble shoot the following steps to overcome that error. The steps are                                            
1. Check whether Task Manager – Mysql-nt is running                                                                                 2. Check whether Firewall has 3306 port checked. (If not read above to find about configuring Firewall for IIS)                                                                                                                                  
3. Now come to php.ini file      
  If you have uncommented (removed semi-colons) for any other sentences said above. It may be the reason for the error. So check and replace semi-colons for others sentences.                                                    
 4. Now checking MYSQL facts in php.ini file                                                                                                          check under [MYSQL] in phi.ini file and see that below parameters are present; If not do add those parameter; Note these parameters must be compulsory present                                                                                            mysql.allow_persistent=on                                                                                        mysql.max_persistent=-1                                                                                                     mysql.max_links=-1                                                                                                     mysql.default_port=3306                                                                                            mysql.default_socket=25                                                                                 mysql.default_host=localhost                                                                                  mysql.default_user=root                                                                                 mysql.default_password=root                                                                                        mysql.connect_timeout =60                                                                                       mysql.trace_mode=off                                                                             
Hope you would have solved the problem.
for mysql under IIS check:  mysql under IIS

MYSQL under IIS

Configuration of MYSQL under IIS:
If you want to use asp .net along with MYSQL, you need to first configure it with IIS server. So, this tutorial will teach you how to configure MYSQL under IIS server.
Step1:
1.      You need to have MYSQL 5.0 or any (size: ~ 40 MB)
2.      You need to have MYSQL GUI tools (size:~ 20MB)
3.      You need to have MYSQL work bench as optional (size:~10MB)
Step2:
Install the MYSQL 5.0 (No difficulty here)
Install the MYSQL GUI Tools (No difficulty here)
Now, MYSQL server Instance config wizard will open.
Select the default (checked) values itself.
Ensure port is 3306.
If so, go to control panel—windows firewall—exceptions tab—Add Port—Port Number—type3306. Name: 3306. Click OK
Come back to wizard –
Root password:                                                                                                                                            Confirm password:
Type: root as password.
Now, your sever is Local host; username: root; password: root
Execute –Go to “C:\Prm Files\Mysql\Server\my.ini” and copy and paste the “my.ini” to C:\Windows.
If in any case you get any error like: Error 1045.
Follow this step. Initially you will get this error if you are installing new or first on your system. So, follow the below steps to solve that problem. By this method I am sure that problem will be solved.
Now, uninstall MYSQL. Delete MYSQL folders under program files also and then restart your system.
Now if you install back your MYSQL you won’t get that error for sure.
check configuring PHP under IIS in here:  php under iis

IIS Details

How to Install IIS?
Internet Information server/service is the server for asp.net web based applications-Microsoft server and you must need this server to work on Microsoft application like asp. Only if you have this you can work on asp applications. So, you need to install IIS to learn and work on asp.net applications.
So, I provided the following steps to install IIS.
1.      Check that you have your windows cd with you. (xp or vista) of which your currently using on system.
2.      Now go to control panel – Click Add/Remove Programs.
3.      Inside it on the Left side Tab Select- Add/Remove Window Components.
4.      From the list, check the Box-IIS and click Next.
5.      Now insert your XP cd for it to locate the file of IIS to install. If you have back up of Windows in hard disk you can manually locate from that also.
6.      Now you have installed IIS and you can find its location installed on c://inetpub which has the folders for web and ftp.
Next, configuring IIS:
In order for the IIS to work, you need to configure the server. Below are the easy steps
1.      Right Click- My Computer – Manage – service and application.
2.      Then from the list click on IIS. IIS has 3 folders 1. Web sites, 2. FTP sites, 3.Dfault SMPT.
3.      Now click web sites—default web site.
4.      Right Click on default web site and choose properties.
5.      From property box—click directory security –click EDIT on authentication –choose anonymous access and allow IIS to control password – click OK.
6.      Now you need to check whether your c drive has NTFS file system. If not you must change it to NTFS from your FAT system.
how to change: check this post- FAT to NTFS 

..