Environment configuration problems
OK, I've tried everything I can think of and I'm still having environment configuration problems. I have a series of scripts that access an Oracle database. At a minimum, two environment variables need to be set up for this; ORACLE_HOME and LD_LIBRARY_PATH (must include $ORACLE_HOME/lib) I set both of these in the httpd.conf file for both the CGI and mod_perl environment using using SetEnv and PerlSetEnv respectively. Looking at the environment using /perl-status shows them set properly. Now, when I try to kick hit one of these via mod_perl, I consistently get a'failed compilation' error when the script attempts to hook up to the database. THE EXACT SAME SCRIPT will run fine as a plain old CGI. If I shutdown the web server, set ORACLE_HOME and LD_LIBRARY_PATH in my environment (root's environment actually) and restart Apache, the mod_perl references start working fine. Is there some strangeness in my current version of Apache that only allows environment variables to be set for mod_perl *if* they are set in the Apache startupenvironment first? I'm currently running Apache 1.3.12 on RedHat 6.0 (2.2.14)with mod_perl 1.24 build on Perl 5.00503. Apache::DBI 0.87 is loaded along with DBI 1.14. Obviously the workaround for the time being is to start up the server manually, but this DOES NOT help matters if the server has to reboot for some reason. One other thing, I have an almost identical configuration running on two other servers, and it seems to run fine. The differences being the Linux version (Mandrake 7.0 vice RedHat) on one and Apache 1.3.9 on the other. I've 'diffed' everything I can think of and just can't find the problem I'm certain that I have just missed *one little line* in a config script, but try as I might, I can't find it. Thanks for the help! - Ralph Hughes [EMAIL PROTECTED]Sr. Systems Engineer 334-260-3200Anteon Corp. DSN 596-5631Montgomery, AL
Segmetation Fault problem
Hello! I've come upon a strange problem with my Apache/mod_perl configuration. (Apache v 1.3.9 mod_perl 1.21) When I attempt to preload Perl modules like FileHandle, Apache::DBI, DBI, etc., the httpd process gets a segmentation fault and core dumps at startup. I've tried using the PerlModule directive as well as a PerlRequire and a startup file with the same results. Here's the strange part. If I start the server first, then modify the configuration and *restart* it (not a stop and start) the modules load up and work fine. Anyone seen anything like this before ?? Any help would be appreciated! Thanks in advance! - Ralph Hughes mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Systems Engineer 334-260-3200 Anteon Corp.DSN 596-5631 Montgomery, AL
RE: Segmetation Fault problem
Nope! I didn't trust the RPM configuration so I built Apache, and mod_perl from source. After you do it half a dozen times or so, it's almost as fast as the RPM install :-) -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 12:11 PM To: 'Michael Todd Glazier'; Hughes, Ralph; ModPerl Subject: RE: Segmetation Fault problem are you both using the default RPM from redhat? IIRC, if you check the archives, you'll find similar reports for users of the RPM. Generally, RedHat RPMs use mod_perl as a DSO, and it seems mod_perl's DSO received lots of DSO upgrading/tuning after 1.21. I'd suggest rolling your own mod_perl + apache statically from the sources and see if the problem goes away. At the very least, try to use a static RPM: http://perl.apache.org/guide/install.html#Installing_a_single_apache_mod_p rolling your own is not all that difficult, if you are up to trying: http://perl.apache.org/guide/install.html HTH --Geoff -Original Message- From: Michael Todd Glazier [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 12:40 PM To: Hughes, Ralph; ModPerl Subject: Re: Segmetation Fault problem Ralph, This isn't any help, but this describes the exact same problem I'm having. Using your experience I was able to get the module to load with a HUP. I wonder is the dir DBI is in doesn't get put into @INC until sometime after startup.pl tries to run? I'll have to experiment with that. - mt At 12:24 PM -0400 6/2/00, Hughes, Ralph wrote: Hello! I've come upon a strange problem with my Apache/mod_perl configuration. (Apache v 1.3.9 mod_perl 1.21) When I attempt to preload Perl modules like FileHandle, Apache::DBI, DBI, etc., the httpd process gets a segmentation fault and core dumps at startup. I've tried using the PerlModule directive as well as a PerlRequire and a startup file with the same results. Here's the strange part. If I start the server first, then modify the configuration and *restart* it (not a stop and start) the modules load up and work fine. Anyone seen anything like this before ?? Any help would be appreciated! Thanks in advance! - Ralph Hughes mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Systems Engineer 334-260-3200 Anteon Corp.DSN 596-5631 Montgomery, AL
RE: Segmetation Fault problem
I'm not too good on back traces myself. ` I'm using a dynamic build of mod_perl, so I may try building the 1.24 version next week sometime. I hadn't thought of changing the PerFreshStart parameter, it might make a difference... -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 1:11 PM To: Hughes, Ralph; 'Michael Todd Glazier'; ModPerl Subject: RE: Segmetation Fault problem hmmm, did you try upgrading your installation then? you are using a static mod_perl? PerlFreshRestart Off? I'm no good at reading backtraces, but posting that is probably the next step (see SUPPORT doc section on core dumps in the distribution) sorry I can't be of more help... --Geoff
RE: Segmetation Fault problem
COOL! I couldn't wait... I built and installed mod_perl 1.24 and it fixed the problem! Now if I can just get the CGI module to recognize my domainname .. :-) -Original Message- From: Hughes, Ralph Sent: Friday, June 02, 2000 2:02 PM To: Geoffrey Young; 'Michael Todd Glazier'; ModPerl Subject: RE: Segmetation Fault problem I'm not too good on back traces myself. ` I'm using a dynamic build of mod_perl, so I may try building the 1.24 version next week sometime. I hadn't thought of changing the PerFreshStart parameter, it might make a difference... -Original Message- From: Geoffrey Young [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 1:11 PM To: Hughes, Ralph; 'Michael Todd Glazier'; ModPerl Subject: RE: Segmetation Fault problem hmmm, did you try upgrading your installation then? you are using a static mod_perl? PerlFreshRestart Off? I'm no good at reading backtraces, but posting that is probably the next step (see SUPPORT doc section on core dumps in the distribution) sorry I can't be of more help... --Geoff
Strange mod_perl problem
I have several CGI scripts that I am in the process of moving to a new server using mod_perl and Apache. The scripts connect to an Oracle database using the Oraperl module wrapper for DBI and DBD::Oracle. Basically the scripts display a simple for for user input, this works fine. When the form is posted the script connects to a database, queries using the parameters provided, and returns a short report to the user. The scripts run fine as CGIs, but when I run them under mod_perl I'm not getting any output from the database after the form is posted. What's really strange is that I'm not getting any Oracle errors either. The return page has the proper HTML and BODY tags, but no data at all. I've tried running the script with and without the Apache::DBI module loaded, but it didn't make any difference. A check of the perl-status shows all the appropriate (I think) modules loaded for mob_perl. I'm stumped! Any help would be appreciated! Please CC replies to my email address. Thanks in advance! - Ralph Hughes mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Systems Engineer 334-260-3200 Anteon Corp.DSN 596-5631 Montgomery, AL
Strange mod_perl output problem - Followup
OK, After further investigation, it seems that Oraperl/DBI/DBD, etc. are not at fault! I'm formatting the data for display using Perl formats and displaying it as pre-formatted output using pre/pre tags. This works great for CGI, but mod_perl seems to be having trouble with the write() calls to dump the data. Again, there are no errors, but no output either. Anyone have any experience with this?? Please CC replies to my email address. Thanks in advance! - I have several CGI scripts that I am in the process of moving to a new server using mod_perl and Apache. The scripts connect to an Oracle database using the Oraperl module wrapper for DBI and DBD::Oracle. - Lot's of erroneous stuff deleted --- - Ralph Hughes mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] Systems Engineer 334-260-3200 Anteon Corp.DSN 596-5631 Montgomery, AL