From owner-freebsd-apache@freebsd.org Tue May 17 18:49:44 2016 Return-Path: Delivered-To: freebsd-apache@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CF99B3F4F5 for ; Tue, 17 May 2016 18:49:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 57CF61326 for ; Tue, 17 May 2016 18:49:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 571B6B3F4E9; Tue, 17 May 2016 18:49:44 +0000 (UTC) Delivered-To: apache@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56BE8B3F4E8 for ; Tue, 17 May 2016 18:49:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 474891325 for ; Tue, 17 May 2016 18:49:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u4HIniIT059551 for ; Tue, 17 May 2016 18:49:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: apache@FreeBSD.org Subject: maintainer-feedback requested: [Bug 209585] www/apache24 dynamic loading of MySQL client library generates errors with mod_perl CGI scripts Date: Tue, 17 May 2016 18:49:43 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: apache@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2016 18:49:44 -0000 papowell@astart.com has reassigned Bugzilla Automation 's request for maintainer-feedback to apache@FreeBSD.org: Bug 209585: www/apache24 dynamic loading of MySQL client library generates errors with mod_perl CGI scripts https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209585 --- Description --- Created attachment 170413 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D170413&action= =3Dedit SHAR file containing test scripts to reproduce problem Apache, MOD_PERL, and MySQL Modules Have Wierd Failure on FreeBSD 10.X But = Not on FreeBSD 9.3 Note: this problem was initially reported as 208370, but this problem appea= rs to be related to Apache and the dynamic loading of modules using MySQL and not to using the GD graphics library. FreeBSD 10.3: The Apache mod_perl + p5-GD + mod_dbd DBD + mysql appear to have a subtle but catastrophic interaction. IF a Perl GCI script to try to read a PNG file using the GD Perl module THEN reading the PNG file fails, you get an error and the apache log file contains: GD Error: gd-png: fatal libpng error: bad parameters to zlib GD Warning: gd-png error: setjmp returns error condition 2 Also, the same interaction occurs when you have Apache mod_perl + p5-GD + mod_auth_mysql The common element appears to be the dynamic loading of the MySQL client library. FreeBSD 9.3: The same combination shown above works fine. DETAILS: On FreeBSD 10.3: Apache 24 IF you load the mod_perl AND you have a Perl CGI script AND the perl Perl CGI script uses GD via the p5-gd (GD.pm) module AND you load the mod_dbd module AND you configure mod_dbd to use mysql i.e. - DBDriver mysql DBDParams "host=3D127.0.0.1 dbname=3Dapache user=3Dadmin pass=3Dpasswor= d" AND The Perl GCI script to try to read a PNG file THEN reading the PNG file fails, you get an error and the apache log file contains: GD Error: gd-png: fatal libpng error: bad parameters to zlib GD Warning: gd-png error: setjmp returns error condition 2 Just to make it more complicated, If you do not use mod_perl, or do not use the mysql DBDriver then everything works OK: MOD Perl, DB Driver Enabled LoadModule perl_module libexec/apache24/mod_perl.so DBDriver mysql
Did NOT Read Image MOD Perl, DB Driver Disabled LoadModule perl_module libexec/apache24/mod_perl.so #DBDriver mysql
Read Image No MOD Perl, DB Driver Enabled #LoadModule perl_module libexec/apache24/mod_perl.so DBDriver mysql
Read Image If you do not use mod_dbd, but use mod_auth_mysql, then it also fails: Using mod_auth_mysql #LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so #LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so #LoadModule dbd_module libexec/apache24/mod_dbd.so LoadModule perl_module libexec/apache24/mod_perl.so LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so DBDriver mysql
Did NOT Read Image To Reproduce this, attached are a set of scripts that will configure a Free= BSD installation. and run the tests which generated the fault indications. 1. Install the FreeBSD system. (I use VirtualBox and Virtual Machines) You will need the latests versions of the PORTS tree so you can skip installing the ports. You may want to do this for FreeBSD 10.3 and FreeBSD 9.3 2. Copy the step* and test103* files to the test system. 3. On the test system run the step* files: sh step1 # will modify /etc/rc.conf and install pkg and ports tree sh step2 # installs Apache, MySQL, GD, and support modules sh step3 # configures, compiles and installs devel/apr1 # you need to select MySQL support sh step4 # sets up a toy MySQL database for testing. See # Enabling_and_Administring_authn_dbd for an explanation sh step5 # modifies the Apache httpd.conf file and installs the # test103.cgi script and test103.png file. sh step6 # runs a set of tests on different Apache configurations. # This is done by commenting out critical lines in the # Apache httpd.conf file.