Jump to content

installing and configuring Apache2 + php5 on W7

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
Roman Y

Roman Y

    Programmer

  • Members
  • PipPipPipPip
  • 189 posts
Hi gang... here's the deal... started reading a book about php and MySQL anyway while instaling it's said to go to httpd.conf file and add 3 following lines at LoadModule section:

LoadModule php5_module c:/php5/php5apache2.dll

AddType application/x-httpd-php .php

PHPIniDir "c:\php5"

but when I do that and restart the apache server it wouldn't work. I checked the files I'm directing to and they're there so could anyone pls explain these 3 lines to me if they're important or not because I can't get server running with them.

#2
Roman Y

Roman Y

    Programmer

  • Members
  • PipPipPipPip
  • 189 posts
also ran the configuration... it says the module couldn't be found...

#3
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
After installing Apache 2, download the PHP binaries from php.net and place them in C:\PHP5, this is how Apache will know where the PHP binaries are. Your httpd.conf code's LoadModule line had no quotes around the path, so add them, but note if you are using Apache 2.2 you must comment out the first LoadModule line and add this instead:
LoadModule php5_module "c:/php5/php5apache2_2.dll"
Be sure the dll module exists in either case. Ensure httpd (Apache) is STOPPED and run
httpd.exe -k install
After you can start it with -k start, create a document that has <?php phpinfo(); ?> inside to verify it works.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#4
Roman Y

Roman Y

    Programmer

  • Members
  • PipPipPipPip
  • 189 posts
I did exactly that... as I said I checked that the files I was refering to were there. I didn't test it until after I installed php5 and changed php.ini-dist to php.ini

#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
To tell you the truth I'm not sure if installing Apache on Windows 7 is a straightforward task, Who knows what underlaying things changed. You can safely uninstall Apache 2 and PHP and install something meant for dev work, such as the more official XAMPP or an easier EasyWAMP. This comes packaged with Apache 2 and PHP5 pre-installed, so all you need to do is install it and run the module. It's generally without saying what all devs and server distributions use (LAMP stacks for example).
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#6
shivam

shivam

    Newbie

  • Members
  • PipPip
  • 27 posts
some one can tell me how to configure the TIMEOUT of apache in Wamp Server..:confused:

Edited by Orjan, 31 August 2010 - 12:57 PM.
You don't have to resize that text.