Resolved: Apache2::Upload v2.17 clobbering remaining CGI parameters + installation notes

"Randolf Richardson" <[email protected]> Thu, 11 Jan 2024 01:00:26 -0800
Newsgroups gmane.comp.apache.mod-perl
Organization Inter-Corporate Computer & Network Services
Message-ID <[email protected]>
	Thank you, Joe.  Upgrading from libapreq-2.17 (via apt) to 
libapreq-2.18 (via svn) resolved my problem -- everything is 
functioning as expected now, including HTML POST form handling with 
file upload inputs.

	I also attached my installation notes with the hopes that this may 
be helpful to anyone else installing this upgrade on Debian 12.4 (or 
another similar version of Linux).

	Thanks again for your fast and helpful response. :)

> You need to build and install libapreq2.so from svn sources.
> 
> Joe Schaefer, Ph.D.
> <https://sunstarsys.com/orion/features>
> Orion - The Enterprise Jamstack Wiki <https://sunstarsys.com/orion/features>
> <[email protected]>
> 954.253.3732 <//954.253.3732>
> 
> 
> 
> 
> On Wed, Jan 10, 2024 at 5:21PM Randolf Richardson <[email protected]>
> wrote:
> 
> >         I just recently upgraded my systems to Debian 12, and along with
> > it
> > came modperl_2.17.  Overall, this release is working very well,
> > except for one thing...
> >
> >         Handling CGI parameters in HTML forms that support file
> > attachments,
> > which results all CGI parameters after the file (whether a user
> > attaches a file or not makes no difference) are missing.
> >
> >         For any HTML input fields that I move before the file attachment
> > input element, then then their CGI parameters come through, while all
> > CGI parameters after the first file input field remain missing.
> >
> >         Any HTML forms that don't have any file input fiels are working
> > correctly.
> >
> >                 <form method=post enctype=multipart/form-data>
> >                         Text: <input name=one type=text>
> >                 <p>
> >                         File: <input name=file type=file>
> >                 <p>
> >                         More: <input name=more type=text>
> >                 <p>
> >                         <input type=submit value=Submit>
> >                 </form>
> >
> >         In my handling code, using $R->param('one') always functions as
> > expected, but $R->param('more') returns undef.
> >
> >         Has anyone else encountered this problem?  If so, did you find a
> > solution?  (If so, what got it working for you?)
> >
> >         Thanks in advance.
> >
> > Randolf Richardson, CNA - [email protected]
> > Inter-Corporate Computer & Network Services, Inc.
> > Beautiful British Columbia, Canada
> > https://www.inter-corporate.com/
> >
> >
> >
> 


Randolf Richardson, CNA - [email protected]
Inter-Corporate Computer & Network Services, Inc.
Beautiful British Columbia, Canada
https://www.inter-corporate.com/
apreq2-upgrade.txt (application/octet-stream, 1.2 KB)
# These instructions were written on Debian (Linux) to upgrade
# libapreq-2.17 to libapreq-2.18 on 2024-Jan-11.
#
# Operating System:  Debian 12.4
# Notes written by:  Randolf Richardson
# Author's eMail:    <[email protected]>
# Web site address:  https://www.inter-corporate.com/
# Web site address:  https://www.randolf.ca/
#
apt install subversion libextutils-xsbuilder-perl libtool-bin apache2-dev
svn checkout http://svn.apache.org/repos/asf/httpd/apreq/trunk/ httpd-apreq-2
cd httpd-apreq-2
./buildconf
autoconf

# Note:  Use "whereis apxs" to confirm path of apxs then update
#        the --with-apache2-apxs option accordingly:
#
perl Makefile.PL --with-apache2-apxs=/usr/bin/apxs
make
make test

# Note:  Backup the following directories prior to installing:
#        /usr/include/apache2/
#        /usr/include/apr-1.0/
#        /usr/include/apreq2/
#        /usr/lib/apache2/modules/
#
# Also:  If we don't remove the libapreq2-3 package, then the
#        Apache 2 httpd daemon will use the older version.  (Do
#        not use "apt purge" to remove this module.)
#
systemctl stop apache2
apt remove libapreq2-3
make install
a2enmod apreq2
systemctl start apache2