Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: apache 2.2.6 php 5.2.4 on Vista |
|
Author |
|
theDumples
Joined: 26 Sep 2007 Posts: 2
|
Posted: Wed 26 Sep '07 9:04 Post subject: apache 2.2.6 php 5.2.4 on Vista |
|
|
I've installed apache-2.2.6-win32-x86-openssl-0.9.8e without trouble.
I loaded the default page without trouble.
I've installed php-5.2.4-win32-installer and it appeared to run without a problem.
apache installed in
Quote: | c:/Program Files/Apache Software Foundation/Apache2.2 |
php installed in
Quote: | c:/Program Files/PHP |
When i opened the httpd.conf file I saw no entry for loading the PHP dll/module so I added the following after the last LoadModule:
Quote: | LoadModule php5_module "C:/PROGRA~1/PHP/php5apache2_2.dll"
PHPIniDir "c:/PROGRA~1/PHP"
AddType application/x-httpd-php .php |
I tried the usual spelling of "Program Files" first but thought perhaps the space is what is causing the problem.
I saw someone suggest running apache in debug so I ran the following:
Quote: | C:\PROGRA~1\Apache Software Foundation\Apache2.2>bin\httpd.exe -w -e debug -f .\conf\httpd.conf |
The output is a list of successfully loaded module. The PHP module is not in that list.
I noticed that in the httpd.conf file all the modules are being loaded from modlues/ and the modules all have .so endings? on windows?
In addition I created a simple test file under htdocs called hello.php
Code: | <html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
<?
phpinfo();
?>
</body>
</html> |
browsing to http://localhost/hello.php returned a lovely blank page.
I thought this would take me 10 minutes to configure.
Help please |
|
Back to top |
|
theDumples
Joined: 26 Sep 2007 Posts: 2
|
Posted: Thu 27 Sep '07 8:53 Post subject: I solved my own problem. |
|
|
The version of apache I used was a binary fresh off of httpd.apache.org. I saw elsewhere in these forum that there is this thing called the down-LOADS section of apachelounge I downloaded the 2.2.6 patched binary from there along with the latest PHP module.
After extracting the zip I attempted to run httpd from the command prompt. I got "invalid ServerRoot"
I edited the httpd.conf file correcting it to where I had placed apache2.
This did not work.
I "gave-up" trying to place it in a subdir containing a space in the name and alas placed it in "c:/"
After that:
I first made sure httpd ran:
Code: | c:/apache2/bin/httpd -w -e debug |
it did.
next I used the php dll/module I got from php.net after adding the LoadModule declaraton to the httpd.conf
Running httpd again in the console I saw that the module loaded--Finally!
I made the remainder of my config changes to the httpd.conf file, moved the hello.php file into the corect dir,
restarted httpd in console/debug mode
It worked.
Note: I used the php5apache2_2.dll from php.net and not the module from apache lounge. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 16 Oct '07 4:52 Post subject: |
|
|
just a tip ... any file locations that have a space need to be quoted in any of the .conf file
ServerRoot "C:/program files/apache group/apache2"
I think I had problems with PHP module outside of the Apache tree. I just dropped a copy of php5apache2_2.dll in the Apache modules directory and called as normal.
It seems to be ignoring the PHPIniDir "c:/program files/PHP" so I just put php.ini in c:\windows and all works fine for me.
Actually, in my case, both PHP and Apache are not in /program files, heck, they aren't even on the C drive. I realized back in version 1.3.3, yes 1.3.3, that getting Apache out of program files/apache group made for much less work when configuring it. c:/apache22 is much less work than "c:/program files/apache group/apache22." I think this is the first time I've typed all that in 9 or 10 years |
|
Back to top |
|
|
|
|
|
|