Jump to content

Installing Php on Windows x64 pro problems


Recommended Posts

I’m having a problem installing PHP (and subsequently mySQL though I haven’t gotten that far yet) on Windows XP x64. I get as far as installing Apache and it works up until anything PHP is added into the httpd.conf file, no matter which solution I take to install PHP it give me an error, apache won’t load what have you.

 

When working form the installer, unless I tell it the exact folder the httpd.conf file is in it won’t add the php module information in, if I do add the full path it tells me there is a getobject error or something and common to both it says I need to manually configure the server…

 

Does anyone have any one have any idea what minute facet of PHP is imploding on me?

 

I have a working PHP server on my x32 os so its not that critical however I would like to get the x64 working so I can hopefully switch out permanently because of compatiblilty issues I’m having with buggy packages on x32.

 

Link to comment
Share on other sites

I would recommend installing PHP manually rather than use the installer.

 

First download the zipped binaries version of PHP, you can get this from php.net/downloads. Once the zip file has been downloaded, extract the contents of the zip to C:/php

 

Next Add PHP to the PATH Environment Variable. Make sure Windows is restarted in order for the changes to take effect.

 

Now open Apaches httpd.conf file and add the following lines to the end

LoadModule php5_module "C:/php/php5apache2_2.dll"
PHPIniDIr "C:/php"
AddType application/x-httpd-php .php

 

NOTE: I amuse you're using Apache2.2.x, if you're using Apache2.0.x then the loadModule line will need to be changed to

LoadModule php5_module "C:/php/php5apache2.dll"

ENDNOTE

 

After save the httpd.conf. Next navigate to C:/php and find a file called php.ini-recommended rename it to just php.ini and open it for editing. Scroll down and find the following line

extension_dir = "./"

Change it to

extension_dir = "C:/php/ext"

 

NOTE: DO NOT uncomment any extensions yet.

 

Save the php.ini and (re)start Apache.

 

Next create a file in Apaches Document root (eg C:/Apache/htdocs) called info.php. Within this file add the following

<?php phpinfo(); ?>

Now open you browser and go to http://localhost/info.php. If Apache is configured correctly you should see information about PHPs setup/environment. Scroll down and look for the Loaded Configuration File line it should be set to C:/php/php.ini (this is to ensure PHP IS reading the php.ini we have just modified).

 

PHP is now setup and your're ready to configure PHP as you wish.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.