Monday, 15 June 2009

Install MySQL and configure it with your pc


MySQL is the most popular database server because it's a open source software. And this sofware is widely used with php. In this turorial I'll show you how to install MySQL database Server on your computer using localhost. So lets start...

1. To install MySQL on Windows platform, get the latest version of MySQL from the http://mysql.com. After downloading the binary file (e.g .exe) for windows double click the executive file the installation wizard appear.

2. Click next until it finished installation process. After finishing installation a window will appear and want to give the user name and password. This window will come anywhere in the installation process. Give your name and a password. This name and password will be needed when you enter into the MySQL server. Note that in the installation process the higher version of MySQL (here i'm using MySQL 1.4 version) may needs your host name. If it does type your host name as localhost or if you have any host then select your host .Click ok or Finish to complete the installation process.

3. After successfully install MySQL on your pc find the directory where to install this program. This directory would be C:\mysql or C:\Program Files\mysql or enywhere else. Go on to the mysql directory ../mysql/bin and find the "winmysqladmin.exe" file. Just below the figure:

4. After double clicking this file WinMySQLadmin window will appear. All of the database information is given here. Here you'll find the "my.ini" tab. Select this tab, you'll get your user name and password that is needed to assess the database. After clicking this file MySQL database will be created into the ../mysql/data directory. So clicking this file is necessary. The WinMySQL window is given below:



5. In C:\windows directory a "my.ini" file is also created. Open this file using Notepad and check this information. If all information is right close this and you're ready to enter into the MySQL server.

Now after completing this tasks MySQL database Server is completely installed in your computer. In the next turorial we'll show how to access into the MySQL database Server, create a database, how to show database and so on.

Thanks for reading this tutorial.

Sunday, 14 June 2009

Install IIS and configure it with php


Because php is a server-side scripting language, it needs a web server to run its scripts. The most widely used Web Servers are Apache and Internet Information Services (IIS). Apache mainly used on Mac OS X, Linux and Unix platform. And IIS is widely used on Windows platform. In this tutorial I'll show how to install IIS and configure it with php. So lets start...

1. Enter your Windows XP CD/DVD rom into your CD/DVD drive. After appering the setup window click exit.

2. Go on to the Control panel and and select "Add or Remove Programs" icon. In the Add/Remove window select "Add/Remove Windows Componet" button on the left pane. A setup wizard will appear. Which is shown below:



3. From this wizird select the IIS check box and click the detais.. botton and select the all check box so that any componet should not missed. Now click Next and after successful installation click Finish button. Now IIS is installed on your computer.

4. Now go on to the Control panel and select "Administrative Tools" and then select IIS. IIS window will appear.

5. On the left pane open up "Default Web Site" menu and right click it and select properties. Just like figure below:



6. Default Web Site Properties will appear. Which looks like below:



7. Click the "ISAPI" Filters tab and click the add button. Create a new filter called PHP. And in the executable field select the file "php5isapi.dll" in the C:\php\ directory. To select this file click browse button and select this file in the above directory and then click ok. See the figure below:



8. Now go on to the Home Directory button select the configuration button and select the Add button. In the executable field browse the file "php5isapi.dll" just like above and in the extension field type ".php" and click ok. Which is shown in the following figure:



9. Keep all this configuration and click apply and then ok. Restart the window.

10. Now you've configured IIS with php and you're ready to start php scripting. To test a php script, open Notepad and type the code below:

phpinfo();
?>

And save it into to the "C:\intpub\wwwroot" directory. This directory is called "Web directory". All your php files must be in the web directory unless your web server can't find them. Make sure that your file extension must be .php such as "test.php".

11. Open up your browser and type "http://localhost/test.php" in the address field. The php's all information window will appear. Which is shown in the following figure:



If you see this window, php is perfectly installed and configeured it with IIS on your computer. Now ready to start php scripting and enjoy!!.

Thanks for watching this tutorial.

Installing PHP and configure it with MySQL and IIS in Windows platform


For a beginners it's not so easy to setup php and configure it with MySQL and IIS. When I was younger, I felt some great trouble to install of these. For this reason, i'll discull the whole process of these, so that a beginners can get some advantage with these tutorials. In this tutorial, i'll discuss the installation process only for the Windows platform. But in Mac OS X or Linux platform, the configure and many terms are almost the same. So I think every user can get some advantage with these tutorials. So lets start....


1. First to show up the files extention, click MyComputer icon on your desktop. Now from the menu bar select Tools and from the pop-up menu of Tools select Folder Options... and select the view tab. Under view tab uncheck the check box of "Hide extensions for known file types". Just like figure below:


After completing this task you can show every file with extension. Which is shown in below:


2. Downloading the latest version of zipped windows binaries form the http://www.php.net website. The zipped version should looks like this:

3.Now create a folder in the C:\ drive and name it php or php5. The directory for this folder will be: C:\php

4. Now enter into the php's zipped folder and unzip the whole files of its into the exactly C:\php directory.

5. Now in the C:\php\dev directory you'll find "php5ts.lib" file. This is a library file. Copy this file and paste it into the C:\windows\system32 directory.

6. Again in the C:\php\ext directory you'll find many *.dll files. Copy all of these files and paste it into the C:\windows\system32 directory.

7. Now in the C:\php directory copy the whole of the dll files and similarly paste it into the C:\windows\system32 directory.

8. Now in the C:\php directory you'll find the "php.ini-dist" file. Copy this file and paste it into the C:\windows directory and rename it "php.ini" and open it with notepad.

9. Press Ctrl+F and type "php_mysql.dll". After find this word remove the semicolon from the left of its, just like figure below. If you not remove this semicolon, you can not access to the MySQL server later.


10. Now from the file pop-up menu click save and then exit.

11. Restart your windows now. It must be done.

Now php is installed on your machine!!. So ready for php scripting!!. But you have to wait for php scripting because php is a server-side scripting language and it needs a web server to run its scripts. So in the next tutorial after installing IIS server we'll going to the php scripting.

Thanks for reading this tutorial.