Setting up your first web server on windows with Apache, PHP and MySQL
Published: August 5, 2003
User Rating: 9.1 (514 votes)
Installing PHP
-
Unzip the php installation zip file to a directory such as
"C:\PHP"
or"D:\PHP"
. For this article we 'll assume that PHP is installed in"C:\PHP"
directory.Make sure that while unzipping, you have selected the options to hierarchically create sub-folders. For e.g. "Use folder name" (in WinZip). This option 'll automatically create the subdirectory and put the respective files in them automatically.
-
After you have unzipped the files, Edit the
"php.ini"
file. If thephp.ini
file does't exists, then copy and rename the"php.ini-recommended"
to"php.ini"
.Edit
php.ini
file and find the"extension_dir"
entry and enter the absolute path of the directoryextension_dir="C:/PHP/extensions/"make sure you enter the directory where you installed the PHP and take care of the slashes while entering. Save and close the file.
-
Enter the following command in the command prompt in the PHP directory
php -vIf you see the the version of php printed without any errors. The PHP has been successfully installed.
Warning:
While editing
php.ini
look for line like having text likec:\Program Files\Zend\ZendOpimizer.dll
or linking to similar file. Make sure that the file exists in the exact same position. If not comment out the line by putting a ; (semi-colon) as the first character of the line.Also, if you have enabled few extensions like
extension=php_xslt.dll
, then these extensions require few files found inc:\php\dlls
likeexpat.dll
,sablot.dll
,iconv.dll
, etc which are needed to be moved to the WINDOWS\System32 folder. You 'll find out when you check the version of php or start Apache (integrated with PHP).
About
Amit Arora is web developer with expertise in developing eCommerce enabled websites for the businesses.
Monitored by Site24x7
Uptime