You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1997/10/25 23:09:12 UTC
Module install steps
I current have the PHP3-Apache1.3 module installation down to the
following steps:
---
>From the PHP3 source dir:
./configure --with-apache=/usr/local/src/apache --with-mysql=/usr/local
make install
>From the Apache src dir:
edit Configuration file and add following line to the end:
AddModule modules/extra/mod_php3.o
./Configure
make
edit your srm.conf file and add the line:
AddType application/x-httpd-php3 .phtml
---
That's a whole lot better than all the crap you had to do for PHP2. I'd
like to cut it even further though. Would it be an idea to have Configure
check modules/extra for the presence of any modules and automatically add
these without having to be explicitly told to do so in the Configuration
file? I mean, if people go and put a module in there, chances are they
want it compiled in.
The second hand-edit might be eliminated by having a .module directive
that adds something to the internal mime type table. We already have a
bunch of magic internal mime types.
With two such changes I might get it down to:
./configure --with-apache --with-mysql --mime-ext=.phtml
make install
./Configure
make
-Rasmus
Re: Module install steps
Posted by Dean Gaudet <dg...@arctic.org>.
On Sat, 25 Oct 1997, Rasmus Lerdorf wrote:
> That's a whole lot better than all the crap you had to do for PHP2. I'd
> like to cut it even further though. Would it be an idea to have Configure
> check modules/extra for the presence of any modules and automatically add
> these without having to be explicitly told to do so in the Configuration
> file? I mean, if people go and put a module in there, chances are they
> want it compiled in.
I don't think this is quite right. For example, in hotwired's build
environment they have a dozen "Configuration.foobar" where foobar varies
according to what site/machine it's been tuned for. There are modules
that get included for some machines but not others. None of those modules
are in modules/extra yet ... but ... well I guess they could put them
elsewhere.
> The second hand-edit might be eliminated by having a .module directive
> that adds something to the internal mime type table. We already have a
> bunch of magic internal mime types.
But where would it do this? Could the user override it?
Dean
[PATCH] Re: Module install steps
Posted by Rasmus Lerdorf <ra...@lerdorf.on.ca>.
> However I'm not sure whether you could eliminate this stage. One thing I
> though of (while designing this stuff) was to create another directory,
> say modules/autoadd, which contained modules which _always_ got added to
> the configuration, without needing an AddModule. The core module could go
> in there, and it could be used by third-party module authors to eliminate
> the AddModule adding step. A big README file in the directory would
> explain that users can remove modules by moving them to another directory
> (say modules/extra). One possible problem with this is module ordering -
> the core module needs to come before all others, while third-party modules
> would come at the end. This could be done by an extra line in the .module
> or CONFIG_START/END sections.
That would suit my purposes fine.
> > The second hand-edit might be eliminated by having a .module directive
> > that adds something to the internal mime type table. We already have a
> > bunch of magic internal mime types.
>
> This I'm not so sure about. Most people will have already installed Apache
> bfore they merge in PHP (I guess), so any edits you make to
> conf/mime.types wouldn't get into the live server anyway. People also
> might want to only enable PHP parsing in certain virtual hosts or
> <Directory> sections, so it is best if they chose where to put the
> AddType.
True. This one is much trickier. The one thing that might help ease the
number of support emails I get on this is if a commented out example
AddType for PHP3 was part of the Apache1.3 distribution. You wouldn't
believe how many people mistype those long mime-type lines.
Would anybody object to the following patch? I don't want to give any
special treatment to PHP3 here, so if there are other common AddType lines
out there, let's add them here as well. People are less likely to screw
up if they just have to uncomment a line.
*** srm.conf-dist 1997/08/19 23:00:23 1.16
--- srm.conf-dist 1997/10/26 16:19:02
***************
*** 149,154 ****
--- 149,159 ----
# make certain files to be certain types.
# Format: AddType type/subtype ext1
+ # For example, the PHP3 module (not part of the Apache distribution)
+ # will typically use:
+ #AddType application/x-httpd-php3 .phtml
+ #AddType application/x-httpd-php3-source .phps
+
# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the
server
# or added with the Action command (see below)
-Rasmus
Re: Module install steps
Posted by Paul Sutton <pa...@ukweb.com>.
On Sat, 25 Oct 1997, Rasmus Lerdorf wrote:
> That's a whole lot better than all the crap you had to do for PHP2. I'd
Glad to hear it.
> like to cut it even further though. Would it be an idea to have Configure
> check modules/extra for the presence of any modules and automatically add
> these without having to be explicitly told to do so in the Configuration
> file? I mean, if people go and put a module in there, chances are they
> want it compiled in.
The requirement for people to add their own AddModule lines is a pain. I
think it is now a lot simpler than it was (because they don't need to
enter the C-language structure name, just a filename, which is much more
obvious).
However I'm not sure whether you could eliminate this stage. One thing I
though of (while designing this stuff) was to create another directory,
say modules/autoadd, which contained modules which _always_ got added to
the configuration, without needing an AddModule. The core module could go
in there, and it could be used by third-party module authors to eliminate
the AddModule adding step. A big README file in the directory would
explain that users can remove modules by moving them to another directory
(say modules/extra). One possible problem with this is module ordering -
the core module needs to come before all others, while third-party modules
would come at the end. This could be done by an extra line in the .module
or CONFIG_START/END sections.
Or give Configure an additional option, say "--add-module", which would
add the AddModule line to Configure, so your installer could call
".../src/Configure --add-module modules/extra/mod_php.module"
and get it done behind the scenes for the user.
> The second hand-edit might be eliminated by having a .module directive
> that adds something to the internal mime type table. We already have a
> bunch of magic internal mime types.
This I'm not so sure about. Most people will have already installed Apache
bfore they merge in PHP (I guess), so any edits you make to
conf/mime.types wouldn't get into the live server anyway. People also
might want to only enable PHP parsing in certain virtual hosts or
<Directory> sections, so it is best if they chose where to put the
AddType.
//pcs