The requests are increasing for this procedure.   I haven't had time to
clean it up.  So I'm just forwarding you what I sent to the others
requesting this procedure.  Lots of verbage.  Just read through it until
you get to the DETAILED PROCEDURE with numbered steps.  I've also
obtained information regarding combining all this stuff with mod_perl
but the procedure has not been updated with this information.  The PHP
stuff witb MySQL is fairly straightforward and you need only read
everything and then extract the stuff specific to apache and PHP and
MySQL.  I haven't completed the PostgreSQL parts so disregard/filter out
any references to Postgresql or consult the PHP documentation contained
in it's source distribution.

Hope this works for all of you.

Please let me know that you got this and found the numbered procedure
steps.

Bye-thanks_TED



Johnnio wrote:

> Hi Ted,
>
> I have a 486DX120 box that I am using for a
> Masqueraded-56k-dialup/gateway Box for a small home network.
>
> I too would like to install PHP and MYsql[or Postgress]
> on a RH 5.2 box.
>
> Would you please send me a copy of your 'Ted's Detialed Proceedure'...
> regarding instructions for installing PHP and/or MYsql
> on a RedHat 5.2 computer ?
>
> I would really appreciate receiving a copy.  Many thanks in advance.
>
> Johnny
>
>   ------------------------------------------------------------------------
>
> Subject: Re: configuring PHP on a RH 5.2 machine
> Resent-Date: 15 Jan 2000 05:01:50 -0000
> Resent-From: [EMAIL PROTECTED]
> Resent-CC: recipient list not shown: ;
> Date: Sat, 15 Jan 2000 05:01:54 -0700
> From: p-thilts <[EMAIL PROTECTED]>
> Organization: MarketShare-PT
> To: [EMAIL PROTECTED], [EMAIL PROTECTED],
>      Dave Reed <[EMAIL PROTECTED]>
> References: <[EMAIL PROTECTED]>
>
> Dave Reed wrote:
>
> > I wanted to try learning PHP so I downloaded both the latest version 3
> > release and the 4.0Beta3 release and tried installing them using the
> > standard:
> >
> > ./configure --enable-discard-path;make;make install
> >
> > I've got a php.shtml file that contains:
> > <!--#exec cmd="pwd" -->
> > <br>
> > <!--#exec cmd="/usr/local/bin/php first.php" -->
> >
> > where first.php is a very simple php file form the tutorial that works
> > fine when I run it from the command line.  But when I try to load the
> > page php.shtml file in Netscape, all I get is:
> >
> > /home/dreed/HTML
> > Content-Type: text/html No input file specified.
> >
> > So it looks like (to me) I've got Apache configured to work with exec
> > cmd, but I must have something wrong with the php call or
> > configuration.  Can anyone tell me what I need to do or point me to
> > specific documentation?
> >
> > All the documentation I can find assumes you have PHP installed an
> > Apache module.  I understand the performance reasons for making it a
> > module, but for now I just want to experiment with it.
> >
> > Thanks,
> > Dave
> >
> > --
> > To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> > as the Subject.
>
> Dave:
>
> My name is Ted.  I have been trying to put a detailed procedure together
> for a bit mode than just a PHP module.  My request for help is called
> Ted's  detailed procedure or something like that - a few days old by
> now.   The lastest note contains a rudimentary procedure which contains a
> fairly complete step by step config and compile of the PHP source
> required by the Apache web server as well as entries to the PHP init
> file.
>
> Hope that helps.  If you can't find it  and you want it just email me and
> I will send you a copy.
>
> Have a nice day.
>
> Bye-Thanks_TED
> mailto:[EMAIL PROTECTED]
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.

Johnnio:

