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 -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP 5.1.6 + Apache 2.2.3, PHP Will not Display.
Author
Kaiba



Joined: 18 Oct 2006
Posts: 4

PostPosted: Wed 18 Oct '06 10:24    Post subject: PHP 5.1.6 + Apache 2.2.3, PHP Will not Display. Reply with quote

Hello Everyone,
I'm new to this site (nice to meet you all o.ob) as well as new to PHP and Apache. ><' I have followed all the official instructions to install both Apache and PHP. I have the PATH set to my PHP Directory which is C:\php. I've also downloaded and installed the Redistributable Package, the new .dll and the manifest, and have put all in their correct places. I've changed the path and the config for apache every way i can think of. Including moving files to the apache folder, switching slash types, ending slash no ending slash, quotes no quotes. I really just dont know what to do anymore T_T Seems the installation guide for these two by Steffen has helped everyone and ive done it 3 times over just to make sure, but no luck. ><;; I have Apache working, i can view .html files just fine, but .php will not work, its just a white screen. It's not syntax im pretty sure, im using standard <?php ?> tags and tried several commands besides phpinfo, but with no luck. I really want to learn php and mysql and such but this is killing me! XD I apologize for wasting your time if this has already been adressed, but I looked, and couldn't find anything that helped. Thank you all for your time. I'm pretty drowsy, but I'll try to list everything for you all. @_@

Apache httpd.conf looks like:
1. LoadModule php5_module "C:/php/php5apache2.dll"
2. AddType application/x-httpd-php .php .html
3. AddType application/x-httpd-php .php-source .phps
# configure the path to php.ini
4. PHPIniDir "C:/php"

Operating System:
Windows XP Media Center Edition, Version 2002, SP2

Browsers Tested In:
Firefox 1.5.0.7, Opera 9.00, Internet Explorer 6.0

Apache Bottom Left of Status Bar: Apache/2.2.3 (Win32) PHP/5.1.6

Apache Install Location:
C:\Program Files\Apache Software Foundation\Apache2.2

PHP Install Location:
C:\php

Added C:\php; to PATH in System>Advaced>Evironmental Variables>PATH

Placed httpd.exe.manifest in Apache2.2/bin, overwrote php5apache2.dll in C:/php with Steffen's .dll, installed the Redistribution thing (forget name ^^;) and edited the php.ini (from php-ini-recommeded) to: extension_dir = "C:\php\ext".

All of the test .html and .php files are in the htdocs folder, and have tried .php's created by Dreamweaver and Notepad ("phpinfo.php" with quotes). Also, View Source through browser shows the <?php phpinfo(); ?>.

Have downloaded and installed everything in Steffen's guide, and named/edited everything exactly as was told in it. Sorry about the long post, just trying to give as much info that would be needed as I can think of. Thank you all for your time, have a great day! \^^/
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Wed 18 Oct '06 13:24    Post subject: Reply with quote

Good post, in line with the froum rules, an example for others.

AddType application/x-httpd-php .php .html

This is not correct, the .html should not be there.

Try:

LoadFile "C:/php/php5ts.dll"
LoadModule php5_module "C:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php
PHPINIDir C:/php


Steffen
Back to top
Kaiba



Joined: 18 Oct 2006
Posts: 4

PostPosted: Wed 18 Oct '06 17:15    Post subject: Reply with quote

Hey Steffen,
Thanks for the quick,helpful response, and kind comments. \^^/ I had kept the .html on there because the Php/MySQL/Apache book said to do both so it would parse both file types. Doh! ><;; I had tried without it, but it didn't seem to do anything. Thanks for bringing this to my attention. Should I put those lines in a certain area of the httpd.conf or can I just put it anywhere in it? Thanks again for the help :D Have a good day!
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Wed 18 Oct '06 17:31    Post subject: Reply with quote

Anywhere.

Steffen
Back to top
Kaiba



Joined: 18 Oct 2006
Posts: 4

PostPosted: Wed 18 Oct '06 17:42    Post subject: Reply with quote

w00t! :D It works! Thank you so much for all the help Steffen! <3 My day has gotten a bit brighter now lol. Time to turn myself into a coding zombie @_@;; Have great day, and thank you again for your quick and helpful reply!
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3093
Location: Hilversum, NL, EU

PostPosted: Wed 18 Oct '06 19:57    Post subject: Reply with quote

Kaiba wrote:
Have downloaded and installed everything in Steffen's guide, and named/edited everything exactly as was told in it.


Which guide from you me do you mean here ? I did not write a guide.

Steffen
Back to top
Kaiba



Joined: 18 Oct 2006
Posts: 4

PostPosted: Thu 19 Oct '06 3:12    Post subject: Reply with quote

Oops! ^^;; Sorry about that, it was Pnllan's guide. Was quite tired after messing with php+apache for several hours. Saw it on another website as written by you, and just didn't think to actually look at the name by the post lol. ; ; Sorry about that to the both of you, and very nice guide Pnllan. It has helped quite a few people from what i have seen. *blush* ^^;

The link to the guide I referred to (on Apache Lounge) is:
http://www.apachelounge.com/viewtopic.php?t=570
Back to top


Reply to topic   Topic: PHP 5.1.6 + Apache 2.2.3, PHP Will not Display. View previous topic :: View next topic
Post new topic   Forum Index -> Other Software