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.4 and php5 not working here |
|
Author |
|
bbxrider
Joined: 24 Feb 2007 Posts: 27 Location: stocktown ca
|
Posted: Sat 24 Feb '07 8:07 Post subject: apache 2.2.4 and php5 not working here |
|
|
ok, new to apache and php, this is for winxp pro
there are some really great instructions for this and i think i've done them.
when i address my test.php in ie i get the file contents not the php info stuff
<?php
phpinfo();
?>
here's what i've done
1. install apache 2.2.4, it works! at least from localhost
2. downloaded/unpacked php5 zip file to c:\php
3. added 'c:\php' to path variable, first one too! and restarted (and when not working, also copied php5ts.dll to windows system32 directory)
4. added to http.conf
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"
5. copied php.ini-dist to php.ini
6. made mods to php.ini
doc_root = "c:\apache software foundation\apache2.2\htdocs"
extension_dir = "c:\php\extensions"
7. restarted apache from program files|control apache server|restart
dang, it all looked so easy and so well documented
any suggestions would be greatly appreciated
thanks, bbxrider |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
bbxrider
Joined: 24 Feb 2007 Posts: 27 Location: stocktown ca
|
Posted: Sat 24 Feb '07 22:30 Post subject: missing something big time |
|
|
thanks for the reply
trying to follow the fast reliable etc instructions. i'm missing something very big here, which is the actual apache install after unzipping httpd-2.2.x-win32-x86-ssl.zip to a c:\apache2 folder. what i mean is installing the apache.exe into windows, registry entries, creating the directory structure with the bin/htdocs-etc, etc etc. with my first attempt i used the apache .msi installer which did all that.
the instructions say to follow the 'read me first!!' instructions to set up the service for apache, which i would have thought would be the step by step procedures that the .msi does. the only thing in 'read me first' is to install the vis c++ redistributale pkg, then unzip to the apache2 folder, then run httpd from the command prompt. there is a big hole from the unzipping to running httpd, as far as i can see. i haven't seen any instructions how to actually install apache after unzipping.
i checked http://httpd.apache.org/docs/2.2/platform/windows.html to install apache on windows, they say to use the .msi |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Sat 24 Feb '07 22:56 Post subject: |
|
|
Apache is installed after unzipping to c:/apache2. That easy.
After that just run in a DOS box to run as a serverive: httpd.exe -k install
Steffen |
|
Back to top |
|
bbxrider
Joined: 24 Feb 2007 Posts: 27 Location: stocktown ca
|
Posted: Sat 24 Feb '07 23:35 Post subject: working now but lingering questions |
|
|
first thanks for the micro second fast reply steffen
while waiting i reinstalled with the .msi, this time to c:/apache2 instead of program files/apache software foundation.......... then made the php mods to http.conf right after the last default LoadModule directive
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"
and test.php works fine now :-)
i think the problem i had b4 was the unzip didn't create sub dirs under apache2, so when i ran httpd from the cmd line it errored with 'can't find /conf/http.conf' because there was no 'conf' directory created from the unzip, i had the http.conf but it was in /apache2 with all the other 1000+ files, so not sure why the unzip didn't do that.
so i'm guessing that if that did work apache would have been running but just not as service.
i'm also guessing now that the httpd -install cmd installs the 'apache http server 2.2.4' in the ms program files and installs it as service, etc
so am very glad to get this far and now on to installing mysql.
thanks again for your help
bbxrider |
|
Back to top |
|
|
|
|
|
|