Just below please find the information I forwarded to Dave:  For your
information I am paying someone to completely define the procedure and
automate it so that it will not only ftp and get the source code, it will
build the entire package and set up system file(s) so that when the system
boots up the Apache web server will do all the things I want.  After that I
am going to put the automated procedure out on the net as a small project so
that it's scope gets enlarged and it will handle all the issues for a great
variety of combinations.   Once that's done,  anyone wanting to use it can
alter a reference file and based on the options they choose the whole thing
will come together for them automatically.  That will allow Linux newbees and
those that don't have time and specialized knowledge in these matters to
simply select their options and 'voila' it all comes together.  For now, you
will have to go through the numbered steps and just concentrate on the PHP
and MySQL stuff.  Disregard the perl and PostgreSQL stuff and/or filter it
out.  Good Luck.  I hope this gets you where you want to go!  There is a lot
a verbage around the procedure and the numbered steps - try not to let it
confuse you.

Have a nice day.

Bye-thanks_TED


Dave:

Here is the entire note.  Just disregard the the comments and introduction
sutff.  The procedure is in steps all numbered.    This procedure compiles
the  PHP module and then Apache.  These steps are supposed to work as I took
them out of the installation section of a very authoritative PHP book.
I don't know if this is the best way to do things in terms of adding modules
to Apache, but as I said,
it's according to the book.  If necessary I can FAX the procedure out of the
book to you but that
would involve ripping pages out of the book.

I posted the following on the apache-list (that is where it belongs but
the list is not very active yet)
If there is anyone on this list that is an Apache expert but is not on
the apache list could you please get in touch with me.  Unless you are
knowledgeable with Apache, Perl, PHP don't waste your time reading
this.  I've marked this [OT] for the redhat-list and [Apache] for the
apache-list.  I'm just looking for help.

I'm looking for help in completing the below detailed procedure which is
intended to do all the
following:

*  Configure and compile the Apache Perl and PHP source modules - steps
which have to be done prior to compiling Apache source.  See procedure
below.
*  Do whatever operations are required so Apache will handle both MySQL
and PostgreSQL.
*  Configure Apache so that the CGI interface knows how to handle C and
C++ and Python.

Therefore, when Apache web server executes it will handle C, C++, and
Python via the CGI interface, it will also handle perl scripts and perl
modules via the MOD_PERL  module, and it will handle PHP scripts via the
PHP module.  Various databases will be involved and apparently there is
a way of setting up Apache to forward SQL to a database and also the
MOD_PERL can be set up to access databases as can perl script handled by
MOD_PERL.

 Apparently the MOD_PERL  will directly handle perl scripts and the PHP
module will directly handle PHP scripts but I think the Apache conf
file(s) need to be set up for all of this so that should be included in
the detailed procedure below.  By that I mean:  For PHP set the xxx
variable in the zzz.conf file to equal yyyy.  For Perl set the...., etc.

* My original request included the handling of JAVA which jason pointed
out would be JServlettes but that would also involve some Apache
configuration steps.

My only experience has been with CGI using WebSite and Netscape web
servers on Win95 as well as database servers where an SQL protocol was
used between a client GUI and the Server hosting the database.  The web
servers were set up to detect certain file types for perl, visual basic,

C, etc.  So I am also looking at doing the excact CGI thing with
Apache.  So the procedure is trying to bring several things together
including CGI.  These things take the form of 'MOD_PERL', 'PHP
module', 'CGI for bash command files, C and C++ and maybe Python',
'MySQL
and PostgreSQL for data base interaction (I'm still real fuzzy as to
what can be done here and how to set it up)', and also 'JServlette
operation and setup'.

HERE IS THE DETAILED PROCEDURE AS FAR AS I'VE GOT IT TODATE

1.  (a) cd to an installation directory (eg,
'/ted/download/apache_source/') to which the Apache source can be
extracted.  DO THE EXTRACTION AS ROOT.

After unpacking the tar source file into this directory, the first step
is to configure Apache compile.

2  (a) This is done running the configure script inside the Apache
(source) directory formed when the tarball was unpacked.   Do this as
ROOT.  The Apache source directory can be located anywhere for example

'/ted/download/apache_source/'.

