Hello
Afternoon Group. I have been working on this for some time and Googling it. So now I am here. I am migrating to a new server. I am having some weird problems. For one, I can't seem to get CPAN to update modules... or install the 'r'ecommened updates. Any help with that would rock. The core issue is... ModPerl::Registry: Can't locate object method "request" via package "Apache" at /usr/lib/perl5/5.8.0/CGI.pm line 342.! The location of the error changes as I do misc. work arounds. I have had no luck with Apache->request and as best I can tell I am still using mod_perl 1.99 on the new server. I will try to post as much debug data as I can. Please ask for more info if it is needed. ModPerl::Registry: Can't locate Apache.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/5.8.0/CGI.pm line 191.!Compilation failed in require at /home/httpd/vhosts/bandwidthmarket.com/perl/lookuputil line 14.!BEGIN failed--compilation aborted at /home/httpd/vhosts/bandwidthmarket.com/perl/lookuputil line 14.! The script(s) seem to work off the command line. However there are many errors/warnings. I have posted some below. The error messages have changed many times as I try to work with the code and cut out non-working segments. Please excuse the mess of this post. I am very frusterated. Use of implicit split to @_ is deprecated at /usr/lib/perl5/5.8.0/BWM.pm line 83. lookuputil: "my" variable $sth masks earlier declaration in same scope at lookuputil line 605. lookuputil: Use of uninitialized value in string ne at /usr/lib/perl5/5.8.0/lookuputil_extras.pl line 91. ^^^ Many of those. lookuputil: Use of uninitialized value in substitution iterator at lookuputil line 246. lookuputil: Use of uninitialized value in string eq at /usr/lib/perl5/5.8.0/lookuputil_extras.pl line 38. ^^^ Many of those. Again, I am sorry for the mess. I don't even know what data would help. I get so mad that it is not working... I revert to the working code off the old server and just start over with a completely different approach. The basics: This is a search system... The script connects to a database and builds the user interface to search the database(s). The script also does the searching/sorting etc. I wouldn't expect that the core code is the issue. I do use perl Modules to provide some backend functions to the main script and everything seems fine when I test all the provided functions/methods/etc. Jon
Re: Hello
Perrin Harkins wrote: On Thu, 2005-08-18 at 12:08 -0600, Jonathan Steffan wrote: ModPerl::Registry: Can't locate object method "request" via package "Apache" at /usr/lib/perl5/5.8.0/CGI.pm line 342.! The location of the error changes as I do misc. work arounds. I have had no luck with Apache->request and as best I can tell I am still using mod_perl 1.99 on the new server. Please fix that first. Upgrade to mod_perl 2.0.1 and the latest CGI.pm and see if this problem goes away. - Perrin I have no idea how. I can't use yum... nor can I use the CPAN shell. Any advice on how to complete this? -Jon
Re: Hello
Perrin Harkins wrote: On Thu, 2005-08-18 at 12:21 -0600, Jonathan Steffan wrote: I have no idea how. I can't use yum... nor can I use the CPAN shell. Any advice on how to complete this? Installing things from CPAN is pretty well-covered in the Perl documentation, and not just from CPAN shell. In short, you can download the packages, unpack them, and do the standard install steps. The latest versions at this moment are available here: http://search.cpan.org/~lds/CGI.pm-3.11/ http://search.cpan.org/~gozer/mod_perl-2.0.1/ - Perrin I have been working with CPAN and seem to be able to run it OK. Here is what I get when I try to install the Bundle::Apache2 ... as I have tried this before. installation problems: Bundle::ApacheTest and the following items had problems during recursive bundle calls: Crypt::SSLeay Thanks in advance. -Jon
Re: Hello
Perrin Harkins wrote: On Thu, 2005-08-18 at 12:21 -0600, Jonathan Steffan wrote: I have no idea how. I can't use yum... nor can I use the CPAN shell. Any advice on how to complete this? Installing things from CPAN is pretty well-covered in the Perl documentation, and not just from CPAN shell. In short, you can download the packages, unpack them, and do the standard install steps. The latest versions at this moment are available here: http://search.cpan.org/~lds/CGI.pm-3.11/ http://search.cpan.org/~gozer/mod_perl-2.0.1/ - Perrin Here is the mod_perl2 install issues CPAN.pm: Going to build G/GO/GOZER/mod_perl-2.0.1.tar.gz no conflicting prior mod_perl version found - good. * WARNING * Your Perl is configured to link against libgdbm, but libgdbm.so was not found. You could just symlink it to /usr/lib/libgdbm.so.2.0.0 * WARNING * Next we need to know where the 'apxs' script is located. This script provides a lot of information about the Apache installation, and makes it easier to find things on your system. Normally it's located in the same directory as the 'httpd' executable. If you don't yet have Apache installed you can build Apache against the Apache source code, but you won't be able to run the test suite (a very important step). Therefore you may want to install Apache before proceeding. Please provide a full path to 'apxs' executable (press Enter if you don't have it installed): /usr/local/psa/admin/bin/apxs [ error] Unable to open /usr/local/psa/admin/include/ap_release.h: No such file or directory [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install As a note... This system uses Plesk... hence the location of the apxs bin. -Jon
Updating from 5.8.0 to 5.8.7
I did get the script I have been working with to run once... well twice... then I restarted the httpd server and bam... no go again. It worked after I ran the following: perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)' Still works from the command line and not from Apache::Registry::handler (mod_perl?) Issue is still Apache.pm missing. When I 'updatedb' and then 'locate Apache.pm' I get the following: /usr/lib/perl5/5.8.0/CGI/Apache.pm /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBI/ProfileDumper/Apache.pm /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/DBI/ProfileDumper/Apache.pm /root/.cpan/build/CGI.pm-3.11/CGI/Apache.pm /root/.cpan/build/CGI.pm-3.11/blib/lib/CGI/Apache.pm /root/.cpan/build/mod_perl-1.29/lib/Bundle/Apache.pm /root/.cpan/build/mod_perl-1.29/Apache/Apache.pm /root/.cpan/build/mod_perl-1.29/blib/lib/Bundle/Apache.pm /root/.cpan/build/mod_perl-1.29/blib/lib/Apache.pm /root/.cpan/Bundle/Apache.pm Is there any way to update my perl 5.8.0 to 5.8.7 using CPAN or other automated processes? While running the auto-update using CPAN, it complained that I should just update to 5.8.7... for many of the updates I was doing already were included in that release. Thanks in advance. I apologize I am using this list to speak my mind. My brain goes numb after searching the web and lists for so long. -Jon
Apache, Mod_Perl Upgrade
After much work, I have installed perl 5.8.7 with all the modules I need. I had to upgrade to Apache 2.0.54 from 2.0.40 to be able to install mod_perl2. The new server seems to be working. I still have not gotten anything running. I'm stuck with a problem with mod_php and the server just not starting. However, my plesk control server is still working. Not sure how... [EMAIL PROTECTED] modules]# /etc/init.d/httpd start Starting httpd: Syntax error on line 1 of /usr/local/apache2/conf.d/php.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory File is deffinitly not there. Any help or direction would be great. -Jon
Re: Apache, Mod_Perl Upgrade
Jonathan Steffan wrote: After much work, I have installed perl 5.8.7 with all the modules I need. I had to upgrade to Apache 2.0.54 from 2.0.40 to be able to install mod_perl2. The new server seems to be working. I still have not gotten anything running. I'm stuck with a problem with mod_php and the server just not starting. However, my plesk control server is still working. Not sure how... [EMAIL PROTECTED] modules]# /etc/init.d/httpd start Starting httpd: Syntax error on line 1 of /usr/local/apache2/conf.d/php.conf: Cannot load /usr/local/apache2/modules/libphp4.so into server: /usr/local/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory File is deffinitly not there. Any help or direction would be great. -Jon I went back to my 2.0.40 install of Apache. The 2.0.54 was not playing nice with plesk. How do I update the @INC path and/or mod_perl for the new perl 5.8.7? I try using CPAN with install Bundle::Apache and no go. Any ideas? -Jon
Re: Apache, Mod_Perl Upgrade Take 2
Tom Schindl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went back to my 2.0.40 install of Apache. The 2.0.54 was not playing nice with plesk. How do I update the @INC path and/or mod_perl for the new perl 5.8.7? I try using CPAN with install Bundle::Apache and no go. Any ideas? -Jon I not sure if there have been API changes since 2.0.40 and 2.0.54 but compiling mod-perl-2.x with apache 2.0.54 and use it with 2.0.40 this will certainly lead to very strange situations you. As in the message before there's nothing wrong when running 2.0.40 if your plesk system needs it and install your own apache-2.0.54 and run it on a different port (e.g. 81). As already said before als compiling Apache-2.0.x is straight forward and nothing you could not manage without reading the bundled INSTALL-File(s). Default-Install-Procedure: - --8<-- tar xzvf stable.tar.gz cd perl-5.8.7/ sh ./Configure -de -Dprefix=/opt/myperl make make test su make install exit cd .. tar xjvf httpd-2.0.54.tar.bz2 cd httpd-2.0.54 ./configure --prefix=/opt/myapache make make install vi /opt/myapache/conf/httpd.conf # search for Listen and set it to 81 cd .. cd mod_perl-2.0.1/ /opt/myperl/bin/perl Makefile.PL MP_APXS=/opt/myapache/bin/apxs make make test make install vi /opt/myapache/conf/httpd.conf # Add LoadModule perl_module modules/mod_perl.so /opt/myapache/bin/apachectl start - --8<-- I've timed it and it took my now exactly 20 Minutes to get a setup with: - - perl 5.8.7 - - httpd-2.0.54 - - mod-perl 2.0.1 When it comes to php I have no idea but I think its also that straight forward. As I've always said I'm not a friend of those rpm's and it really does take that long to get a running system. At least less time than it took you: - - find what's going wrong with your installation - - work with ancient software like apache-2.0.40 causing you headache because you are runing it long standing fixed bugs Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFDBX0jkVPeOFLgZFIRAg63AJ485/bL6i5wgJxcPtbXG4Raw9VffgCgniot hkzZ4lKj1xLzk36cKQ6xB6M= =dINX -END PGP SIGNATURE- Thanks so much for everyones help. I think I will run the apache 2.0.40 for all of the main site and everything. Would it be a performance issue to run both at the same time? Also, I will need to share variables (or at least a cookie or something for authorized users) between the two servers/scripts. Is this possible? I will need to auth a user from one server (using PHP/Mambo)... and only allow those authed users to use this second server. I am very open to suggestions. I have both Perl 5.8.0 and 5.8.7 installed. Both seems to still be working fine. The main system (when just using perl from the $PATH) is now using 5.8.7. Perl 5.8.0 seems to still be working and installed. I wouldn't need mod_php on the second server... at least night right away... so that is not an issue. Is it best to install into /opt? I didn't do this for Perl.. nor the new apache, however I removed all apache2 files I could find with 'locate'. I prefer to use RPMs... however the main httpd server is an RPM... 2.0.40. Also, I can have many IPs... so I would maybe not run on port 81... just run it on 80 on a different IP. Thanks in advance. -Jon
Re: Apache, Mod_Perl Upgrade
Stas Bekman wrote: Philip M. Gollucci wrote: [...] Actually from the README, *** Prerequisites *** Apache: Dynamic mod_perl (DSO):Apache 2.0.47 - 2.0.54. Static mod_perl: Apache 2.0.51 - 2.0.54. Newer Apache versions may work with this version of mod_perl. If not, the svn version likely will, which can be obtained from: http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution 2.0.40 IS TOO OLD though it might work if you are lucky, I forget exactly why we upped the minium httpd version for dynamic. Because of the Apache API changes. 2.0.40 wasn't of a release quality (I think it was still beta or something) Plesk reports: httpd 2.0.40-21.18.legacy php 4.3.2-psa.rh9.1 mod_python 3.0.1-4 tomcat4 4.1.30-2jpp mod_perl 1.99_07-5 perl-Apache-ASP 2.57-rh9.build75050506.13 -Jon
Re: Apache, Mod_Perl Upgrade
Tom Schindl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went back to my 2.0.40 install of Apache. The 2.0.54 was not playing nice with plesk. How do I update the @INC path and/or mod_perl for the new perl 5.8.7? I try using CPAN with install Bundle::Apache and no go. Any ideas? -Jon I not sure if there have been API changes since 2.0.40 and 2.0.54 but compiling mod-perl-2.x with apache 2.0.54 and use it with 2.0.40 this will certainly lead to very strange situations you. As in the message before there's nothing wrong when running 2.0.40 if your plesk system needs it and install your own apache-2.0.54 and run it on a different port (e.g. 81). As already said before als compiling Apache-2.0.x is straight forward and nothing you could not manage without reading the bundled INSTALL-File(s). Default-Install-Procedure: - --8<-- tar xzvf stable.tar.gz cd perl-5.8.7/ sh ./Configure -de -Dprefix=/opt/myperl make make test su make install exit cd .. tar xjvf httpd-2.0.54.tar.bz2 cd httpd-2.0.54 ./configure --prefix=/opt/myapache make make install vi /opt/myapache/conf/httpd.conf # search for Listen and set it to 81 cd .. cd mod_perl-2.0.1/ /opt/myperl/bin/perl Makefile.PL MP_APXS=/opt/myapache/bin/apxs make make test make install vi /opt/myapache/conf/httpd.conf # Add LoadModule perl_module modules/mod_perl.so /opt/myapache/bin/apachectl start - --8<-- I've timed it and it took my now exactly 20 Minutes to get a setup with: - - perl 5.8.7 - - httpd-2.0.54 - - mod-perl 2.0.1 When it comes to php I have no idea but I think its also that straight forward. As I've always said I'm not a friend of those rpm's and it really does take that long to get a running system. At least less time than it took you: - - find what's going wrong with your installation - - work with ancient software like apache-2.0.40 causing you headache because you are runing it long standing fixed bugs Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFDBX0jkVPeOFLgZFIRAg63AJ485/bL6i5wgJxcPtbXG4Raw9VffgCgniot hkzZ4lKj1xLzk36cKQ6xB6M= =dINX -END PGP SIGNATURE- I am currently using these install notes. I have run into another problem. This must have been caused by one of my first perl installs? /opt/perl/bin/perl Makefile.PL MP_APXS=/opt/httpd/bin/apxs Reading Makefile.PL args from @ARGV MP_APXS = /opt/httpd/bin/apxs no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? I have installed perl and apache as described above. Include should be /opt/perl? Any ideas? Thanks in advance. Jon
Apache, PERL, Mod_Perl Install Issues
Thanks everyone for all your help. I am still having issues. When installing to /opt everything works fine untill I go to install mod_perl. I am erroring out on the line... /opt/perl/bin/perl Makefile.PL MP_APXS=/opt/httpd/bin/apxs -fails with- Reading Makefile.PL args from @ARGV MP_APXS = /opt/httpd/bin/apxs no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Any ideas? Jon Tom Schindl wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went back to my 2.0.40 install of Apache. The 2.0.54 was not playing nice with plesk. How do I update the @INC path and/or mod_perl for the new perl 5.8.7? I try using CPAN with install Bundle::Apache and no go. Any ideas? -Jon I not sure if there have been API changes since 2.0.40 and 2.0.54 but compiling mod-perl-2.x with apache 2.0.54 and use it with 2.0.40 this will certainly lead to very strange situations you. As in the message before there's nothing wrong when running 2.0.40 if your plesk system needs it and install your own apache-2.0.54 and run it on a different port (e.g. 81). As already said before als compiling Apache-2.0.x is straight forward and nothing you could not manage without reading the bundled INSTALL-File(s). Default-Install-Procedure: - --8<-- tar xzvf stable.tar.gz cd perl-5.8.7/ sh ./Configure -de -Dprefix=/opt/myperl make make test su make install exit cd .. tar xjvf httpd-2.0.54.tar.bz2 cd httpd-2.0.54 ./configure --prefix=/opt/myapache make make install vi /opt/myapache/conf/httpd.conf # search for Listen and set it to 81 cd .. cd mod_perl-2.0.1/ /opt/myperl/bin/perl Makefile.PL MP_APXS=/opt/myapache/bin/apxs make make test make install vi /opt/myapache/conf/httpd.conf # Add LoadModule perl_module modules/mod_perl.so /opt/myapache/bin/apachectl start - --8<-- I've timed it and it took my now exactly 20 Minutes to get a setup with: - - perl 5.8.7 - - httpd-2.0.54 - - mod-perl 2.0.1 When it comes to php I have no idea but I think its also that straight forward. As I've always said I'm not a friend of those rpm's and it really does take that long to get a running system. At least less time than it took you: - - find what's going wrong with your installation - - work with ancient software like apache-2.0.40 causing you headache because you are runing it long standing fixed bugs Tom -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFDBX0jkVPeOFLgZFIRAg63AJ485/bL6i5wgJxcPtbXG4Raw9VffgCgniot hkzZ4lKj1xLzk36cKQ6xB6M= =dINX -END PGP SIGNATURE-
Re: Apache, PERL, Mod_Perl Install Issues
Philip M. Gollucci wrote: Jonathan Steffan wrote: no conflicting prior mod_perl version found - good. [ error] '/opt/httpd/bin/apxs -q INCLUDEDIR' failed: [ error] Can't locate strict.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7 /usr/local/lib/perl5/site_perl .) at /opt/httpd/bin/apxs line 19. BEGIN failed--compilation aborted at /opt/httpd/bin/apxs line 19. [ error] Unable to determine server version, aborting. [ error] Invalid MP_APXS specified? Any ideas? Apparently apxs is using the wrong perl. You might change the #! line at the top of it, update your path to have /opt/perl/bin before /usr/local/bin, or rename your system perl temporarily. HTH Phil, I had installed perl to /usr/local/lib/perl5/5.8.7 in a previous exercise. The main system perl is supposed to be 5.8.0. This issues seems to be lingering around from that install? I only removed the /usr/local/lib/perl5/5.8.7 and all related files I could find for perl 5.8.7 with locate. I will try your advice with changing the apxs file. Any other notes? Thanks for your message. -Jon
Mod_Perl2 :: RPM Concepts
Hello again all, I am thinking about using perl to package RPMs. I am going to do the interface via mod_perl for managing the tree. Anyone have experience with building rpms with perl? I hope I'm not starting from scratch. Thanks in advance. Jonathan Steffan P.S. As background, I am going to do this for art.gnome.org themes... so any of you gnome fans... let me know what you think. I will eventually move to KDE and all (dream) the other window managers for rpm capable Linux.
mod_perl, mod_proxy, mod_rewrite
Hello again all, I have a static frontend apache (2.0.40 mp1.99) and a backend apache (2.0.54 mp2) that run my searches. I am mod_rewriting the frontend apache to take /search/a/b/c and rewrite it to the backend running on host:81. The backend is where the perl code is. So search/a/b/c -> http://localhost:81/perl/script?a=a&b=b&c=c. When I just redirect the connection (of course not to localhost) it seems to work fine. When I proxy it by adding [P] to the rewrite rule, I get the following issue: [Wed Sep 14 04:39:08 2005] [error] slurp_filename('/opt/apache2/perl/script?a=a&b=b&c=c') / opening: (2) No such file or directory at /opt/perl/lib/site_perl/5.8.7/i686-linux/ModPerl/RegistryCooker.pm line 540 Looks like it is not passing the arguments properly. Any ideas? I have used [P,NE] and [P] with the same results. The rewrite happens correctly and shows when using [R]. Thanks for any help. Jon
Mod_Perl2 w/mod_proxy/mod_rewrite
1. Concept: 2. 3. GET http://domain.tld/search/a/b/c (via :80) 4. rewrite search/a/b/c -> http://localhost:8080/perl/script?a=a&b=b&c=c [P] (via .htaccess RewriteRule) [OK] (localhost:8080 is another apache w/mod_perl) 5. proxy: http://localhost:8080/perl/script?a=a&b=b&c=c [OK] 6. GET http://localhost:8080/perl/script?a=a&b=b&c=c via (domain.tld:80) proxy-> [Server Error: on apache2.0.54/mp2.0.1/perl5.8.7 via localhost:8080] 7. Error: 8. 9. [error] slurp_filename('/opt/apache2/perl/script.pl?a=a&b=b&c=c') / opening: (2) No such file or directory at /opt/perl/lib/site_perl/5.8.7/i686-linux/ModPerl/RegistryCooker.pm line 540 The rewrite works fine when not using mod_proxy. Mod_proxy seems to split out the uri and vars correctly. When using mod_proxy... this is what I get. Does anyone think this is an issue with mod_perl2? Jon
Re: index.pl not default, even when specified
Well... This is what you need to do. Add to your mod_perl enabled block. (Lock this down more later): AllowOverride All In .htaccess file where you want index.pl to handle requests: ErrorDocument 404 /path/to/index.pl Hope this fixes it. I use it. -Jonathan Dickon Newman wrote: I tried wrapping the DirectoryIndex (in the main config area) around this IfModule tag..problem persists. Dickon... Jeff wrote: This is a little over my head..is it really the solution to my problem? Does this mean the problem lies with ModPerl::RegistryPrefork? There has to be a better way to have index.pl show up as default! However, if you tell me there isn't, I shall begin learning about this and pursuing it further. Does anyone out there have index.pl coming up as default in a vhost and can share their httpd.conf file? In the main part of httpd.conf... then you dont have to specify it in all the VHOSTS # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. DirectoryIndex index.pl index.htm index.html
Re: index.pl not default, even when specified
I tried with my FC3 machine (Apache::Registry) and I could also not get index.pl to be the default document. Jonathan Perrin Harkins wrote: On Thu, 2005-09-29 at 17:24 -0600, Jonathan Steffan wrote: Well... This is what you need to do. Add to your mod_perl enabled block. (Lock this down more later): AllowOverride All In .htaccess file where you want index.pl to handle requests: ErrorDocument 404 /path/to/index.pl There's no need to make it a 404 handler -- DirectoryIndex works just fine with Apache::Registry. I'm using it right now. Something else must be wrong with his config file. - Perrin
Re: index.pl not default, even when specified
** 2.6.12-1.1378_FC3smp #1 SMP Wed Sep 14 04:52:36 EDT 2005 i686 i686 i386 GNU/Linux ** Server version: Apache/2.0.53 Server built: Sep 5 2005 09:28:47 ** This is perl, v5.8.5 built for i386-linux-thread-multi ** mod_perl-1.99_16-3 ** DirectoryIndex index.pl ** Did not seem to work for me... but I only had a minute to test. Jonathan Perrin Harkins wrote: On Thu, 2005-09-29 at 18:22 -0600, Jonathan Steffan wrote: I tried with my FC3 machine (Apache::Registry) and I could also not get index.pl to be the default document. It works fine on about dozen different FC3 machines here. I suspect there's something about the combination of directives you are using that doesn't work. I specify the handler using a FilesMatch section on *.pl. - Perrin
Re: Mod_Perl2 w/mod_proxy/mod_rewrite
The rewrite rule is different. Something like: RewriteRule ^(*.)/(*.)/(*.) http://localhost:8080/perl-bb/script.pl?a=$1&b=$2&c=$3 [P] However, I worked around the issue and used a ProxyPass to pass the request to the backend and _then_ do the rewrite. The handler is also different. -Jon Philip M. Gollucci wrote: Philip M. Gollucci wrote: [error] slurp_filename('/opt/apache2/perl/script.pl?a=a&b=b&c=c') / opening: (2) No such file or directory at /opt/perl/lib/site_perl/5.8.7/i686-linux/ModPerl/RegistryCooker.pm line 540 This works for me if I am understanding you correctly. Okay, so I've got this setup perl 5.8.7 no ithread apache 2.0.54 apr not threaded mp2-svn I've got httpd.conf and httpd_mp2.conf httpd.conf: Listen 80 RewriteEngine On RewriteLog ".../logs/rewrite_log" ErrorLog ".../logs/error_log" RewriteLogLevel 3 RewriteRule search/a/b/c http://localhost:8080/perl-bb/script.pl?a=a&b=b&c=c [P] httpd_mp2.conf Listen 8080 ErrorLog ".../logs/error_log_mp2" Load perl_module modules/mod_perl.so Alias /perl-bb/ ../perl-bb/ SetHandler perl-script PerlResponseHandler ModPerl::RegistryBB Options +ExecCGI Allow from all Start the Servers sudo bin/httpd -f httpd.conf bin/httpd -f httpd_mp2.conf Request curl http://localhost/search/a/b/c Access Log httpd.conf:80 127.0.0.1 - - [01/Oct/2005:01:23:54 -0400] "GET /search/a/b/c HTTP/1.1" 200 33 127.0.0.1 - - [01/Oct/2005:01:23:54 -0400] "GET /search/a/b/c HTTP/1.1" 200 33 "-" "curl/7.13.1 (i386-portbld-freebsd5.4) libcurl/7.13.1 OpenSSL/0.9.7e zlib/1.2.1" httpd_mp2.conf:8080 127.0.0.1 - - [01/Oct/2005:01:23:54 -0400] "GET /perl-bb/script.pl?a=a&b=b&c=c HTTP/1.1" 200 33 127.0.0.1 - - [01/Oct/2005:01:23:54 -0400] "GET /perl-bb/script.pl?a=a&b=b&c=c HTTP/1.1" 200 33 "-" "curl/7.13.1 (i386-portbld-freebsd5.4) libcurl/7.13.1 OpenSSL/0.9.7e zlib/1.2.1" The server Error Logs httpd.conf:80 [Sat Oct 01 01:23:35 2005] [notice] Digest: generating secret for digest authentication ... [Sat Oct 01 01:23:35 2005] [notice] Digest: done [Sat Oct 01 01:23:35 2005] [notice] Apache/2.0.54 (Unix) DAV/2 configured -- resuming normal operations [Sat Oct 01 01:23:35 2005] [info] Server built: Sep 30 2005 20:27:31 [Sat Oct 01 01:23:35 2005] [debug] prefork.c(956): AcceptMutex: flock (default: flock) [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(67): proxy: HTTP: canonicalising URL //localhost:8080/perl-bb/script.pl [Sat Oct 01 01:23:54 2005] [debug] mod_proxy.c(418): Trying to run scheme_handler [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(1059): proxy: HTTP: serving URL http://localhost:8080/perl-bb/script.pl?a=a&b=b&c=c [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(186): proxy: HTTP connecting http://localhost:8080/perl-bb/script.pl?a=a&b=b&c=c to localhost:8080 [Sat Oct 01 01:23:54 2005] [debug] proxy_util.c(1139): proxy: HTTP: fam 2 socket created to connect to localhost [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(336): proxy: socket is connected [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(370): proxy: connection complete to 127.0.0.1:8080 (localhost) [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(893): proxy: start body send [Sat Oct 01 01:23:54 2005] [debug] proxy_http.c(953): proxy: end body send httpd_mp2.conf:8080 [Sat Oct 01 01:23:41 2005] [notice] Digest: generating secret for digest authentication ... [Sat Oct 01 01:23:41 2005] [notice] Digest: done [Sat Oct 01 01:23:41 2005] [warn] pid file /usr/home/pgollucci/httpd/2.0.54/prefork/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Oct 01 01:23:41 2005] [notice] Apache/2.0.54 (Unix) DAV/2 mod_perl/2.0.2-dev Perl/v5.8.7 configured -- resuming normal operations [Sat Oct 01 01:23:41 2005] [info] Server built: Sep 30 2005 20:27:31 [Sat Oct 01 01:23:41 2005] [debug] prefork.c(956): AcceptMutex: flock (default: flock) The rewrite Log 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (2) init rewrite engine with requested uri /search/a/b/c 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (3) applying pattern 'search/a/b/c' to uri '/search/a/b/c' 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (2) rewrite /search/a/b/c -> http://localhost:8080/perl-bb/script.pl?a=a&b=b&c=c 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (3) split uri=http://localhost:8080/perl-bb/script.pl?a=a&b=b&c=c -> uri=http://localhost:8080/perl-bb/script.pl, args=a=a&b=b&c=c 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (2) forcing proxy-throughput with http://localhost:8080/perl-bb/script.pl 127.0.0.1 - - [01/Oct/2005:01:23:54 --0400] [localhost/sid#80a6dc8][rid#8169050/initial] (1) go-ahead with proxy request proxy:http://localhost:8080/perl-bb/script.pl [OK] HTH
Re: PERL Support Under Apache2
Fedora 4 has SELinux enabled by default. This might be an SELinux issue. Run the following command to test without SELinux: #setenforce 0 If that fixes it, you need to tweak your SELinux settings for Apache. You can email me for help if needed. Fair warning, reboot or 'setenforce 1' because you can rock your SELinux contexts while not enforcing. You would then have to relabel... and that might be a pain in the rear. Jonathan Steffan Blair Copeland wrote: My perl script will not work correctly when run from Apache2 but works fine from the command line. Apache2 invokes the perl script to use Net::LDAP to bind through stunnel to another server. It works perfectly from the command line but it fails to bind when run via Apache2 on this Fedora System. It works great from a Debian System using Apache2. Actually it looks like it is never even invoking the stunnel process at all. I have nothing in /etc/hosts.allow and nothing in /etc/hosts.deny and I have completely shutdown iptables during my test. So, with those conditons is there any reason that perl through Apache2 would fail to attach back to the stunnel process? I have tried this both with and without the mod_perl active in Apache, so it may be more of a server issue not ALLOWing apache to connect to the stunnel process, but I thought I would start here and beg for suggestions. %uname -a Linux eval.cecs.unt.edu 2.6.13-1.1532_FC4smp #1 SMP Thu Oct 20 01:51:51 EDT 2005 i686 i686 i386 GNU/Linux Information from the perl-status Summary of my perl5 (revision 5 version 8 subversion 6) configuration: Platform: osname=linux, osvers=2.4.21-27.0.2.elsmp, archname=i386-linux-thread-multi uname='linux decompose.build.redhat.com 2.4.21-27.0.2.elsmp #1 smp wed jan 12 23:35:44 est 2005 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Dversion=5.8.6 -Dmyhostname=localhost [EMAIL PROTECTED] -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_endprotoent_r_proto -Ud_endservent_r_proto -Ud_sethostent_r_proto -Ud_setprotoent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.5 5.8.4 5.8.3' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='4.0.0 20050516 (Red Hat 4.0.0-6)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.5.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.6/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Package Version Modified File Apache2::Const 2.01 Fri Jun 17 20:51:45 2005 /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/Apache2/Const.pm Apache2::RequestIO 2.01 Fri Jun 17 20:52:24 2005 /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/Apache2/RequestIO.pm Apache2::RequestRec 2.01 Fri Jun 17 20:52:13 2005 /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/Apache2/RequestRec.pm Apache2::RequestUtil 2.01 Fri Jun 17 20:52:05 2005 /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/Apache2/RequestUtil.pm Apache2::ServerUtil 2.01 Fri Jun 17 20:51:49 2005
Re: PERL Support Under Apache2
Your welcome. You might try system-config-securitylevel and edit the HTTPD settings. Try: Allow HTTPD cgi support. Allow HTTPD scripts to connect to the network. Allow HTTPD to support built-in scripting. Unify HTTPD handling of all content files. (maybe? try last) Unify HTTPD to communicate with the terminal. You can then use 'chcon' and 'ls -alZ' to help work with the SELinux permissions. Check your messages log to see the SELinux access denied messages to get a better understanding of what is going on in the background. This resource might help you use SELinux: http://fedora.redhat.com/docs/selinux-apache-fc3/ Cheers to Linux, Jonathan Steffan P.S. I think you need to restart for the changes by system-config-securitylevel to take effect. Blair Copeland wrote: Thanks to the brilliance of Jonathan Steffan it turns out that Fedora 4 has SELinux enabled by default. "Hello problem." Thank you sir and hopefully no one will waste thier time now. I appreciate it Jon and I appreciate the list maintainers here. Sorry it turned out to be off topic. Blair
Re: detecting scheme (http or https)
[EMAIL PROTECTED] wrote: Is there a way that I can find out how a user has requested a page? Everything I have read suggests that I can do it by $r->parsed_uri->scheme, but this always seems to yeild undef. thanks in advance. It would help alot if you showed us what you are working with. All you have told me so far is Apache 1.3. It would help to know what versions of perl, apache and mod_perl you are using. Jon P.S. I'm still on freenode right now.