Mike Southworth | 1 Jul 2008 23:38

Issue with mod_log_sql breaking CGI functionality in Apache2

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@...

Edward Rudd | 4 Jul 2008 16:18
Favicon
Gravatar

Re: Issue with mod_log_sql breaking CGI functionality in Apache2

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
(Continue reading)

Mike Southworth | 7 Jul 2008 16:25

Re: Issue with mod_log_sql breaking CGI functionality in Apache2

Edward,

I last attached the access log instead of the error log apparently. 
Third time's a charm.

Sorry about that,

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  
(Continue reading)

Mike Southworth | 7 Jul 2008 16:18

Re: Issue with mod_log_sql breaking CGI functionality in Apache2

Edward,

Per my previous reply, log rotate had apparently decided to archive my
apache2 error.log just prior to my attaching the current one.  Find
attached the older log containing the relevant entries.  Note:  I had
debug level logging enabled for the latter portion of this log.

Thank you,

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
(Continue reading)

Mike Southworth | 7 Jul 2008 16:06

Re: Issue with mod_log_sql breaking CGI functionality in Apache2

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-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org
_______________________________________________ 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-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org

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
[Mon Jul 07 09:52:38 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
#!/bin/bash

echo "Content-Type: text/plain"
echo
echo "Bash is working."
Attachment (HelloWorld.pl): application/x-perl, 121 bytes
#!/bin/sh
echo "Content-Type: text/plain"
echo
printenv

Attachment (test.pl): application/x-perl, 79 bytes
_______________________________________________
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@...

Gmane