[If the default location is not the same as the desired location does
that information have to be passed to the configure and make processes?
The following step assumes it doesn't]

2.  (b)  The configure command  is as follows where '#' is the root
prompt and the current directory is '/ted/download/apache_source' and
the directory structure within the tarball are below this:

# ./configure --prefix=/www

This script will examine your system and prepare a make file for Apache.

3.  (a) Note that Apache has not yet been compiled - just configured

3.  (b) Next , cd  (as ROOT) to an installation directory for PHP source
for example '/ted/download/PHP_source  and unpack the contents of the
PHP tarball  into this directory .

4.  Now while in the top level PHP source directory  configure PHP as
follows:

# ./configure --with-apache=/ted/download/apache_source/apache_1.3.x
--enable-track-vars  --with-mysql --with-postgres

[Here is where I get lost, what all is required here with multiple
databases, I know the --with-mysql is okay because I copied it from some
instructions but I have no idea if --with-postgres is legal or what
other options might be available that should also be stuck into this
command line although there is supposed to be documentation in the PHP
source which explains all the possible options, this still does not tell
me how many legal combinations and which combinations are not in
conflict.]

5.  # make

6.  (a)  # make install

6.  (b)  Runing make will create the PHP library, and running make
install will prepare Apache for including the PHP module.  Note that the
call to configure included a path to the Apache source code directory
which is the top level directory contained within the Apache tarball.

7.  (a)  Now it is necessary to do the Perl module - that must be told
about the database stuff.
[Now I am lost]

8. (a)  Once the PHP and Perl configuration and makes are done cd back
to the Apache source code directory
'/ted/download/apache_source/apache_1.3.x'

[Note that apache_1.3.x is only used here to represent the most current
source release]

9.  (a)  # ./configure --prefix=/www
--activate-module=src/modules/php3/libphp3.a

[Now I know this command line is not complete but I don't know what all
is missing - certainly the perl stuff and other things]

10.  # make

11.  (a)  # make install

11.  (b)  These  first make will create a new make file and the make
install will run it [I think] and the new httpd binary will be installed
in the /www directory.

11.  (c) [This part for PHP and probably something for Perl, I am
assuming is for POST make activity or post installation configuration
puposes.]

Here goes:  "PHP uses a file to supply additional configuration options
called php3.ini.  This file should reside in /usr/local/lib/php3.ini.

[Does it have to?  If not does PHP somehow have to be told where it is?]

 Copy this file (from whereever it now is) to  '/usr/local/lib/'

# cp php3.ini-dist /usr/local/lib/php3.ini

[I imagine this php3.ini-dist is in the source directory somewhere]

12.  [This file may have to be edited to allow for everything
involved???????]

13.  [Lucky 13]  The last step [for PHP] is to associate a file
extension with PHP.  This is done by editing either of the srm.conf or
httpd.conf files which can be found in Apache's conf directory as a set
of 3 conf files.   Add the line

'AddType application/x-httpd-php3 .php3

[ I also think there is something to add regarding the PHP module?]

14.  Do a similar thing for Perl [and what would that be?]

[below is a note of MOD_PERL taken from Apache FAQs.  Regarding Perl, I
have a command called cpan  (I am not yet well informed on this
command)  which I understand will not only update the MOD_PERL source on
my machine but will activate the make files which should result in a
compilation.  If that is the case then could I just use the perl 'cpan '
command  (perl -MCPAN -e shell) and when I get the cpan prompt simply
have it build and execute the make MOD_PERL make files????]

15.  The above additions associated with PHP and Perl will cause all
files with the extension .php3 and .pl to be executed (.php3 as PHP
scripts) and .pl as a Perl script).

16.  Default document can be insterted [How????]

17.  Whenever the Apache server is started, it will process PHP scripts
and Perl scripts.  C, C++ executeable information is passed through the
CGI interface.

