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
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 >