Jump to content

New PHP Install


Recommended Posts

You'll need to install PHP with an HTTP server too, eg IIS or Apache. Unless you're confident with the command line to run your php scripts. In which case open the command line and type in

php -v

You may need to change directory to where PHP is installed for the command to work.

 

The way I recommend to setup PHP on Windows is the following. Personally I do not recommend the use of the PHP installer. I'd recommend you to uninstall PHP, delete any files left over. Go to http://windows.php.net/ and download the VC6 x86 Thread Safe zipped package. Extract the zip to C:\Server\PHP. Download Apache 2.2 MSI Installer from http://httpd.apache.org

 

Install Apache to C:\Server\Apache (using custom install). Once installed. Open Apaches httpd.conf file (located in C:\Server\Apache\conf). Add the following lines at the end of the file

LoadModule php5_module "C:/Server/PHP/php5apache2_2.dll"
PHPIniDir "C:/Server/PHP"
AddType application/x-httpd-php .php

Save the httpd.conf

 

Next you'll want to go to C:\Server\PHP and find the file name php.ini-recommended and rename it to php.ini

Now you'll want to add C:\Server\PHP to the PATH Environment Variable.

 

Restart Windows. You have now installed PHP and configured Apache with PHP. To test go to C:/Server/Apache/htdocs

Delete any files already in that folder and create a new file called info.php with the following code

<?php phpinfo(); ?>

 

Ensure Apache is running (there should an Apache icon present in the taksbar, with a green triangle which indicates Apache is running). Open you browser and go to http://localhost/info.php

You should see a page displaying your current php version with details about its settings and environment. Everything is now setup and is working correctly. To configure PHP edit the php.ini in C:/Server/PHP/php.ini.

 

Remember whenever you make any changes to the httpd.conf or php.ini you will need to restart Apache for the changes to take effect.

Link to comment
https://forums.phpfreaks.com/topic/193722-new-php-install/#findComment-1020031
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.