[Doesn't Apache have to be told what to do with the executable type file
- when Idid this stuff on Win95 using several commercial web servers
they were already set up so that there were directories for VB, C, C++
executeables and the server somehow knew where these directories were
and launched the executeables and passed them any parameters - so that
is the kind of information I'm looking for here.]



MOD_PERL
=========
Configuring and installing apache with mod_perl is a complex process, so
it is really not a good idea to
attempt to do it manually. If you are used to configuring third-party
modules into Apache using the
apache configuration process, please realize that running mod_perl's
Makefile.PL with the right
parameters does this for you.

Read the INSTALL* files in the top-level mod_perl distribution directory
and then choose one of the
INSTALL.simple* recipes that is close to your requirements, as a
starting point. When you succeed in
compiling and linking an httpd, a quick way to check that everything is
configured according to plan is to
run it with the -l (list compiled-in modules) and -V (show paths) flags.

[I think this would have to be done after the PHP step and before Apache
is compiledI- 'm not sure that this will properly integrate with the
above required operations like PHP and the database server operations]

Bye-thanks_TED



      Subject:
              [Apache] Teds detailed procedure needs help.
        Date:
              Mon, 10 Jan 2000 05:46:41 -0700
        From:
              p-thilts <[EMAIL PROTECTED]>
 Organization:
              MarketShare-PT
          To:
              [EMAIL PROTECTED], [EMAIL PROTECTED]



This request for help was included in a previous note to the list so I
have extracted it to avoid  confusion.  I'm looking for help in
completing the below detailed procedure which is intended to do all the
following:

*  Configure and compile the Apache Perl and PHP source modules - steps
which have to be done prior to compiling Apache source.  See procedure
below.
*  Do whatever operations are required so Apache will handle both MySQL
and PostgreSQL.  Following the detailed procedure are 4 steps Jason
outlined that should be included in this detailed procedure.
*  Configure Apache so that the CGI interface knows how to handle C and
C++ and Python.

 Apparently the Perl module will directly handle perl scripts and the
PHP module will directly handle PHP scripts but I think the Apach conf
file(s) need to be set up for all of this so that should be included in
the detailed procedure below.  By that I mean:  For PHP set the xxx
variable in the zzz.conf file to equal yyyy.  For Perl set the...., etc.

* My original request included the handling of JAVA which jason pointed
out would be JServlettes but that would also involve some Apache
configuration steps.

My only experience has been with CGI using WebSite and Netscape web
servers on Win95 as well as database servers where an SQL protocol was
used between a client GUI and the Server hosting the database.  The web
servers were set up to detect certain file types for perl, visual basic,
C, etc.  So I am also looking at doing the excact CGI thing with
Apache.  So the procedure is trying to bring several things together
including CGI.  These things take the form of 'Perl Module', 'PHP
module', 'CGI for bash command files, C and C++ and mybe Python', 'MySQL
and PostgreSQL for data base interaction (I'm still real fuzzy as to
what can be done here and how to set it up)', and also 'JServlette
operation and setup'.

HERE IS THE DETAILED PROCEDURE AS FAR AS I'VE GOT IT TODATE

1.  (a) cd to an installation directory (eg,
'/ted/download/apache_source/') to
which the Apache source can be extracted.  DO THE EXTRACTION AS ROOT.
After
unpacking the tar source file into this directory, the first step is to
configure
Apache.
2  (a) This is done running the configure script inside the Apache
(source)
directory formed when the tarball was unpacked.   Do this as ROOT.  The
Apache
source directory can be located anywhere for example
'/ted/download/apache_source/'.
[If the default location is not the same as the desired location does
that
information have to be passed to the configure and make processes?  The
following
step assumes it doesn't]
2.  (b)  The configure command  is as follows where '#' is the root
prompt and
the current directory is '/ted/download/apache_source' and the directory

structure within the tarball are below this:
# ./configure --prefix=/www
This script will examine your system and prepare a make file for Apache.

3.  (a) Note that Apache has not yet been compiled - just configured
3.  (b) Next , cd  (as ROOT) to an installation directory for PHP source
for
example '/ted/download/PHP_source  and unpack the contents of the PHP
tarball
into this directory .
4.  Now while in the top level PHP source directory  configure PHP as
follows:
# ./configure --with-apache=/ted/download/apache_source/apache_1.3.x
--enable-track-vars  --with-mysql --with-postgres
[Here is where I get lost, what all is required here with multiple
databases, I
know the --with-mysql is okay because I copied it from some instructions
but I
have no idea is --with-postgres is legal or what other options might be
available
that should also be stuck into this command line although there is
supposed to be
documentation in the PHP source which explains all the possible options,
this
still does not tell me how many legal combinations and which
combinations are not
in conflict.]
5.  # make
6.  (a)  # make install
6.  (b)  Runing make will create the PHP library, and running make
install will
prepare Apache for including the PHP module.  Note that the call to
configure
included a path to the Apache source code directory which is the top
level
directory contained within the Apache tarball.
7.  (a)  Now it is necessary to do the Perl module - that must be told
about the
database stuff.
[Now I am lost]
8. (a)  Once the PHP and Perl configuration and makes are done cd back
to the
Apache source code directory '/ted/download/apache_source/apache_1.3.x'
[Note that apache_1.3.x is only used here to represent the most current
source
release]
9.  (a)  # ./configure --prefix=/www
--activate-module=src/modules/php3/libphp3.a

[Now I know this command line is not complete but I don't know what all
is
missing - certainly the perl stuff and other things]
10.  # make
11.  (a)  # make install
11.  (b)  These  first make will create a new make file and the make
install will
run it [I think] and the new httpd binary will be installed in the /www
directory.
11.  (c) [This part for PHP and probably something for Perl, I am
assuming is for
POST make activity or post installation configuration puposes.]
Here goes:  "PHP uses a file to supply additional configuration options
called
php3.ini.  This file should reside in /usr/local/lib/php3.ini.   [Does
it have
to?  If not does PHP somehow have to be told where it is?]  Copy this
file (from
whereever it now is) to  '/usr/local/lib/'

# cp php3.ini-dist /usr/local/lib/php3.ini
[I imagine this php3.ini-dist is in the source directory somewhere]
12.  [This file may have to be edited to allow for everything
involved???????]
13.  [Lucky 13]  The last step [for PHP] is to associate a file
extension with
PHP.  This is done by editing either of the srm.conf or httpd.conf files
which
can be found in Apache's conf directory as a set of 3 conf files.   Add
the line
'AddType application/x-httpd-php3 .php3
[ I also think there is something to add regarding the PHP module?]
14.  Do a similar thing for Perl [and what would that be?]
15.  The above additions associated with PHP and Perl will cause all
files with
the extension .php3 and .pl to be executed (.php3 as PHP scripts) and
(.pl as a
Perl script).
16.  Default document can be insterted [How????]
17.  Whenever the Apache server is started, it will process PHP scripts
and Perl
scripts.  C, C++ executeable are passed through the CGI interface.
[Doesn't
Apache have to be told what to do with the executable type file - when I
did this
stuff on Win95 using several commercial web servers they were already
set up so
that there were directories for VB, C, C++ executeables and the server
somehow
new where these directories were and launched the executeables and
passed them
any parameters - so that is the kind of information I'm looking for
here.]

Jason, your reply was both helpful and informative and if you are
interested and
wish to pursue this further with me you might  correct the above
procedure (as
far as I've got it) and fill in any missing stuff that you can.    I
would invite
any others reading this to do the same.  Once I've got the procedure
detailed
enough for anyone to do I'll be happy.

Bye-thanks_TED
Please forgive any typos.

PS:  I did not include what I once read about the Perl module yet
because I'm still trying to find the information in the Linux Apache web
pages that came as part of the binary installation.

Jasons suggested the following steps be included.:

> 1) Install MySQL libs
> 2) Install PostgreSQL libs
> 3) Install an ODBC package, like iODBC
> 4) Build Apache/PHP/Jserv/Jakarta based on your environment.  I
suggest
>





Reply via email to