LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-28-2005, 11:44 PM   #1
blue penguin
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Debian GNU/Linux (Etch) GRUB, Kubuntu 5.10 GRUB/GNU/Linux
Posts: 27

Rep: Reputation: 15
Apache2 not processing PHP4 pages on Debian Sarge


Hi all,

I recently installed the .deb packages of Apache2 and php4 which I've been told should work out of the box but for some reason not on my machine.

I have read the apache2 and php4 README files and Googled. I have found that other people have posted similar threads and have been told to check that
Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
are enabled in their httpd.conf file
they are not enabled in my htppd.conf file because it seems to be superceeded by the apache2.conf file. My httpd.conf says
Code:
# This is here for backwards compatability reasons and to support
#  installing 3rd party modules directly via apxs2, rather than
#  through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so
AddType application/x-httpd-php .php and
AddType application/x-httpd-php-source .phps are commented out by default in my apache2.conf file because they are in the php4.conf file which gets included.

apache2.conf
Code:
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
$ cat php4.conf shows
Code:
<IfModule mod_php4.c>
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps
</IfModule>
and $ cat php4.load shows

Code:
LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
the path is correct.

I did try uncommenting AddType application/x-httpd-php .php and
AddType application/x-httpd-php-source .phps in my apache2.conf anyway (and restarted apache2) but it didn't have an effect, I also put them in my httpd.conf (and restarted) also with no effect. I tried including php4.load and php4.conf in the httpd.conf but when I restarted that time it said
Code:
Restarting web server: Apache2
[Sat Jan 29 17:27:34 2005] [warn] module php4_module is already loaded, skipping
.
I have just seen my apache2-doc in /etc/apache2/conf.d/ it only mentions handling html files. Could this be the root of my problem?
apache2-doc
Code:
AliasMatch ^/apache2-default/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/doc/apache2-doc/manual/$1"
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/doc/apache2-doc/manual/$1"
<Directory "/usr/share/doc/apache2-doc/manual/">
    Options Indexes
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from  127.0.0.0/255.0.0.0 ::1/128

    <Files *.html>
        SetHandler type-map
    </Files>

    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>
please explain things clearly as I'm still a

Thak you for your attention
 
Old 01-29-2005, 06:45 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,429

Rep: Reputation: 100Reputation: 100
probably you are editing the wrong file (im guessing only). the httpd.conf file belongs to apache_1.3.x very likely. place the

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .php
in the config file that belongs to apache2.x.x
then restart the server

i dont know debian but that should work anyway

good luck

j.

Last edited by j-ray; 01-29-2005 at 06:47 AM.
 
Old 01-29-2005, 07:57 AM   #3
blue penguin
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Debian GNU/Linux (Etch) GRUB, Kubuntu 5.10 GRUB/GNU/Linux
Posts: 27

Original Poster
Rep: Reputation: 15
I tried that and it unfortunately didn't work.

Thanks for replying anyway. Danke schön!
 
Old 02-03-2005, 09:54 AM   #4
havelino
LQ Newbie
 
Registered: Jan 2005
Location: The Netherlands
Distribution: Debian 3.0 Sarge
Posts: 29

Rep: Reputation: 15
Use apt-get install libapache2-mod-php4

In my case this was the solution.
 
Old 02-05-2005, 08:31 AM   #5
Verylinux
LQ Newbie
 
Registered: Feb 2005
Location: Beijing,China,Asia
Posts: 12

Rep: Reputation: 0
I think below article will be helpful:

RedHat's httpd-2.0.46-44 Reference Manual

Your can read it from my website: verylinux.com!

Regards
 
Old 02-09-2005, 03:24 AM   #6
hazza96
Member
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: Ubuntu
Posts: 146

Rep: Reputation: 15
Did you get this working? I run Ubuntu which is Debian based and am having exactly the same problem.
 
Old 02-09-2005, 04:25 AM   #7
blue penguin
LQ Newbie
 
Registered: Dec 2004
Location: New Zealand
Distribution: Debian GNU/Linux (Etch) GRUB, Kubuntu 5.10 GRUB/GNU/Linux
Posts: 27

Original Poster
Rep: Reputation: 15
Sorry, I had to put my attempts at getting php running aside for a while to study for an exam . A missing libapache2-mod-php4 is not my problem as it is installed I will now read this httpd reference manual and I hope that helps, I have glanced at it already and it seemed a bit over my head but hopefully I can understand it when I take the time to read it properly
 
Old 02-09-2005, 07:48 AM   #8
havelino
LQ Newbie
 
Registered: Jan 2005
Location: The Netherlands
Distribution: Debian 3.0 Sarge
Posts: 29

Rep: Reputation: 15
I'm using apache2 & php4 for snort and Acid and they are working fine.

What i did,

apt-get install Apache2

php4

libapache-mod-php4

(i rebooted here because i had to go home with my laptop but don't think it matters)

and it worked.

I left out a lot other things that are needed to make snort and acid working but don't matter if this here above doesn't work I can give you the whole installation procedure. Only i'm still working on the details so maybe you've to wait a few days.

Last edited by havelino; 02-12-2005 at 08:15 AM.
 
Old 08-24-2006, 02:56 PM   #9
UberPuppy
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
handlers!

Hey,

I've had the same problem with nearly every server install on any ubuntu machine I've ever craeted. In the end the solution was to add the php _handlers_ (not just the AddType). Basically, this is a line that start with AddHandler..blahblah..php4.

Except, that I can't remember how I did it and am now looking for it. I think this simply got lost somewhere when the Modules were moved into included files rather than an embedded list, and it's been a problem ever since.

When I find it, I'll post again (perhaps I should have waited,,, hmmmmm)

UPDATE: look at http://tranchant.plus.com/notes/multiviews

Last edited by UberPuppy; 08-24-2006 at 03:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 debian sarge: browser can't connect to the localhost blueheart Linux - Software 5 07-15-2005 11:12 AM
Apache2 and php4 in Debian swmok Debian 1 06-09-2005 05:21 PM
Apache PHP4 Debian Sarge (2.6.8) Mauler Linux - Software 1 11-24-2004 06:24 PM
php4 with apache2? the debian way, how? Tisch Debian 4 08-19-2004 09:35 AM
Debian, apache2 and php4 Pasi Linux - Distributions 1 03-20-2003 07:28 PM


All times are GMT -5. The time now is 03:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration