Apache Wont Display PHP
Moderator: General Moderators
-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
I added those lines at these points in the httpd.conf file in the conf folder in the Apache 2 folder:
First:
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule php5_module c:/php/php5apache2.dll
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
Second:
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-httpd-php .php
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
I am able to see the source code when I select source from the drop down tab on Internet explorer.
I restarted the server by doing so with the Apache controller in the sys tray and also the restart executable in my start menu.
Thanks for the assistance.
First:
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule php5_module c:/php/php5apache2.dll
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
Second:
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-httpd-php .php
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
I am able to see the source code when I select source from the drop down tab on Internet explorer.
I restarted the server by doing so with the Apache controller in the sys tray and also the restart executable in my start menu.
Thanks for the assistance.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Ok, try adding these addHandler calls in your httpd.conf file...
Restart apache and see what happens.
Code: Select all
# Put these just above the AddType declaration
AddHandler php-script .php
AddHandler php-script .inc
AddType application/x-httpd-php .php-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
If you do not want to bother with installation issues any longer you might try something like http://www.apachefriends.org/en/xampp.html
-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
Thanks. I'll give that a shot.
-I didn't post my progress yesterday because I wasn't able to make any (I had company drop by). However, installing a new php and using a different .ini out of the two they provide didn't help. This was already my second apache installation, but it was a lower version than the previous one due to another problem that was fixed by installing this version (that contains the threads stated problem).
I'll try one more time to do this manually but after that I'll just use xampp.
-I didn't post my progress yesterday because I wasn't able to make any (I had company drop by). However, installing a new php and using a different .ini out of the two they provide didn't help. This was already my second apache installation, but it was a lower version than the previous one due to another problem that was fixed by installing this version (that contains the threads stated problem).
I'll try one more time to do this manually but after that I'll just use xampp.
-
Cladinshadows
- Forum Newbie
- Posts: 10
- Joined: Sun Aug 06, 2006 3:57 am
Okay, after reinstalling Apache (2.0.59 again) and reintering the info, php opens and is viewable. Now I can really start in on my learning book!
Thanks to Volka and Everah for your time and help.
Thanks to Volka and Everah for your time and help.
Last edited by Cladinshadows on Thu Aug 10, 2006 3:38 am, edited 1 time in total.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA