Gossamer Forum
Home : Products : Others : MySQLMan :

MySQLMan and mod_perl

Quote Reply
MySQLMan and mod_perl
I'm running MySQLMan 1.09 on Apache 1.3 on Windows 2000 with mod_perl installed. At the top of every page I get cookie data and headers. Occasionaly I get HTML source code instead of the page being parsed. This doesn't happen on any other programs on my server that I've noticed, and the problem goes away when I turn mod_perl off.

any ideas how to remedy this?

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] MySQLMan and mod_perl In reply to
I got this today:

Stack Trace
-------------------------------------------
(Apache::ROOTwww_2ewiredon_2enet::cgi_2dbin::forum::admin::mysqlman::mysql_2ecgi::cgierr) called from (/home/httpd/vhosts/wiredon.net/cgi-bin/forum/admin/mysqlman/mysql.cgi) line (37)
(Apache::ROOTwww_2ewiredon_2enet::cgi_2dbin::forum::admin::mysqlman::mysql_2ecgi::handler) called from (/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm) line (143)
((eval)) called from (/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/Registry.pm) line (143)
(Apache::Registry::handler) called from (/dev/null) line (0)
((eval)) called from (/dev/null) line (0)
Quote Reply
Re: [King Junko II] MySQLMan and mod_perl In reply to
Hi,

Do you have PerlSendHeader On in your httpd.conf?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] MySQLMan and mod_perl In reply to
I found this regarding my error:

Files pulled in via use or require statements are not automatically reloaded when changed on disk. See the Apache::StatINC module to add this functionality.

Undefined subroutines
A common trap with required files may result in an error message similar to this in the error_log:

[Thu Sep 11 11:03:06 1997] Undefined subroutine
&Apache::ROOT::perl::test_2epl::some_function called at
/opt/www/apache/perl/test.pl line 79.

As the above items explains, a file pulled in via require will only happen once per-process (unless %INC is modified). If the file does not contain a package declaration, the file's subroutines and variables will be created in the current package. Under CGI, this is commonly package main. However, Apache::Registry scripts are compiled into a unique package name (base on the uri). So, if multiple scripts in the same process try to require the same file, which does not declare a package, only one script will actually be able to see the subroutines. The solution is to read perlmodlib, perlmod and related perl documentation and re-work your required file into a module which exports functions or defines a method interface.
Quote Reply
Re: [Alex] MySQLMan and mod_perl In reply to
Hm... I added that in and the problem went away. I wasn't aware of that needing to be in there.

Thanks Alex :-)

--Philip
Links 2.0 moderator