PHP Installation and Config
PHP Installation and Config
1. Requirements
To install PHP,MySql and Apache on your system you must have the following backups: 1- PHP (version 4.0 or more) 2- My Apache (version 2.0 or more) 3- MySql (version 4.0 or more) 4- Eclipse (will be use for working environment) 5- SQLyog (will be used for database interface)
2. Installation Guidance
12345Place PHP folder in C drives (or install on your C drive). Install My Apache on you system. Install MySql on your system. Install Eclipse (you can use other software like Dream weaver etc.) Install SQLyog (you can use other software for database interface like phpMyadmin.)
3. Configuration 3.1
My Apache
By default installation of My Apache will be on the path C:\Program Files\Apache Group Open the file httpd.conf, this file will be located in C:\Program Files\Apache Group\Apache2\conf Add the following lines to the end of httpd.conf LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php"
1st line indicates where the module needed for apache to load php is located 2nd line indicates the type of php script whether it php or php3 e.t.c 3rd line indicates where your php.ini file is located (the path where apache is have to look for it)
Change the path of your web root directory (optional). Search the line: DocumentRoot " C:/Program Files/Apache Group/Apache2/htdocs" And change it like: DocumentRoot "D:/htdocs" Close httpd.conf. Restart Apache (After make any change you must have to restart Apache).
3.2
PHP
Open"php.ini-recommended" file, made a copy of it and renamed the original one into php.ini. This file will be located in C:/php. In the next step, open php.ini file, found a line extension_dir = "./" and change it for extension_dir = "C:\php\ext" Then find a line ;extension=php_mysql.dll and remove the semicolon in the beginning. Saved the document. Restart Apache (After make any change you must have to restart Apache).
4. Working
Place your web sever directory (e.g. "D:/htdocs" as we have mentioned on above). Now open internet explorer, try to access system by writing http://localhost/directory name
Hassan Khan