Mailing List Archive

mod_php
Hi,

I'm new to Gentoo. I emerged and got apache1.3 up and
running. I'd like to use mod_php.

I've emerged it, however it doesn't seem to be working
(the php is not being processed).

How would you install mod_php?

Thanks,

Bill




__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 06 September 2004 21:39, Bill Six wrote:
> Hi,
>
> I'm new to Gentoo. I emerged and got apache1.3 up and
> running. I'd like to use mod_php.
>
> I've emerged it, however it doesn't seem to be working
> (the php is not being processed).
>
> How would you install mod_php?

Add "-D PHP4" to APACHE_OPTS in /etc/conf.d/apache, and restart apache.

APACHE_OPTS may be named slightly differently, I use apache2 everywhere, and
it's variable is named APACHE2_OPTS.

- --
Mike Williams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBPMwhInuLMrk7bIwRAol6AJ0ecTVT8crzNuacLoH47DDGjc7msACeKqD7
/9hEzmdzIHpb0esS6F96yP0=
=zbKe
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
On Monday 06 September 2004 10:39 pm, Bill Six wrote:
> I'm new to Gentoo.
welcome ;)

> I emerged and got apache1.3 up and
> running. I'd like to use mod_php.

WTF not using apache2?

> I've emerged it, however it doesn't seem to be working
> (the php is not being processed).

