[Mod_log_sql] Issue with mod_log_sql breaking CGI functionality in Apache2

Mike Southworth mike_southworth at embarqmail.com
Mon Jul 7 10:06:54 EDT 2008


Edward,

I currently have the module removed so as not to break my CGI, however
still in my apache2 error.log is the following excerpt from when I
enabled the module but had the conf directives commented out:

PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20060613+lfs/imagick.so' - libWand.so.9: cannot open
shared object file: No such file or directory in Unknown on line 0
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: insufficient
configuration info to establish database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: child spawned but unable
to open database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: insufficient
configuration info to establish database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: child spawned but unable
to open database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: insufficient
configuration info to establish database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: child spawned but unable
to open database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: insufficient
configuration info to establish database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: child spawned but unable
to open database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: insufficient
configuration info to establish database link
[Tue Jul 01 10:23:50 2008] [error] mod_log_sql: child spawned but unable
to open database link
[Tue Jul 01 10:23:50 2008] [notice] Apache/2.2.8 (Ubuntu)
PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8
configured -- resuming normal operations
[Tue Jul 01 10:23:55 2008] [error] [client 127.0.0.1] Premature end of
script headers: test.pl
[Tue Jul 01 10:26:34 2008] [notice] caught SIGWINCH, shutting down
gracefully

I have attached the entire file...  The changes occurring during this
log include my adding directives to the conf to configure mod_log_sql. 
One problem encountered was that I had to create a table "scoreboard"
which was undocumented but table parameters were mentioned in a forum
somewhere.  The configuration process was difficult (I might suggest
that a working minimal snippet for the conf file be shown on the site
rather than the line by line description of every possible directive...)

The following is in my apache2.conf (currently commented out, passwords
and names removed):

### MySQL Logger ##########################

#LogSQLLoginInfo localhost [Insert MySQL Username Here] [Insert MySQL
Password Here]
#LogSQLDatabase [Insert Database Name Here]
#LogSQLSocketFile /var/run/mysqld/mysqld.sock
#LogSQLTCPPort 3306
#LogSQLCreateTables On
#LogSQLMassVirtualHosting On
#LogSQLMachineID [Insert Machine Name Here]
#LogSQLPreserveFile /tmp/sql-preserve

### End MySQL Logger ######################

Versions:

Ubuntu Hardy,  32 bit desktop version

Via Synaptic:

apache2                                    2.2.8-1ubuntu0.3
apache2.2-common                           2.2.8-1ubuntu0.3
apache2-mpm-prefork                        2.2.8-1ubuntu0.3
libapache2-mod-perl2                       2.0.3-2ubuntu2
libapache2-mod-php5                        5.2.4-2ubuntu5.1
cgilib                                     0.5-5

When installed:

libapache2-mod-log-sql                     1.100-11.1

In short, both Perl and Bash CGI files generate "end of script headers"
when there is nothing wrong with the files.  Removing mod_log_sql's
module restores the scripts without having to edit them in any way. 
According to appache.org "any misbehaving third party module can cause
this problem".  It was driving me nuts when I thought there was a syntax
error in any of the CGI files as I could find nothing wrong.

I am also attaching some of the CGI files mentioned in the log.

Thank you for your assistance,

Mike Southworth



Edward Rudd wrote:
> That is very strange.
> I can't think of any reason it would do that.
>
> Can you attach part the part of the apache error_log when this occurs??
>
> Also can you set the apache "LogLevel" command to "debug" when you do  
> this.
>
> On Jul 1, 2008, at 5:38 PM, Mike Southworth wrote:
>
>   
>> Hello,
>>
>> I would like to bring the following issue I posted to the Ubuntu  
>> forums
>> to the attention of the mod_log_sql mailing list:
>>
>> http://ubuntuforums.org/showthread.php?t=846184
>>
>> A short description: Every time I enable mod_log_sql it breaks CGI  
>> functionality in Apache2.
>>
>> Hopefully someone might recognize the problem and be able to assist me
>> in getting the module working without taking out CGI in Ubuntu Hardy.
>>
>> I am available with whatever configuration information is required  
>> to duplicate and troubleshoot this problem.
>>
>> Thank you,
>>
>> Mike Southworth
>>
>> _______________________________________________
>> Download the latest version at http://www.outoforder.cc/projects/ 
>> apache/mod_log_sql/
>>
>> To unsubscribe send an e-mail to
>> mod_log_sql-unsubscribe at lists.outoforder.cc
>>     
>
> _______________________________________________
> Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/
>
> To unsubscribe send an e-mail to 
> mod_log_sql-unsubscribe at lists.outoforder.cc
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error.log
Url: http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bashtest.cgi
Url: http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment-0001.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.pl
Type: application/x-perl
Size: 121 bytes
Desc: not available
Url : http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PrintEnv.cgi
Url: http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment-0002.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: application/x-perl
Size: 79 bytes
Desc: not available
Url : http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20080707/478d08ec/attachment-0001.bin 


More information about the Mod_log_sql mailing list