logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Installing Apache2 and php5 on Windows
Author
OverclockIT



Joined: 17 Oct 2008
Posts: 2

PostPosted: Fri 17 Oct '08 17:40    Post subject: Installing Apache2 and php5 on Windows Reply with quote

Hey folks,

This is my first post so I'll try and be as clear as I can. I'm trying to install and run the above so I can do some web-based testing for a site build. I'm not a pro but a keen amateur. The instructions I have for the install are as follows:

Download Apache2

Agree the licence stuff

Set Network Domain and server name to localhost, adding an email adress for the admin.

Use a typical installation

Install in C:\ (effectively creating C:\apache2)

Unzip php5 into C:\php5\

Open httpd.conf (Apache main config file) and add the following code to the file, under Part 1, Global settings, below the main LoadModule code block:





Code:
LoadModule php5_module c:/php5/php5apache2.dll
AddType application/x-httpd-php .php
PHPIniDir "c:\php5"



Rename php.ini-dist to php.ini and save in C:\php5

Insert the following code in a text editor (in this case, notepad)




Code:
<?
phpinfo()
?>



Save the code in the htdocs directory of Apache as phpinfo.php

Restart Apache

Open a browser and navigate to

Code:


http://localhost/phpinfo.php


Which should in theory bring up a stats page effectively confirming the install is OK.

Of course, it doesn't. All I get is a 404 page. If anyone has any ideas on this I'd appreciate it as I could REALLY do with being able to check my php coding as I go.

Cheers
Back to top
joewillie2002



Joined: 17 Oct 2008
Posts: 1

PostPosted: Fri 17 Oct '08 18:50    Post subject: Same Place Same Time Reply with quote

Hi
I seem to be about at the same place you are relative to installing Apache/PHP/MySQL on a Windows system. I am using Web Application Design & Implementation by Steven Gabarro. His book is slightly out of date due to the new implementations of the software. When I tried to do his <?PHP phpinfo(); ?>, I, too, got nothing since the browser could not find it. I got a clue by checking the Apache error log. I wound up commenting out several lines in the php.ini based on entries in that log.

Also, you probably need to check the last 3 lines he wanted you to add to the Apache httpd.conf file. The php5apache2.dll reference may not be exactly correct for your PHP. Find the correct entry in C:\PHP.

Eventually, I started getting a table like Gabarro said but, now, I am also getting a crash. From what I am seeing a php5ts.dll is barfing & I'm looking for a solution/cause of that.

Good luck.

Joe
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7306
Location: Germany, Next to Hamburg

PostPosted: Fri 17 Oct '08 19:39    Post subject: Reply with quote

Please see Basic PHP Troubleshooting

For apache 2.2 you need to use php5apache2_2.dll
php5apache2.dll is for apache 2.0.x
Back to top
OverclockIT



Joined: 17 Oct 2008
Posts: 2

PostPosted: Sat 18 Oct '08 15:15    Post subject: Reply with quote

Hey folks,

Thanks for the responses. Looks like I fell prey to Apache noob panic. Sat down and worked my way through it again from scratch and got it working. The problem was that the phpinfo.php file had not saved as a php file but a text doc. A basic error but enough to bring the whole installation to a grinding halt (of course). You live and learn. Doh!
Back to top
AMailer



Joined: 25 Sep 2006
Posts: 45
Location: Canada

PostPosted: Mon 20 Oct '08 7:15    Post subject: Reply with quote

Ah yes, has happened to me on fresh installs of windows; I forget to turn off the "Hide known extensions" Very Happy
Back to top


Reply to topic   Topic: Installing Apache2 and php5 on Windows View previous topic :: View next topic
Post new topic   Forum Index -> Apache