Did you configure /etc/conf.d/apache and/or /etc/apache/conf/modules.d/*php*?
Have a look at them.

> How would you install mod_php?

emerge apache mod_php
echo 'APACHE_OPTS="-D PHP4"' >> /etc/conf.d/apache

Well, it may be slight different since I'm using apache2 and *not* apache1.
So, validate yourself.

> Do you Yahoo!?
of course not :P

MfG,
Christian Parpart.

--
22:43:37 up 13 days, 10:23, 1 user, load average: 0.62, 0.57, 0.48
Re: mod_php [ In reply to ]
On Mon, 6 Sep 2004, Christian Parpart wrote:

> > I emerged and got apache1.3 up and
> > running. I'd like to use mod_php.
>
> WTF not using apache2?

Yes, a wise decision IMHO.

> emerge apache mod_php
> echo 'APACHE_OPTS="-D PHP4"' >> /etc/conf.d/apache
>
> Well, it may be slight different since I'm using apache2 and *not* apache1.
> So, validate yourself.

Its the same.


--
Aj.
Sys. Admin / Developer

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
Ajai Khattri wrote:
> On Mon, 6 Sep 2004, Christian Parpart wrote:
>
>
>>>I emerged and got apache1.3 up and
>>>running. I'd like to use mod_php.
>>
>>WTF not using apache2?
>
>
> Yes, a wise decision IMHO.

I don't think so. I dont think that PHP Community still doesn't
recommend Apache2 and PHP.

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
On Tue, 7 Sep 2004, Khan wrote:

> > Yes, a wise decision IMHO.
>
> I don't think so. I dont think that PHP Community still doesn't
> recommend Apache2 and PHP.

That's what I meant.

--
Aj.
Sys. Admin / Developer

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
On Tue, 7 Sep 2004, Ajai Khattri wrote:

> On Tue, 7 Sep 2004, Khan wrote:
>
> > > Yes, a wise decision IMHO.
> >
> > I don't think so. I dont think that PHP Community still doesn't
> > recommend Apache2 and PHP.
>
> That's what I meant.

I mean, the PHP folks still urge caution.

--
Aj.
Sys. Admin / Developer

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
Hi,

I emerge apache2 and mod_php with USE="apache2" and
added the line to the correct file. I restarted
apache2.

However the file appears in my webbrowser as this:
"<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
"

Do you know why it wasn't processed? Do php files
have to go into a directory other than htdocs?

Thanks,

Bill

--- Mike Williams <mike@gaima.co.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 06 September 2004 21:39, Bill Six wrote:
> > Hi,
> >
> > I'm new to Gentoo. I emerged and got apache1.3 up
> and
> > running. I'd like to use mod_php.
> >
> > I've emerged it, however it doesn't seem to be
> working
> > (the php is not being processed).
> >
> > How would you install mod_php?
>
> Add "-D PHP4" to APACHE_OPTS in /etc/conf.d/apache,
> and restart apache.
>
> APACHE_OPTS may be named slightly differently, I use
> apache2 everywhere, and
> it's variable is named APACHE2_OPTS.
>
> - --
> Mike Williams
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
>
iD8DBQFBPMwhInuLMrk7bIwRAol6AJ0ecTVT8crzNuacLoH47DDGjc7msACeKqD7
> /9hEzmdzIHpb0esS6F96yP0=
> =zbKe
> -----END PGP SIGNATURE-----
>
> --
> gentoo-user@gentoo.org mailing list
>
>




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
On Tue, 7 Sep 2004, Bill Six wrote:

> Hi,
>
> I emerge apache2 and mod_php with USE="apache2" and
> added the line to the correct file. I restarted
> apache2.
>
> However the file appears in my webbrowser as this:
> "<html>
> <head>
> <title>PHP Test</title>
> </head>
> <body>
> <?php echo '<p>Hello World</p>'; ?>
> </body>
> </html>
> "
>
> Do you know why it wasn't processed? Do php files
> have to go into a directory other than htdocs?

No, it shouldn't matter.

If you do "ps -ef" do you see something like this?

root 14854 1 0 Aug08 ? 00:00:00 /usr/sbin/apache -D SSL -D PHP4
apache 14861 14854 0 Aug08 ? 00:00:12 /usr/sbin/apache -D SSL -D PHP4
apache 14862 14854 0 Aug08 ? 00:00:12 /usr/sbin/apache -D SSL -D PHP4
apache 14863 14854 0 Aug08 ? 00:00:12 /usr/sbin/apache -D SSL -D PHP4
apache 14864 14854 0 Aug08 ? 00:00:14 /usr/sbin/apache -D SSL -D PHP4
apache 14866 14854 0 Aug08 ? 00:00:14 /usr/sbin/apache -D SSL -D PHP4
apache 14891 14854 0 Aug08 ? 00:00:11 /usr/sbin/apache -D SSL -D PHP4
apache 14909 14854 0 Aug08 ? 00:00:07 /usr/sbin/apache -D SSL -D PHP4
apache 14933 14854 0 Aug14 ? 00:00:03 /usr/sbin/apache -D SSL -D PHP4


--
Aj.
Sys. Admin / Developer

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
hi

no it says this:
root 16440 1 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16441 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16442 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16443 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16444 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16445 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16446 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start
apache 16447 16440 0 11:25 ? 00:00:00
/usr/sbin/apache2 -k start



My /etc/conf.d/apache2 is this:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General
Public License v2
# $Header:
/var/cvsroot/gentoo-x86/net-www/apache/files/2.0.49/apache2.confd,v
1.2 2004/07/15 00:24:42 agriffis Exp $

# Config file for /etc/init.d/apache2

# An example from
/etc/apache2/conf/modules.d/40_mod_ssl.conf:
#
# <IfDefine SSL>
# <IfModule !mod_ssl.c>
# LoadModule ssl_module extramodules/mod_ssl.so
# </IfModule>
# </IfDefine>
#
# This means that the mod_ssl.so DSO module is only
loaded
# into the server when you pass "-D SSL" at startup.
To
# enable WebDAV, add "-D DAV -D DAV_FS". If you
installed
# mod_php then add "-D PHP4". For more options,
please
# read the files in the /etc/apache2/conf/modules.d
directory.

#APACHE2_OPTS="-D SSL"

# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing
crazy Apache stuff
# As not having them set correctly, or feeding in an
incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.

# ServerRoot setting
#SERVERROOT=/etc/apache2

# Configuration file location
# - If this does NOT start with a '/', then it is
treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=conf/apache2.conf

# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/apache2/startuperror.log"

# PID file location
# Note that this MUST match the setting in your
configuration file!
PIDFILE=/var/run/apache2.pid

# Restart style
# see http://httpd.apache.org/docs-2.0/stopping.html
for more details
# the default is 'graceful', the other possible value
is 'restart'
# If you use 'graceful', completion of the command
does NOT imply that the system
# has finished restarting. Restart is finished only
when all child processes
# have finished serving their current request sets.
Read the URL for details.
#RESTARTSTYLE="restart"
RESTARTSTYLE="graceful"
APACHE_OPTS="-D PHP4"

--- Ajai Khattri <ajai@bway.net> wrote:

> On Tue, 7 Sep 2004, Bill Six wrote:
>
> > Hi,
> >
> > I emerge apache2 and mod_php with USE="apache2"
> and
> > added the line to the correct file. I restarted
> > apache2.
> >
> > However the file appears in my webbrowser as this:
> > "<html>
> > <head>
> > <title>PHP Test</title>
> > </head>
> > <body>
> > <?php echo '<p>Hello World</p>'; ?>
> > </body>
> > </html>
> > "
> >
> > Do you know why it wasn't processed? Do php files
> > have to go into a directory other than htdocs?
>
> No, it shouldn't matter.
>
> If you do "ps -ef" do you see something like this?
>
> root 14854 1 0 Aug08 ? 00:00:00
> /usr/sbin/apache -D SSL -D PHP4
> apache 14861 14854 0 Aug08 ? 00:00:12
> /usr/sbin/apache -D SSL -D PHP4
> apache 14862 14854 0 Aug08 ? 00:00:12
> /usr/sbin/apache -D SSL -D PHP4
> apache 14863 14854 0 Aug08 ? 00:00:12
> /usr/sbin/apache -D SSL -D PHP4
> apache 14864 14854 0 Aug08 ? 00:00:14
> /usr/sbin/apache -D SSL -D PHP4
> apache 14866 14854 0 Aug08 ? 00:00:14
> /usr/sbin/apache -D SSL -D PHP4
> apache 14891 14854 0 Aug08 ? 00:00:11
> /usr/sbin/apache -D SSL -D PHP4
> apache 14909 14854 0 Aug08 ? 00:00:07
> /usr/sbin/apache -D SSL -D PHP4
> apache 14933 14854 0 Aug14 ? 00:00:03
> /usr/sbin/apache -D SSL -D PHP4
>
>
> --
> Aj.
> Sys. Admin / Developer
>
> --
> gentoo-user@gentoo.org mailing list
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 07 September 2004 20:11, Bill Six wrote:
> hi
>
> no it says this:
> root 16440 1 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16441 16440 0 11:25 ? 00:00:00

>
> My /etc/conf.d/apache2 is this:

Then you've got apache2, not 1.3.
Change APACHE_OPTS to APACHE2_OPTS

- --
Mike Williams
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBPgl2InuLMrk7bIwRAt+gAJ48RMq2xGlOp3nCFyEgZFGux/66igCgnRcS
r0p4/QZIaQdeFNmiytdB8Dc=
=aEwH
-----END PGP SIGNATURE-----

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
On Tue, 7 Sep 2004, Bill Six wrote:

> no it says this:
> root 16440 1 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16441 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16442 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16443 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16444 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16445 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16446 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start
> apache 16447 16440 0 11:25 ? 00:00:00
> /usr/sbin/apache2 -k start

Then PHP is not enabled.

Follow the instructions in /etc/conf.d/apache (they will say something
like uncomment the OPTS line, save, and restart Apache.

--
Aj.
Sys. Admin / Developer

--
gentoo-user@gentoo.org mailing list
Re: mod_php [ In reply to ]
Thanks Mike, that fixed it. Sorry I ask some dumb
questions, Gentoo is a bit more tricky than Fedora
was, but I like it more.

Thanks for your help

Bill


--- Mike Williams <mike@gaima.co.uk> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday 07 September 2004 20:11, Bill Six wrote:
> > hi
> >
> > no it says this:
> > root 16440 1 0 11:25 ? 00:00:00
> > /usr/sbin/apache2 -k start
> > apache 16441 16440 0 11:25 ? 00:00:00
>
> >
> > My /etc/conf.d/apache2 is this:
>
> Then you've got apache2, not 1.3.
> Change APACHE_OPTS to APACHE2_OPTS
>
> - --
> Mike Williams
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
>
iD8DBQFBPgl2InuLMrk7bIwRAt+gAJ48RMq2xGlOp3nCFyEgZFGux/66igCgnRcS
> r0p4/QZIaQdeFNmiytdB8Dc=
> =aEwH
> -----END PGP SIGNATURE-----
>
> --
> gentoo-user@gentoo.org mailing list
>
>




__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

--
gentoo-user@gentoo.org mailing list