Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-23 Thread Ged Haywood
Hi there, On Tue, 22 May 2001, Ask Bjoern Hansen wrote: > If you want to die then Come on, mod_perl is tricky sometimes but things can't be that bad... 73, Ged.

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-22 Thread Bird Lei
At 03:28 AM 2001/5/22 +0100, you wrote: >Incidentally, I am using the following module versions: > >DBD-MySQL [1.2214]; >DBI [1.13] > >Does this have any bearing on my problem? Does reinstalling the DBI help? I had problem with DBI before. I just reinstalled it and it works fine. (I can jus

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-22 Thread Jonathan M. Hollin
My Lords, Ladies and Gentlemen, I am delighted to announce that this problem is now SOLVED. That is, I can now access my MySQL database from a Perl script running under mod_perl. I won't detail the whole sorry affair again, but the rogue line read: $dsn = "DBI:$driver:database=shapeshifter;hos

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-22 Thread Jonathan M. Hollin
My Lords, Ladies and Gentlemen, I am delighted to announce that this problem is now SOLVED. That is, I can now access my MySQL database from a Perl script running under mod_perl. I won't detail the whole sorry affair again, but the rogue line read: $dsn = "DBI:$driver:database=shapeshifter;hos

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-22 Thread Ask Bjoern Hansen
On Mon, 21 May 2001, Rodney Broom wrote: > $dbh = DBI->connect($dsn, dbusrname, dbpassword) > or die "Error: $DBI::errstr"; If you want to die then $dbh = DBI->connect($dsn, dbusrname, dbpassword, { RaiseError => 1}); would look neater. s/Raise/Print/ to just have it spew the error mes

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Matt Sergeant
On Tue, 22 May 2001, Jonathan M. Hollin wrote: > This is driving me crazy... is there anything special I need to do when > using DBI (DBD::MySQL) with mod_perl. A script that works just fine sans > mod_perl dies with error 500 (Internal Server Error) when mod_perl is > enabled for that file typ

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Mike Cameron
Ken Williams wrote: > [EMAIL PROTECTED] (Jonathan M. Hollin) wrote: > >:: Okay, last idea: you say you can connect to mysql from the command line, > >:: from regular CGI, and from PHP. I'm guessing that in all of those > >:: situations, you're acting as the same user (win2k user, not mysql use

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Ken Williams
[EMAIL PROTECTED] (Jonathan M. Hollin) wrote: >:: Okay, last idea: you say you can connect to mysql from the command line, >:: from regular CGI, and from PHP. I'm guessing that in all of those >:: situations, you're acting as the same user (win2k user, not mysql user). >:: However, under mod_perl

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: Okay, last idea: you say you can connect to mysql from the command line, :: from regular CGI, and from PHP. I'm guessing that in all of those :: situations, you're acting as the same user (win2k user, not mysql user). :: However, under mod_perl you'll be acting as whatever user your web :: ser

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Ken Williams
[EMAIL PROTECTED] (Jonathan M. Hollin) wrote: >I'm probably going to have to forfeit mod_perl after all. :-( Okay, last idea: you say you can connect to mysql from the command line, from regular CGI, and from PHP. I'm guessing that in all of those situations, you're acting as the same user (win

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
Incidentally, I am using the following module versions: DBD-MySQL [1.2214]; DBI [1.13] Does this have any bearing on my problem? Kindest regards, Jonathan M. Hollin Digital-Word.com LATEST NEWS: Digital-Word.com releases e-gateway v3.0. See: http://e-gateway.1-1IT.Net/ for further details.

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
Rodney, :: I propose that you reduce it to: :: :: # BEGIN MOD_PERL CONFIG :: LoadModule perl_module modules/ApacheModulePerl :: :: :: SetHandler perl-script :: PerlHandler Apache::Registry :: :: :: # END MOD_PERL CONFIG :: :: You'll see that I'm using *.mpl. This wil

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
OK, here's the relevant part of your conf: # BEGIN MOD_PERL CONFIG LoadModule perl_module modules/ApacheModulePerl ScriptAlias /perl-bin/ "perl-bin/" PerlSendHeader On SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: Okay, then that's the problem. It's not running the script you think :: it's running. If you don't see 'Error:' in the error log, then you :: could change that script all day and your changes will never have any :: effect. But it is running the script I am requesting - I know this because w

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Ken Williams
[EMAIL PROTECTED] (Jonathan M. Hollin) wrote: >:: Tom is saying that your error message should actually include the string: >:: 'Error: '. I'm wondering the same thing, what did ~that ~ error >:: message say? > >That's my point. I DO have the "or die" code in my script - it hasn't >changed the me

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: I see what Tom is saying. You said that you found this in your error log: :: :: > [Tue May 22 01:39:47 2001] [error] DBI->connect failed: Can't :: connect to :: > MySQL server on 'localhost' (10061) at :: > e:/pad/htdocs/internet/system/frontpage.cgi line 33 :: :: But a previous message suggest

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
I see what Tom is saying. You said that you found this in your error log: > [Tue May 22 01:39:47 2001] [error] DBI->connect failed: Can't connect to > MySQL server on 'localhost' (10061) at > e:/pad/htdocs/internet/system/frontpage.cgi line 33 But a previous message suggested trying to propogate

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: Sorry if I'm pointing out the obvious, but that's what you usually see in :: the browser. The real error message will be in your apache logs, :: quite often in /var/log/httpd/error_log, but defined in your apache :: configuration. I know Tom. I already posted the error log entry, but here goe

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Tom Lancaster
> I appreciate what you were looking for Ken. But that's the point - I don't > get an error string. All I get is an "Internal Server Error". > Sorry if I'm pointing out the obvious, but that's what you usually see in the browser. The real error message will be in your apache logs, quite often

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: What does 'failed' mean? What was the error? That's the point, you :: have to see the particular error string, starting with "Error:", to find :: out what's happening. I appreciate what you were looking for Ken. But that's the point - I don't get an error string. All I get is an "Internal

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: JH> Yes I also have PHP4 installed and running properly (and am able :: JH> to connect to the MySQL server fine with PHP). :: :: Good, that establishes that your DB is working. Yes the database is working fine. Let me reiterate: DB is accessible via mysqladmin; DB is accessible via PHP; DB i

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Ken Williams
[EMAIL PROTECTED] (Jonathan M. Hollin) wrote: >:: This is suspicious. The connect() is definitely where the error is >:: happening given what you wrote earlier. Try making sure, change it to: >:: >:: use DBI(); >:: $driver = "mysql"; >:: $dsn = "DBI:$driver:database=shap

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
JH> Yes I also have PHP4 installed and running properly (and am able JH> to connect to the MySQL server fine with PHP). Good, that establishes that your DB is working. JH> Removed PHP from Apache, that didn't help. JH> Nothing else is connecting to the MySQL server. I've never used a non-*NIX

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: JH> Yes I also have PHP4 installed and running properly (and am able to :: connect :: JH> to the MySQL server fine with PHP). I'll comment out the :: PHP code from :: JH> httpd.config and see if that helps... :: :: Cool, that could be it. If not, I'd get suspicious of anything :: else that ca

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: This is suspicious. The connect() is definitely where the error is :: happening given what you wrote earlier. Try making sure, change it to: :: :: use DBI(); :: $driver = "mysql"; :: $dsn = "DBI:$driver:database=shapeshifter;host=localhost"; :: $dbh = DBI->con

Fw: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
Hey Jon, You sent this one straight to me... - Original Message - From: Jonathan M. Hollin <[EMAIL PROTECTED]> JH> Yes I also have PHP4 installed and running properly (and am able to connect JH> to the MySQL server fine with PHP). I'll comment out the PHP code from JH> httpd.config an

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
Oh the connect is definitely where it's failing. If I comment that out then everything works fine... I'll try your code though - watch this space. Kindest regards, Jonathan M. Hollin Digital-Word.com :: >:: how bout adding a 'or die DBI->errstr' to the above line to find :: >:: out whats :: >

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Ken Williams
[EMAIL PROTECTED] (Jonathan M. Hollin) wrote: >[EMAIL PROTECTED] (Mike Cameron) wrote: >:: how bout adding a 'or die DBI->errstr' to the above line to find >:: out whats >:: happening. > >Hmm... Tried that, it returns nothing!!! :-( This is suspicious. The connect() is definitely where the erro

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: You have several pieces of mod_perl configuration. If you leave it all in :: place, and try some mod_perl CGI without a DB connection, what happens? Everything works fine (tested several scripts yet and had no other problems - none of the others use DBI though). I am also using CGI.pm in the

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
JH> If I comment out the DBI code the rest of the script works fine. I have JH> test the MOD_PERL environment string and mod_perl is definitely running JH> okay. You have several pieces of mod_perl configuration. If you leave it all in place, and try some mod_perl CGI without a DB connection, wh

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
:: This indicates that ~something~ should have gone to the error :: log. Can you tell us what else is there? Nothing, except: [Tue May 22 00:44:37 2001] nul: DBI->connect failed: Can't connect to MySQL server on 'localhost' (10061) at e:/pad/htdocs/internet/system/frontpage.cgi line 29 [Tue May

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Rodney Broom
> A script that works just fine sans > mod_perl dies with error 500 (Internal Server Error) when mod_perl is > enabled for that file type: This indicates that ~something~ should have gone to the error log. Can you tell us what else is there? Can you get a DB connection with regular CGI? --- Ro

RE: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
Hmm... Tried that, it returns nothing!!! :-( Kindest regards, Jonathan M. Hollin Digital-Word.com :: "Jonathan M. Hollin" wrote: :: :: > This is driving me crazy... is there anything special I need :: to do when :: > using DBI (DBD::MySQL) with mod_perl. A script that works :: just fine sans

Re: Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Mike Cameron
"Jonathan M. Hollin" wrote: > This is driving me crazy... is there anything special I need to do when > using DBI (DBD::MySQL) with mod_perl. A script that works just fine sans > mod_perl dies with error 500 (Internal Server Error) when mod_perl is > enabled for that file type: > > Web Server

Connection to MySQL DB fails when mod_perl enabled...

2001-05-21 Thread Jonathan M. Hollin
This is driving me crazy... is there anything special I need to do when using DBI (DBD::MySQL) with mod_perl. A script that works just fine sans mod_perl dies with error 500 (Internal Server Error) when mod_perl is enabled for that file type: Web Server: Apache/1.3.19(Win32) mod_perl/1.24_01 o