FreeBSD Bugzilla – Attachment 170413 Details for
Bug 209585
www/apache24 dynamic loading of MySQL client library generates errors with mod_perl CGI scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
SHAR file containing test scripts to reproduce problem
MOD_PERL_PROBLEM-2016-04-17.shar (text/plain), 86.27 KB, created by
papowell
on 2016-05-17 18:49:43 UTC
(
hide
)
Description:
SHAR file containing test scripts to reproduce problem
Filename:
MIME Type:
Creator:
papowell
Created:
2016-05-17 18:49:43 UTC
Size:
86.27 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># MOD_PERL_PROBLEM-2016-04-17 ># MOD_PERL_PROBLEM-2016-04-17/Enabling_and_Administring_authn_dbd ># MOD_PERL_PROBLEM-2016-04-17/step1 ># MOD_PERL_PROBLEM-2016-04-17/step2 ># MOD_PERL_PROBLEM-2016-04-17/step3 ># MOD_PERL_PROBLEM-2016-04-17/step4 ># MOD_PERL_PROBLEM-2016-04-17/step5 ># MOD_PERL_PROBLEM-2016-04-17/step6 ># MOD_PERL_PROBLEM-2016-04-17/test103.cgi ># MOD_PERL_PROBLEM-2016-04-17/step6.out ># MOD_PERL_PROBLEM-2016-04-17/README ># MOD_PERL_PROBLEM-2016-04-17/httpd-access.log ># MOD_PERL_PROBLEM-2016-04-17/httpd-error.log ># MOD_PERL_PROBLEM-2016-04-17/step6.out_102 ># MOD_PERL_PROBLEM-2016-04-17/step6.out_101 ># MOD_PERL_PROBLEM-2016-04-17/step6.out_103 ># MOD_PERL_PROBLEM-2016-04-17/step6.out_93 ># MOD_PERL_PROBLEM-2016-04-17/test103.png.uuencode ># MOD_PERL_PROBLEM-2016-04-17/Makefile ># >echo c - MOD_PERL_PROBLEM-2016-04-17 >mkdir -p MOD_PERL_PROBLEM-2016-04-17 > /dev/null 2>&1 >echo x - MOD_PERL_PROBLEM-2016-04-17/Enabling_and_Administring_authn_dbd >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/Enabling_and_Administring_authn_dbd << '8ef6d81b80e872f74eb780c57d3a44a4' >Xhttp://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/A_3270-Enabling-and-Administering-Apache%27s-HTTPD-authn-dbd-MySQL-authentication-through-PHP-on-Suse.html >X >XEnabling and Administering Apache's HTTPD authn_dbd MySQL authentication, through PHP, on Suse >XAID: 3270 >X >X StatusPublished >X >X9,100 points >X >X Byarober11 >X Posted on2010-06-16 at 18:27:56 >X >X Community Pick >X >XIntroduction >X >XAs you?re probably aware the HTTP protocol offers basic / weak >Xauthentication, which in combination with the relevant configuration >Xon your web server, provides the ability to password protect all >Xor part of your host. If you were not aware and before you get to >Xexcited, note the HTTP protocol offers little more than the ability >Xto request and transmit a user-id and password, in a non human >Xreadable manner, with every page request (the Authentication Basic >Xheader). So this approach shouldn?t be regarded as a secure solution >Xor efficient, but may be useful in providing a deterrent to the >Xuninitiated. >X >XAnyway I hope the following either helps you enable MySQL based >Xauthentication, on an Apache host, or possibly points you elsewhere >Xfor your authentication solution: >X >XOverview >XApache offers the ability, within its <DirectoryMatch>, <Directory >X>, <LocationMatch >, <Location > <FilesMatch > or <Files > blocks, >Xto restrict access to: >X >X? A Valid User [via ?Require valid-user ? or ?AuthDBDUserPWQuery xxxxxx?] >X? A Specific User [via ?Require user xxxx? or ?AuthDBDUserPWQuery xxxxxx?] >X? A Group of Users [via ?Require group yyyy? or ?AuthDBDUserPWQuery xxxxxx?] >X >XCredentials can be stored in local configuration (flat text), pseudo >Xdatabases (.dbm file) or a database of your choice {MySQL, Postgress, >Xldap (Including a Windows DC), NIS...} (see documentation here). >X >XAs the text configuration and .dbm file mechanisms are a pain to >Xmanage, for anything other than the most trivial of static set-ups, >Xnot to mention already being well documented, I?ll ignore them and >Xhave a quick look at using a DB solution. In particular, Mysql >Xthrough the Apache ?authn_dbd? module. Primarily as it's one of the >Xfew options not already detailed in the excellent article here. >X >XTo make life very slightly harder for myself I?ve used the vanilla >XApache build bundled with [Open]SuSE. Due to an Apache/GPL license >Xmixing restriction and SuSe?s sysconfig utility, which dynamically >Xre-generates configuration files, that will add a couple of steps >Xto the set-up. >X >XNote: The contents of SuSe /etc/apache2/sysconfig.d/* is re-built >Xevery time Apache starts, so any direct manual changes applied here >Xwill be lost. >X >XAssumptions: >XYou already have a working Apache HTTPD daemon running, on an OS >Xof your choice, as mentioned above I?ve used SuSE Linux. You already >Xhave a Mysql daemon up and running. You have root / administrator >Xaccess to both the OS and MySQL database. Your Apache modules >Xdirectory or your HTTPD binary includes the ?mod_dbd? and ?mod_authn_dbd? >Xmodules. You have the Apache Portable Runtime (APR) libraries, for >XMysql, installed or have access to the package. You have PHP >Xinstalled and configured. Your aware of the SuSE Yast tool. >X >XFreeBSD Setup: >X >X 1. install apache24 - pkg www/apache24 >X or 'cd /usr/ports/www/apache24; make install' >X 2. You will need the apr1 MySQL support: >X cd /usr/ports/devel/apr1 >X make config - select MySQL >X make install >X 3. edit /usr/local/etc/apache24/httpd.conf >X Add/comment out: >X LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X LoadModule dbd_module libexec/apache24/mod_dbd.so >X >X# The Set-up: >X# [STEP title="Check and install Dependent packages "] [/STEP] >X# Apache's DB driver module requires the APR library, so let's check >X# to see if it's installed: Open Yast, and select the Software -> >X# Package Manager, and search for "apr". If you don't have a: >X# libapr1-util1-dbd-mysql installed (or if you?re planning to use >X# Postgress ...-pgsql), install the package. While you're in the >X# package manager, also ensure you have the ?apache-utils? package. >X# >X# [STEP title="Load the necessary Apache modules"][/STEP] >X# >X# Ensure the ?dbd? and ?authn_dbd ? modules are loaded into Apache. >X# As mentioned before SuSE dynamically re-builds a sub-set of the >X# Apache configuration every time the server starts, this includes >X# the module loads. Still within Yast Open the: System ->"/etc/Sysconfig >X# Editor" and select: Network -> WWW -> Apache2 -> APACHE_MODULES. >X# >X# If not already present, append "dbd authb_dbd" to the line and hit OK. >X# Then in a console window, as root: >X# >X# # /etc/init.d/apache2 test >X# >X# Open in new window >X# Check for errors, and if OK: >X# >X# # /etc/init.d/apache2 restart >X# >X# Open in new window >X# Then: >X# >X# # grep dbd /etc/apache2/sysconfig.d/loadmodule.conf >X# >X# Open in new window >X# And you should see: >X# >X# LoadModule dbd_module /usr/lib64/apache2-prefork/mod_dbd.so >X# LoadModule authn_dbd_module /usr/lib64/apache2-prefork/mod_authn_dbd.so >X# >X# Open in new window >X# If you?re not using SuSe, check your httpd.conf for similar entries, and add if lacking. >X >X[STEP title="Create the Database"] >X[/STEP]To create a basic database schema, to store the credentials, return to your console Window and type: >X >Xpasswords script: >X++++++++ START ++++++++++ >X#!/bin/sh >X htpasswd -bns aTestUser aPassW0rd >X#aTestUser:{SHA}z2DI9nDATSY62mOI/GS4kz4VC10= >X >X htpasswd -bns aDeadUser anOthrPW >X#imTheAdmin:{SHA}2Vwc0dzvxZ8mblHnBQ3E5nWDxcc= >X >X htpasswd -bns imTheAdmin theAdminPasswd >X#imTheAdmin:{SHA}+LwfoB15Qfql+EP/WQp9/vzPN9s= >X >XaTestUser="{SHA}z2DI9nDATSY62mOI/GS4kz4VC10=" >X >XaDeadUser="{SHA}2Vwc0dzvxZ8mblHnBQ3E5nWDxcc=" >X >XimTheAdmin="{SHA}+LwfoB15Qfql+EP/WQp9/vzPN9s=" >X >X >Xmysql -v -v <<EOF; >X >XSHOW databases; >XCREATE database if not exists apache; >XSHOW databases; >XUSE apache; >XCREATE TABLE if not exists USRS (UsrID VARCHAR(16), Passwd VARCHAR(64), PRIMARY KEY (UsrID)); >XCREATE TABLE if not exists GRPS (Grp VARCHAR(16), PRIMARY KEY (Grp)); >XCREATE TABLE if not exists USRS_GRPS (Grp VARCHAR(16), UsrID VARCHAR(16), PRIMARY KEY (Grp, UsrID)); >XSHOW tables; >X# CREATE USER apacheBR@localhost IDENTIFIED BY 'some_pass'; >X GRANT SELECT >X ON apache.* >X TO apacheBR@localhost identified by 'some_pass'; >X# >X# CREATE USER maintScript@localhost IDENTIFIED BY 'other_pass'; >X GRANT SELECT,INSERT,UPDATE,DELETE >X ON apache.* >X TO maintScript@localhost identified by 'other_pass'; >XFLUSH PRIVILEGES; >X >XUSE apache; >XINSERT INTO USRS (UsrID, Passwd) VALUES ('aTestUser', '$aTestUser') on duplicate key update Passwd='$atestUser'; >XINSERT INTO USRS (UsrID, Passwd) VALUES ('aDeadUser', '$aDeadUser') on duplicate key update Passwd='$aDeadUser'; >XINSERT INTO USRS (UsrID, Passwd) VALUES ('imTheAdmin', '$imTheAdmin') on duplicate key update Passwd='$imTheAdmin'; >XINSERT IGNORE INTO GRPS (GRP) VALUES ('Administrator'); >XINSERT IGNORE INTO GRPS (GRP) VALUES ('ActiveUser'); >XINSERT IGNORE USRS_GRPS (GRP, UsrID) VALUES ('Administrator', 'imTheAdmin'); >XINSERT IGNORE USRS_GRPS (GRP, UsrID) VALUES ('ActiveUser', 'aTestUser'); >X >Xselect * from USRS; >Xselect * from GRPS; >XCOMMIT; >X >XEOF >Xexit 0 >X++++++++ END ++++++++++ >X >Xrmi_passwords script: >X++++++++ START ++++++++++ >X#!/bin/sh >Xmysql <<EOF >XSHOW databases; >XCREATE database if not exists rmi; >XSHOW databases; >X >Xcreate table if not exists rmi.permissions ( >X # OPTIONS NORESTART >X PRIMARY KEY entry (id) , # unique index >X id varchar(32) , # id (GENERATED) >X name varchar(64) default '' , # name or description >X perms text not null, #[entry] permissions >X new_password varchar(32) default '', # new password >X #+ in clear text >X password varchar(32) default '' # encrypted password (MONITORED) >X); >X >X >X# +----------+---------------+ >X# | id | password | >X# +----------+---------------+ >X# | papowell | mQJ7PJfNuiHZQ | >X# +----------+---------------+ >X# 1 row in set (0.00 sec) >XINSERT INTO rmi.permissions (id, password) VALUES ('papowell', 'mQJ7PJfNuiHZQ') >X on duplicate key update password='mQJ7PJfNuiHZQ'; >X >Xselect * from rmi.permissions; >XEOF >Xexit 0 >X++++++++ END ++++++++++ >X >X# # mysql -uroot -p >X# Passowrd: xxxxx #Replace with you own MySQL root password >X# SHOW databases; >X# CREATE database apache; >X# SHOW databases; >X# USE apache; >X# CREATE TABLE USRS (UsrID VARCHAR(16), Passwd VARCHAR(64), PRIMARY KEY (UsrID)); >X# CREATE TABLE GRPS (Grp VARCHAR(16), PRIMARY KEY (Grp)); >X# CREATE TABLE USRS_GRPS (Grp VARCHAR(16), UsrID VARCHAR(16), PRIMARY KEY (Grp, UsrID)); >X# SHOW tables; >X# CREATE USER apacheBR@localhost IDENTIFIED BY 'some_pass'; >X# GRANT SELECT >X# ON apache.* >X# TO apacheBR@localhost; >X# >X# CREATE USER maintScript@localhost IDENTIFIED BY 'other_pass'; >X# GRANT SELECT,INSERT,UPDATE,DELETE >X# ON apache.* >X# TO maintScript@localhost; >X# FLUSH PRIVILEGES; >X# QUIT >X# >X# Open in new window >X# 1. Populate the database >X# >X# It is time to test the MySQL User-ID?s and Database we've just created,. We'll do this by simply adding and selecting a few dummy values. For this test, we shall insert and query rows with the following keys: >X# USRS: >X# ? aTestUser >X# ? aDeadUser >X# ? imTheAdmin >X# GRPS: >X# ? Administrator >X# ? ActiveUser >X# USRS-GRPS: >X# ? Administrator + imTheAdmin >X# ? ActiveUser + aTestUser >X# Before we start pasting the values into INSERT statements, the USRS entries will require a Password that we will first need to encode (convert) into a suitable format. Several options are available for this and detailed here, but we?ll use just the suggested SHA scheme for this exercise. So a couple of: >X# >X# htpasswd2 ?bns <username> <password> >X# >X# Open in new window >X# calls should suffice e.g. >X# >X# # htpasswd2 -bns aTestUser aPassW0rd >X# aTestUser:{SHA}z2DI9nDATSY62mOI/GS4kz4VC10= >X# >X# # htpasswd2 -bns aDeadUser anOthrPW >X# imTheAdmin:{SHA}2Vwc0dzvxZ8mblHnBQ3E5nWDxcc= >X# >X# # htpasswd2 -bns imTheAdmin theAdminPasswd >X# imTheAdmin:{SHA}+LwfoB15Qfql+EP/WQp9/vzPN9s= >X# >X# Open in new window >X# Note: The SuSe supplied script is htpasswd2 not htpasswd >X# >X# Next, we need to plug the passwords above into some DDL and update the database, via our new maintScript user-id. At a command prompt type: >X# >X# # mysql -u maintScript -p'other_pass' >X# USE apache; >X# INSERT INTO USRS (UsrID, Passwd) VALUES ('aTestUser', '{SHA}z2DI9nDATSY62mOI/GS4kz4VC10='); >X# INSERT INTO USRS (UsrID, Passwd) VALUES ('aDeadUser', '{SHA}2Vwc0dzvxZ8mblHnBQ3E5nWDxcc='); >X# INSERT INTO USRS (UsrID, Passwd) VALUES ('imTheAdmin', '{SHA}+LwfoB15Qfql+EP/WQp9/vzPN9s='); >X# INSERT INTO GRPS (GRP) VALUES ('Administrator'); >X# INSERT INTO GRPS (GRP) VALUES ('ActiveUser'); >X# INSERT USRS_GRPS (GRP, UsrID) VALUES ('Administrator', 'imTheAdmin'); >X# INSERT USRS_GRPS (GRP, UsrID) VALUES ('ActiveUser', 'aTestUser'); >X# COMMIT; >X# QUIT; >X >XOpen in new window >XNext, test the read-only apache user-id by typing; >X >X# mysql -u apacheBR -p'some_pass'; >XUSE apache; >XSELECT * from USRS, USRS_GRPS where USRS.UsrID=USRS_GRPS.UsrID and GRP='Administrator'; >XQUIT: >X >XOpen in new window >X >X[STEP title="Prepare Test cases"] >X[/STEP]Let?s now create a few directories and files, that we can use to test the Authentication. At a command prompt type: >X >X# mkdir -p /srv/www/htdocs/RegisterdUser/ActiveMembers >X# mkdir -p /srv/www/htdocs/RegisterdUser/AdminOnly >X# echo "<HTML><BODY>I'm a Registered user!!!</BODY></HTML>" > /srv/www/htdocs/RegisterdUser/index.html >X# echo "<HTML><BODY>I'm an ACTIVE registered user!!!</BODY></HTML>" > /srv/www/htdocs/RegisterdUser/ActiveMembers/index.html >X# echo "<HTML><BODY>I'm the Admin :)</BODY></HTML>" > /srv/www/htdocs/RegisterdUser/AdminOnly/index.htm >X >XOpen in new window >XThen verify that you can get to each URL, via a browser e.g. >X >X ? http://127.0.0.1/RegisterdUser/index.html >X ? http://127.0.0.1/RegisterdUser/ActiveMembers/index.html >X ? http://127.0.0.1/RegisterdUser/AdminOnly/index.html >X >XNote: My internal / Play Apache Virtual host listens on 127.0.0.1 (localhost). I'm guessing your Apche host will probably not, so change the IP's in the example URL's, above / below, to suit. >X[STEP title="Update the Apache Configuration"] >X[/STEP]Next we need to backup the existing HTTPD configuration and add the necessary entries, to enable DBD authentication. My own test Host is called ?Playsite? and its specific configuration resides in /etc/apache2/conf.d /playsite.conf, but you can append the DBD entries below to your own existing *.conf (but not a .htaccess file). In a console window: >X >X# cd /etc/apache2/conf.d >X# cp playsite.conf playsite.conf.OLD >X >XOpen in new window >XNext, edit the file, in a text editor of your choice, and insert the following: >X >X<IfModule mod_dbd.c> >X DBDriver mysql >X DBDParams "host=127.0.0.1 dbname=apache user=apacheBR pass=some_pass" >X DBDMin 1 >X DBDKeep 8 >X DBDMax 20 >X DBDExptime 300 >X</IfModule> >X >XOpen in new window >XNote: the Following can be included in the same *.conf file, which I have done, or appended into a .htaccess file in the respective directory: >X >X<Directory "/srv/www/htdocs/RegisterdUser"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Registered User" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd FROM USRS WHERE UsrID = %s" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >X<Directory "/srv/www/htdocs/RegisterdUser/ActiveMembers"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Active users Only" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd from USRS, USRS_GRPS where USRS.UsrID=%s AND USRS.UsrID=USRS_GRPS.UsrID" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >X<Directory "/srv/www/htdocs/RegisterdUser/AdminOnly"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Admin users Only" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd from USRS, USRS_GRPS where USRS.UsrID=%s AND USRS.UsrID=USRS_GRPS.UsrID AND GRP='Administrator'" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >XOpen in new window >X >XOnce that is saved, it?s time to test the syntax and re-start apache, so in the console window and as root type: >X >X# /etc/init.d/apache2 test >X >XOpen in new window >XCheck for / resolve any errors then type: >X >X# /etc/init.d/apache2 restart >X >XOpen in new window >X[STEP title="Test the Authentication"][/STEP] >XNow in a browser of your choice, try to access the following URL: >X >X ? http://127.0.0.1/RegisterdUser/index.html >X >XYou should see a dialog box, asking you for your credentials. If you do enter: aDeadUser / anOthrPW >XElse check the Apache ErrorLog for mysql connection errors e.g. >X >X# tail /var/log/apache2/error_log >X... Internal error: DBD: Can't connect to mysql >X >XOpen in new window >XIf an error is present check you can connection to mysql using the credentials in the DBDParams entry e.g. >X >X# mysql -h 127.0.0.1 -u apacheBR -psome_pass >X >XOpen in new window >X7.1) Once logged in as ?aDeadUser? attempt to access the following URL?s: >X ? http://127.0.0.1/RegisterdUser/ActiveMembers/index.html >X ? http://127.0.0.1/RegisterdUser/AdminOnly/index.html >XYou should be prompted for your credentials again and see the following appear in the ErrorLog: >X >X[Tue Jun 15 16:11:45 2010] [error] [client 127.0.0.1] user aDeadUser not found: /RegisterdUser/ActiveMembers/index.html >X[Tue Jun 15 16:11:51 2010] [error] [client 127.0.0.1] user aDeadUser not found: /RegisterdUser/ActiveMembers/index.html >X >XOpen in new window >XClose the Browser, re-open it and browse back to: >X ? http://127.0.0.1/RegisterdUser/index.html >XThis time log in as: aTestUser /aPassW0rd >XYou should now be able to access: >X ? http://127.0.0.1/RegisterdUser/ActiveMembers/index.html >Xbut not: >X ? http://127.0.0.1/RegisterdUser/AdminOnly/index.html >XAgain you?ll see the following entry in the ErrorLog: >X >X[Tue Jun 15 16:10:14 2010] [error] [client 127.0.0.1] user aTestUser not found: /RegisterdUser/AdminOnly/index.html >X >XOpen in new window >XFinally close and re-open the browser and browse back to the first URL and log in as: >X imTheAdmin / theAdminPasswd >XYou should now be able to browse to all 3 URL?s in turn. >X[STEP title="Create a Mechanism to maintain the Database"] >X[/STEP]We now have a working, MySQL based, authentication mechanism, but as this solution lacks the command line utilities bundled with Apache to maintain text or .dbm based files, or the existing command line and GUI tools to maintain a NIS or LDAP (including Windows DC) based schemas we?ll need a mechanism to maintain the database, other than via mysql DDL. So I?ll briefly provide a few skeleton PHP examples to handle: >X >X ? User Registration ? Accessible by anyone >X ? Password Change ? Accessible to the User. >X ? User / Group membership ? Accessible to the Administrators only >X ? Group Maintenance ? Accessible to the Administrators only >X ? User Reporting and Maintenance ? Accessible to the Administrators only >X >XI apologize in advance for the following examples, they're only designed to provide a quick, dirty and not too cryptic hint of what can be achieved in a few lines. >X >XWe'll start by creating a MySQL access function library, this will include the common functionality needed to connect to and manipulate our database. We'll later copy (included) this library in all our subsequent examples. In a editor of your choice create the file: >X /srv/www/htdocs/RegisterdUser/AdminOnly/dbConn.inc.php as: >X >X<?php >X// Connect to the Apache Authentication DB >X$dbhost="localhost"; >X$username="maintScript"; >X$password="other_pass"; >X$database="apache"; >X >Xmysql_connect($dbhost,$username,$password) or die(mysql_error()); >Xmysql_select_db($database) or die( "Unable to select database: $database".mysql_error()); >X >X// ---------------------------- >X// functions >X// ---------------------------- >X >X// Insert the New User into the DB >Xfunction addUser ($userID, $passWrd){ >X $sql = "INSERT INTO USRS (UsrID, Passwd) VALUES ('$userID','{SHA}".base64_encode(sha1($passWrd, TRUE))."')"; >X $result = mysql_query($sql) or die("<BR><P>Error:User Creation failed -".mysql_error()."</P>"); >X echo "<BR><P>User created:<B>$userID</B></P> "; >X return $result; >X} >X// update the Users Password >Xfunction changePass ($userID, $passWrd){ >X $sql="UPDATE USRS set Passwd='{SHA}".base64_encode(sha1($passWrd, TRUE))."' WHERE UsrID='$userID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:Update failed -".mysql_error()."</P>"); >X echo "<BR><P>Password changed for: <B>$userID</B></P>"; >X return $result; >X} >X// Add a new Group >Xfunction addGroup ($grpID){ >X $sql = "INSERT INTO GRPS (GRP) VALUES ('$grpID')"; >X $result = mysql_query($sql) or die("<BR><P>Error:Group ADD failed -$sql:".mysql_error()."</P>"); >X return $result; >X} >X// Delete a new Group >Xfunction deleteGroup ($grpID){ >X $sql = "DELETE FROM USRS_GRPS WHERE Grp='$grpID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:USRS_GRPS DELETE failed -".mysql_error()."</P>"); >X $sql = "DELETE FROM GRPS WHERE Grp='$grpID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:Group DELETE failed -".mysql_error()."</P>"); >X return $result; >X} >X// Add a User to a Group >Xfunction joinGroup ($userID, $grpID){ >X $sql = "INSERT INTO USRS_GRPS (UsrID, Grp) VALUES ('$userID','$grpID')"; >X $result = mysql_query($sql) or die("<BR><P>Error:Group join failed -".mysql_error()."</P>"); >X return $result; >X} >X// Remove a User from a Group >Xfunction leaveGroup ($userID, $grpID){ >X $sql = "DELETE FROM USRS_GRPS WHERE UsrID='$userID' AND Grp= '$grpID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:Group exit failed -".mysql_error()."</P>"); >X return $result; >X} >X// Delete a user from the DB >Xfunction deleteUser ($userID){ >X $sql = " DELETE FROM USRS_GRPS where UsrID='$userID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:USRS_GRPS Deletion failed -".mysql_error()."</P>"); >X $sql = "DELETE FROM USRS where UsrID='$userID'"; >X $result = mysql_query($sql) or die("<BR><P>Error:User Deletion failed -".mysql_error()."</P>"); >X return $result; >X} >X?> >X >XModified httpd.conf file >X+++++++++++++ START +++++++++ >X# >X# This is the main Apache HTTP server configuration file. It contains the >X# configuration directives that give the server its instructions. >X# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. >X# In particular, see >X# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> >X# for a discussion of each configuration directive. >X# >X# Do NOT simply read the instructions in here without understanding >X# what they do. They're here only as hints or reminders. If you are unsure >X# consult the online docs. You have been warned. >X# >X# Configuration and logfile names: If the filenames you specify for many >X# of the server's control files begin with "/" (or "drive:/" for Win32), the >X# server will use that explicit path. If the filenames do *not* begin >X# with "/", the value of ServerRoot is prepended -- so "logs/access_log" >X# with ServerRoot set to "/usr/local/apache2" will be interpreted by the >X# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" >X# will be interpreted as '/logs/access_log'. >X >X# >X# ServerRoot: The top of the directory tree under which the server's >X# configuration, error, and log files are kept. >X# >X# Do not add a slash at the end of the directory path. If you point >X# ServerRoot at a non-local disk, be sure to specify a local disk on the >X# Mutex directive, if file-based mutexes are used. If you wish to share the >X# same ServerRoot for multiple httpd daemons, you will need to change at >X# least PidFile. >X# >XServerRoot "/usr/local" >X >X# >X# Mutex: Allows you to set the mutex mechanism and mutex file directory >X# for individual mutexes, or change the global defaults >X# >X# Uncomment and change the directory if mutexes are file-based and the default >X# mutex file directory is not on a local disk or is not appropriate for some >X# other reason. >X# >X# Mutex default:/var/run >X >X# >X# Listen: Allows you to bind Apache to specific IP addresses and/or >X# ports, instead of the default. See also the <VirtualHost> >X# directive. >X# >X# Change this to Listen on specific IP addresses as shown below to >X# prevent Apache from glomming onto all bound IP addresses. >X# >X#Listen 12.34.56.78:80 >XListen 80 >X >X# >X# Dynamic Shared Object (DSO) Support >X# >X# To be able to use the functionality of a module which was built as a DSO you >X# have to place corresponding `LoadModule' lines at this location so the >X# directives contained in it are actually available _before_ they are used. >X# Statically compiled modules (those listed by `httpd -l') do not need >X# to be loaded here. >X# >X# Example: >X# LoadModule foo_module modules/mod_foo.so >X# >XLoadModule authn_file_module libexec/apache24/mod_authn_file.so >XLoadModule authn_dbm_module libexec/apache24/mod_authn_dbm.so >X#LoadModule authn_anon_module libexec/apache24/mod_authn_anon.so >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so >XLoadModule authn_core_module libexec/apache24/mod_authn_core.so >XLoadModule authz_host_module libexec/apache24/mod_authz_host.so >XLoadModule authz_groupfile_module libexec/apache24/mod_authz_groupfile.so >XLoadModule authz_user_module libexec/apache24/mod_authz_user.so >XLoadModule authz_dbm_module libexec/apache24/mod_authz_dbm.so >X#LoadModule authz_owner_module libexec/apache24/mod_authz_owner.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule authz_core_module libexec/apache24/mod_authz_core.so >XLoadModule access_compat_module libexec/apache24/mod_access_compat.so >XLoadModule auth_basic_module libexec/apache24/mod_auth_basic.so >X#LoadModule auth_form_module libexec/apache24/mod_auth_form.so >X#LoadModule auth_digest_module libexec/apache24/mod_auth_digest.so >X#LoadModule allowmethods_module libexec/apache24/mod_allowmethods.so >X#LoadModule file_cache_module libexec/apache24/mod_file_cache.so >X#LoadModule cache_module libexec/apache24/mod_cache.so >X#LoadModule cache_disk_module libexec/apache24/mod_cache_disk.so >X#LoadModule cache_socache_module libexec/apache24/mod_cache_socache.so >X#LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so >XLoadModule socache_dbm_module libexec/apache24/mod_socache_dbm.so >X#LoadModule socache_memcache_module libexec/apache24/mod_socache_memcache.so >X#LoadModule macro_module libexec/apache24/mod_macro.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >X#LoadModule dumpio_module libexec/apache24/mod_dumpio.so >X#LoadModule buffer_module libexec/apache24/mod_buffer.so >X#LoadModule ratelimit_module libexec/apache24/mod_ratelimit.so >XLoadModule reqtimeout_module libexec/apache24/mod_reqtimeout.so >X#LoadModule ext_filter_module libexec/apache24/mod_ext_filter.so >X#LoadModule request_module libexec/apache24/mod_request.so >X#LoadModule include_module libexec/apache24/mod_include.so >XLoadModule filter_module libexec/apache24/mod_filter.so >X#LoadModule substitute_module libexec/apache24/mod_substitute.so >X#LoadModule sed_module libexec/apache24/mod_sed.so >X#LoadModule deflate_module libexec/apache24/mod_deflate.so >XLoadModule mime_module libexec/apache24/mod_mime.so >XLoadModule log_config_module libexec/apache24/mod_log_config.so >X#LoadModule log_debug_module libexec/apache24/mod_log_debug.so >X#LoadModule logio_module libexec/apache24/mod_logio.so >XLoadModule env_module libexec/apache24/mod_env.so >X#LoadModule mime_magic_module libexec/apache24/mod_mime_magic.so >X#LoadModule cern_meta_module libexec/apache24/mod_cern_meta.so >X#LoadModule expires_module libexec/apache24/mod_expires.so >XLoadModule headers_module libexec/apache24/mod_headers.so >X#LoadModule unique_id_module libexec/apache24/mod_unique_id.so >XLoadModule setenvif_module libexec/apache24/mod_setenvif.so >XLoadModule version_module libexec/apache24/mod_version.so >X#LoadModule remoteip_module libexec/apache24/mod_remoteip.so >X#LoadModule proxy_module libexec/apache24/mod_proxy.so >X#LoadModule proxy_connect_module libexec/apache24/mod_proxy_connect.so >X#LoadModule proxy_ftp_module libexec/apache24/mod_proxy_ftp.so >X#LoadModule proxy_http_module libexec/apache24/mod_proxy_http.so >X#LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so >X#LoadModule proxy_scgi_module libexec/apache24/mod_proxy_scgi.so >X#LoadModule proxy_wstunnel_module libexec/apache24/mod_proxy_wstunnel.so >X#LoadModule proxy_ajp_module libexec/apache24/mod_proxy_ajp.so >X#LoadModule proxy_balancer_module libexec/apache24/mod_proxy_balancer.so >X#LoadModule proxy_express_module libexec/apache24/mod_proxy_express.so >X#LoadModule session_module libexec/apache24/mod_session.so >X#LoadModule session_cookie_module libexec/apache24/mod_session_cookie.so >X#LoadModule session_crypto_module libexec/apache24/mod_session_crypto.so >X#LoadModule ssl_module libexec/apache24/mod_ssl.so >X#LoadModule lbmethod_byrequests_module libexec/apache24/mod_lbmethod_byrequests.so >X#LoadModule lbmethod_bytraffic_module libexec/apache24/mod_lbmethod_bytraffic.so >X#LoadModule lbmethod_bybusyness_module libexec/apache24/mod_lbmethod_bybusyness.so >XLoadModule unixd_module libexec/apache24/mod_unixd.so >X#LoadModule dav_module libexec/apache24/mod_dav.so >XLoadModule status_module libexec/apache24/mod_status.so >XLoadModule autoindex_module libexec/apache24/mod_autoindex.so >X#LoadModule asis_module libexec/apache24/mod_asis.so >X#LoadModule info_module libexec/apache24/mod_info.so >X#LoadModule cgi_module libexec/apache24/mod_cgi.so >X#LoadModule cgid_module libexec/apache24/mod_cgid.so >X#LoadModule dav_fs_module libexec/apache24/mod_dav_fs.so >X#LoadModule vhost_alias_module libexec/apache24/mod_vhost_alias.so >X#LoadModule negotiation_module libexec/apache24/mod_negotiation.so >XLoadModule dir_module libexec/apache24/mod_dir.so >X#LoadModule imagemap_module libexec/apache24/mod_imagemap.so >X#LoadModule actions_module libexec/apache24/mod_actions.so >X#LoadModule speling_module libexec/apache24/mod_speling.so >X#LoadModule userdir_module libexec/apache24/mod_userdir.so >XLoadModule alias_module libexec/apache24/mod_alias.so >X#LoadModule rewrite_module libexec/apache24/mod_rewrite.so >X >X# Third party modules >XIncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf >X >X<IfModule unixd_module> >X# >X# If you wish httpd to run as a different user or group, you must run >X# httpd as root initially and it will switch. >X# >X# User/Group: The name (or #number) of the user/group to run httpd as. >X# It is usually good practice to create a dedicated user and group for >X# running httpd, as with most system services. >X# >XUser www >XGroup www >X >X</IfModule> >X >X# 'Main' server configuration >X# >X# The directives in this section set up the values used by the 'main' >X# server, which responds to any requests that aren't handled by a >X# <VirtualHost> definition. These values also provide defaults for >X# any <VirtualHost> containers you may define later in the file. >X# >X# All of these directives may appear inside <VirtualHost> containers, >X# in which case these default settings will be overridden for the >X# virtual host being defined. >X# >X >X# >X# ServerAdmin: Your address, where problems with the server should be >X# e-mailed. This address appears on some server-generated pages, such >X# as error documents. e.g. admin@your-domain.com >X# >XServerAdmin you@example.com >X >X# >X# ServerName gives the name and port that the server uses to identify itself. >X# This can often be determined automatically, but we recommend you specify >X# it explicitly to prevent problems during startup. >X# >X# If your host doesn't have a registered DNS name, enter its IP address here. >X# >X#ServerName www.example.com:80 >X >X# >X# Deny access to the entirety of your server's filesystem. You must >X# explicitly permit access to web content directories in other >X# <Directory> blocks below. >X# >X<Directory /> >X AllowOverride none >X Require all denied >X</Directory> >X >X# >X# Note that from this point forward you must specifically allow >X# particular features to be enabled - so if something's not working as >X# you might expect, make sure that you have specifically enabled it >X# below. >X# >X >X# >X# DocumentRoot: The directory out of which you will serve your >X# documents. By default, all requests are taken from this directory, but >X# symbolic links and aliases may be used to point to other locations. >X# >XDocumentRoot "/usr/local/www/apache24/data" >X<Directory "/usr/local/www/apache24/data"> >X # >X # Possible values for the Options directive are "None", "All", >X # or any combination of: >X # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews >X # >X # Note that "MultiViews" must be named *explicitly* --- "Options All" >X # doesn't give it to you. >X # >X # The Options directive is both complicated and important. Please see >X # http://httpd.apache.org/docs/2.4/mod/core.html#options >X # for more information. >X # >X Options Indexes FollowSymLinks >X >X # >X # AllowOverride controls what directives may be placed in .htaccess files. >X # It can be "All", "None", or any combination of the keywords: >X # AllowOverride FileInfo AuthConfig Limit >X # >X AllowOverride None >X >X # >X # Controls who can get stuff from this server. >X # >X Require all granted >X</Directory> >X >X# >X# DirectoryIndex: sets the file that Apache will serve if a directory >X# is requested. >X# >X<IfModule dir_module> >X DirectoryIndex index.html >X</IfModule> >X >X# >X# The following lines prevent .htaccess and .htpasswd files from being >X# viewed by Web clients. >X# >X<Files ".ht*"> >X Require all denied >X</Files> >X >X# >X# ErrorLog: The location of the error log file. >X# If you do not specify an ErrorLog directive within a <VirtualHost> >X# container, error messages relating to that virtual host will be >X# logged here. If you *do* define an error logfile for a <VirtualHost> >X# container, that host's errors will be logged there and not here. >X# >XErrorLog "/var/log/httpd-error.log" >X >X# >X# LogLevel: Control the number of messages logged to the error_log. >X# Possible values include: debug, info, notice, warn, error, crit, >X# alert, emerg. >X# >XLogLevel warn >X >X<IfModule log_config_module> >X # >X # The following directives define some format nicknames for use with >X # a CustomLog directive (see below). >X # >X LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined >X LogFormat "%h %l %u %t \"%r\" %>s %b" common >X >X <IfModule logio_module> >X # You need to enable mod_logio.c to use %I and %O >X LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio >X </IfModule> >X >X # >X # The location and format of the access logfile (Common Logfile Format). >X # If you do not define any access logfiles within a <VirtualHost> >X # container, they will be logged here. Contrariwise, if you *do* >X # define per-<VirtualHost> access logfiles, transactions will be >X # logged therein and *not* in this file. >X # >X CustomLog "/var/log/httpd-access.log" common >X >X # >X # If you prefer a logfile with access, agent, and referer information >X # (Combined Logfile Format) you can use the following directive. >X # >X #CustomLog "/var/log/httpd-access.log" combined >X</IfModule> >X >X<IfModule alias_module> >X # >X # Redirect: Allows you to tell clients about documents that used to >X # exist in your server's namespace, but do not anymore. The client >X # will make a new request for the document at its new location. >X # Example: >X # Redirect permanent /foo http://www.example.com/bar >X >X # >X # Alias: Maps web paths into filesystem paths and is used to >X # access content that does not live under the DocumentRoot. >X # Example: >X # Alias /webpath /full/filesystem/path >X # >X # If you include a trailing / on /webpath then the server will >X # require it to be present in the URL. You will also likely >X # need to provide a <Directory> section to allow access to >X # the filesystem path. >X >X # >X # ScriptAlias: This controls which directories contain server scripts. >X # ScriptAliases are essentially the same as Aliases, except that >X # documents in the target directory are treated as applications and >X # run by the server when requested rather than as documents sent to the >X # client. The same rules about trailing "/" apply to ScriptAlias >X # directives as to Alias. >X # >X ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin/" >X >X</IfModule> >X >X<IfModule cgid_module> >X # >X # ScriptSock: On threaded servers, designate the path to the UNIX >X # socket used to communicate with the CGI daemon of mod_cgid. >X # >X #Scriptsock cgisock >X</IfModule> >X >X# >X# "/usr/local/www/apache24/cgi-bin" should be changed to whatever your ScriptAliased >X# CGI directory exists, if you have that configured. >X# >X<Directory "/usr/local/www/apache24/cgi-bin"> >X AllowOverride None >X Options None >X Require all granted >X</Directory> >X >X<IfModule mime_module> >X # >X # TypesConfig points to the file containing the list of mappings from >X # filename extension to MIME-type. >X # >X TypesConfig etc/apache24/mime.types >X >X # >X # AddType allows you to add to or override the MIME configuration >X # file specified in TypesConfig for specific file types. >X # >X #AddType application/x-gzip .tgz >X # >X # AddEncoding allows you to have certain browsers uncompress >X # information on the fly. Note: Not all browsers support this. >X # >X #AddEncoding x-compress .Z >X #AddEncoding x-gzip .gz .tgz >X # >X # If the AddEncoding directives above are commented-out, then you >X # probably should define those extensions to indicate media types: >X # >X AddType application/x-compress .Z >X AddType application/x-gzip .gz .tgz >X >X # >X # AddHandler allows you to map certain file extensions to "handlers": >X # actions unrelated to filetype. These can be either built into the server >X # or added with the Action directive (see below) >X # >X # To use CGI scripts outside of ScriptAliased directories: >X # (You will also need to add "ExecCGI" to the "Options" directive.) >X # >X #AddHandler cgi-script .cgi >X >X # For type maps (negotiated resources): >X #AddHandler type-map var >X >X # >X # Filters allow you to process content before it is sent to the client. >X # >X # To parse .shtml files for server-side includes (SSI): >X # (You will also need to add "Includes" to the "Options" directive.) >X # >X #AddType text/html .shtml >X #AddOutputFilter INCLUDES .shtml >X</IfModule> >X >X# >X# The mod_mime_magic module allows the server to use various hints from the >X# contents of the file itself to determine its type. The MIMEMagicFile >X# directive tells the module where the hint definitions are located. >X# >X#MIMEMagicFile etc/apache24/magic >X >X# >X# Customizable error responses come in three flavors: >X# 1) plain text 2) local redirects 3) external redirects >X# >X# Some examples: >X#ErrorDocument 500 "The server made a boo boo." >X#ErrorDocument 404 /missing.html >X#ErrorDocument 404 "/cgi-bin/missing_handler.pl" >X#ErrorDocument 402 http://www.example.com/subscription_info.html >X# >X >X# >X# MaxRanges: Maximum number of Ranges in a request before >X# returning the entire resource, or one of the special >X# values 'default', 'none' or 'unlimited'. >X# Default setting is to accept 200 Ranges. >X#MaxRanges unlimited >X >X# >X# EnableMMAP and EnableSendfile: On systems that support it, >X# memory-mapping or the sendfile syscall may be used to deliver >X# files. This usually improves server performance, but must >X# be turned off when serving from networked-mounted >X# filesystems or if support for these functions is otherwise >X# broken on your system. >X# Defaults: EnableMMAP On, EnableSendfile Off >X# >X#EnableMMAP off >X#EnableSendfile on >X >X# Supplemental configuration >X# >X# The configuration files in the etc/apache24/extra/ directory can be >X# included to add extra features or to modify the default configuration of >X# the server, or you may simply copy their contents here and change as >X# necessary. >X >X# Server-pool management (MPM specific) >X#Include etc/apache24/extra/httpd-mpm.conf >X >X# Multi-language error messages >X#Include etc/apache24/extra/httpd-multilang-errordoc.conf >X >X# Fancy directory listings >X#Include etc/apache24/extra/httpd-autoindex.conf >X >X# Language settings >X#Include etc/apache24/extra/httpd-languages.conf >X >X# User home directories >X#Include etc/apache24/extra/httpd-userdir.conf >X >X# Real-time info on requests and configuration >X#Include etc/apache24/extra/httpd-info.conf >X >X# Virtual hosts >X#Include etc/apache24/extra/httpd-vhosts.conf >X >X# Local access to the Apache HTTP Server Manual >X#Include etc/apache24/extra/httpd-manual.conf >X >X# Distributed authoring and versioning (WebDAV) >X#Include etc/apache24/extra/httpd-dav.conf >X >X# Various default settings >X#Include etc/apache24/extra/httpd-default.conf >X >X# Configure mod_proxy_html to understand HTML4/XHTML1 >X<IfModule proxy_html_module> >XInclude etc/apache24/extra/proxy-html.conf >X</IfModule> >X >X# Secure (SSL/TLS) connections >X#Include etc/apache24/extra/httpd-ssl.conf >X# >X# Note: The following must must be present to support >X# starting without SSL on platforms with no /dev/random equivalent >X# but a statically compiled-in mod_ssl. >X# >X<IfModule ssl_module> >XSSLRandomSeed startup builtin >XSSLRandomSeed connect builtin >X</IfModule> >X# >X# uncomment out the below to deal with user agents that deliberately >X# violate open standards by misusing DNT (DNT *must* be a specific >X# end-user choice) >X# >X#<IfModule setenvif_module> >X#BrowserMatch "MSIE 10.0;" bad_DNT >X#</IfModule> >X#<IfModule headers_module> >X#RequestHeader unset DNT env=bad_DNT >X#</IfModule> >X >XInclude etc/apache24/Includes/*.conf >X >X# >X# >X# START_FAST(1) User Contributed Perl Documentation START_FAST(1) >X# >X# NAME >X# Getting Your Feet Wet with mod_perl >X# >X# Description >X# This chapter gives you the bare minimum information to get you started >X# with mod_perl 2.0. For most people it's sufficient to get going. >X# >X# Installation >X# See the Apache documentatio on how to install Apache >X# See the mod_perl documentatio on how to install mod_perl >X# >X# On FreeBSD: >X# pkg install www/apache22 OR pkg install www/apache24 >X# pkg install www/mod_perl2 >X# >X# >X# Enable mod_perl built as DSO, by adding to httpd.conf: >X# >X# LoadModule perl_module libexec/apache24/mod_perl.so >X# >X# There are many other configuration options which you can find in the >X# configuration manual. >X# Set the ServerRoot and DocumentRoot to the appropriate directories >X# Set the ErrorLog and CustomLog to the appropriate log directories >X# /var/log/httpd-access.log >X# /var/log/httpd-error.log >X# or >X# /var/log/apache/httpd-access.log >X# /var/log/apache/httpd-error.log >X# >X# Server Launch and Shutdown >X# Apache is normally launched with "apachectl": >X# >X# apachectl start >X# >X# and shut down with: >X# >X# apachectl stop >X# >X# Check /var/log/httpd.error_log to see that the server has >X# started and it's a right one. It should say something similar to: >X# >X# [Fri Jul 22 09:39:55 2005] [notice] Apache/2.0.55-dev (Unix) >X# mod_ssl/2.0.55-dev OpenSSL/0.9.7e DAV/2 mod_perl/2.0.2-dev >X# Perl/v5.8.7 configured -- resuming normal operations >X# >X# Registry Scripts >X# To enable registry scripts add to httpd.conf: >X# >X# Alias /perl/ /home/httpd/httpd-2.0/perl/ >X# <Location /perl/> >X# SetHandler perl-script >X# PerlResponseHandler ModPerl::Registry >X# PerlOptions +ParseHeaders >X# Options +ExecCGI >X# </Location> >X# >X# and now assuming that we have the following script: >X# >X# #!/usr/bin/perl >X# print "Content-type: text/plain\n\n"; >X# print "mod_perl 2.0 rocks!\n"; >X# >X# saved in /home/httpd/httpd-2.0/perl/rock.pl. Make the script executable >X# and readable by everybody: >X# >X# % chmod a+rx /home/httpd/httpd-2.0/perl/rock.pl >X# >X# Of course the path to the script should be readable by the server too. >X# In the real world you probably want to have a tighter permissions, but >X# for the purpose of testing that things are working this is just fine. >X# >X# Now restart the server and issue a request to http://local- >X# host/perl/rock.pl and you should get the response: >X# >X# mod_perl 2.0 rocks! >X# >X# If that didn't work check the error_log file. >X# >X# For more information on the registry scripts refer to the "Mod- >X# Perl::Registry" manapage. (XXX: on day there will a tutorial on reg- >X# istry, should port it from 1.0's docs). >X# >X# Handler Modules >X# Finally check that you can run mod_perl handlers. Let's write a >X# response handler similar to the registry script from the previous sec- >X# tion: >X# >X# #file:MyApache2/Rocks.pm >X# #---------------------- >X# package MyApache2::Rocks; >X# >X# use strict; >X# use warnings; >X# >X# use Apache2::RequestRec (); >X# use Apache2::RequestIO (); >X# >X# use Apache2::Const -compile => qw(OK); >X# >X# sub handler { >X# my $r = shift; >X# >X# $r->content_type('text/plain'); >X# print "mod_perl 2.0 rocks!\n"; >X# >X# return Apache2::Const::OK; >X# } >X# 1; >X# >X# Save the code in the file MyApache2/Rocks.pm, somewhere where mod_perl >X# can find it. For example let's put it under >X# /home/httpd/httpd-2.0/perl/MyApache2/Rocks.pm, and we tell mod_perl >X# that /home/httpd/httpd-2.0/perl/ is in @INC, via a startup file which >X# includes just: >X# >X# use lib qw(/home/httpd/httpd-2.0/perl); >X# 1; >X# >X# and loaded from httpd.conf: >X# >X# PerlRequire /home/httpd/httpd-2.0/perl/startup.pl >X# >X# Now we can configure our module in httpd.conf: >X# >X# <Location /rocks> >X# SetHandler perl-script >X# PerlResponseHandler MyApache2::Rocks >X# </Location> >X# >X# Now restart the server and issue a request to http://localhost/rocks >X# and you should get the response: >X# >X# mod_perl 2.0 rocks! >X# >X# If that didn't work check the error_log file. >X# >X# Troubleshooting >X# If after reading the complete installation and configuration chapters >X# you are still having problems, take a look at the troubleshooting sec- >X# tions. If the problem persist, please report them using the following >X# guidelines. >X# >X# Maintainers >X# Maintainer is the person(s) you should contact with updates, correc- >X# tions and patches. >X# >X# o Stas Bekman <stas (at) stason.org> >X# >X# Authors >X# o Stas Bekman <stas (at) stason.org> >X# >X# Only the major authors are listed above. For contributors see the >X# Changes file. >X# >X# >X# >X# perl v5.8.6 2005-10-20 START_FAST(1) >X# >X## Apache::Registry, Apache::PerlRun and Friends >X## >X## At this moment ModPerl::Registry (and others) doesn't chdir() >X## into the script's dir like Apache::Registry does, because >X## chdir() affects the whole process under threads. This should be >X## resolved by the time mod_perl 2.0 is released. >X## >X## Meanwhile if you are using a prefork MPM and you have to rely on >X## mod_perl performing chdir to the script's directory, you can use the >X## ModPerl::RegistryPrefork handler: >X## >X## Alias /perl /path/to/perl/scripts >X## <Location /perl> >X## SetHandler perl-script >X## PerlResponseHandler ModPerl::RegistryPrefork >X## Options +ExecCGI >X## PerlOptions +ParseHeaders >X## </Location> >X# >X# Full Fledged Perl Support >X# for Apache2 and mod_perl2 >X# >X# Let your startup2.pl file be: >X# #!/usr/local/bin/perl >X# # set up the path >X# use lib qw( /usr/local/www/perl ); >X# >X# # common modules >X# use ModPerl::Registry(); >X# use CGI; >X# .... and more modules >X# # do some of the basic initialization to force stuff to be >X# # done only once and then cached >X# GDTraffic_init( '/usr/local/www/Map', 0 ); >X# 1; >X# >X# httpd.conf file: >X# >X# <IfModule mod_perl.c> >X# PerlTaintCheck On >X# PerlOptions -ParseHeaders >X# PerlPostConfigRequire /rmi/perl/startup2.pl >X# </IfModule> >X# >X# <Directory "/rmi/htdocs/"> >X# <IfModule mod_perl.c> >X# <Files ~ "\.cgi$"> >X# SetHandler perl-script >X# PerlHandler ModPerl::RegistryPrefork >X# </Files> >X# </IfModule> >X# </Directory> >X# >X# for MySQL based authentication >X >X# >X# StartServers: number of server processes to start >X# MinSpareServers: minimum number of server processes which are kept spare >X# MaxSpareServers: maximum number of server processes which are kept spare >X# MaxClients: maximum number of server processes allowed to start >X# MaxRequestsPerChild: maximum number of requests a server process serves >X# >X# A single control process is responsible for launching child processes >X# which listen for connections and serve them when they arrive. Apache >X# always tries to maintain several spare or idle server processes, >X# which stand ready to serve incoming requests. In this way, clients >X# do not need to wait for a new child processes to be forked before >X# their requests can be served. >X# >X# The StartServers, MinSpareServers, MaxSpareServers, and MaxClients >X# regulate how the parent process creates children to serve requests. >X# In general, Apache is very self-regulating, so most sites do not >X# need to adjust these directives from their default values. Sites >X# which need to serve more than 256 simultaneous requests may need >X# to increase MaxClients, while sites with limited memory may need >X# to decrease MaxClients to keep the server from thrashing (swapping >X# memory to disk and back). More information about tuning process >X# creation is provided in the performance hints documentation. >X# >X# While the parent process is usually started as root under Unix in >X# order to bind to port 80, the child processes are launched by Apache >X# as a less-privileged user. The User and Group directives are used >X# to set the privileges of the Apache child processes. The child >X# processes must be able to read all the content that will be served, >X# but should have as few privileges beyond that as possible. >X# >X# MaxRequestsPerChild controls how frequently the server recycles >X# processes by killing old ones and launching new ones. >X >X<IfModule prefork.c> >X# Apache2 defaults >XStartServers 5 >XMinSpareServers 5 >XMaxSpareServers 10 >XMaxClients 100 >XMaxRequestsPerChild 10000 >X >X</IfModule> >X >X# >X# PHP Support >X# >X >X AddType application/x-httpd-php .php >X AddType application/x-httpd-php-source .phps >X >X# >X# ErrorLog: The location of the error log file. >X# If you do not specify an ErrorLog directive within a <VirtualHost> >X# container, error messages relating to that virtual host will be >X# logged here. If you *do* define an error logfile for a <VirtualHost> >X# container, that host's errors will be logged there and not here. >X# >X >XErrorLog "/var/log/apache/httpd-error.log" >X >X# >X# LogLevel: Control the number of messages logged to the error_log. >X# Possible values include: debug, info, notice, warn, error, crit, >X# alert, emerg. >X# >XLogLevel warn >X >X<IfModule log_config_module> >X # >X # The following directives define some format nicknames for use with >X # a CustomLog directive (see below). >X # >X LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined >X LogFormat "%h %l %u %t \"%r\" %>s %b" common >X >X <IfModule logio_module> >X # You need to enable mod_logio.c to use %I and %O >X LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio >X </IfModule> >X >X # >X # The location and format of the access logfile (Common Logfile Format). >X # If you do not define any access logfiles within a <VirtualHost> >X # container, they will be logged here. Contrariwise, if you *do* >X # define per-<VirtualHost> access logfiles, transactions will be >X # logged therein and *not* in this file. >X # >X CustomLog "/var/log/apache/httpd-access.log" common >X >X # >X # If you prefer a logfile with access, agent, and referer information >X # (Combined Logfile Format) you can use the following directive. >X # >X #CustomLog "/var/log/httpd-access.log" combined >X</IfModule> >X >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule rewrite_module libexec/apache24/mod_rewrite.so >X#LoadModule auth_mysql_module libexec/apache24/mod_auth_mysql.so >X >X<IfModule mod_perl.c> >X PerlTaintCheck On >X PerlOptions -ParseHeaders >X PerlPostConfigRequire /rmi/perl/startup2.pl >X</IfModule> >X >X# VHOST START >X# >X# The Virtual Host Entry >X# >X<IfDefine SSL> >XLoadModule ssl_module libexec/apache24/mod_ssl.so >XLoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so >X</IfDefine> >X<VirtualHost *:80> >X >X <IfModule mod_dbd.c> >X DBDriver mysql >X DBDParams "host=127.0.0.1 dbname=apache user=apacheBR pass=some_pass" >X DBDMin 1 >X DBDKeep 8 >X DBDMax 20 >X DBDExptime 300 >X </IfModule> >X >X <IfDefine SSL> >X RewriteEngine On >X RewriteCond %{HTTPS} off >X RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} >X </IfDefine> >X ErrorLog /var/log/apache/test94.private-error.log >X CustomLog /var/log/apache/test94.private-access.log common >X >X # Vhost START >X # common for HTTP or HTTPS >X ServerAdmin webmaster@test94.private >X DocumentRoot "/rmi/htdocs/" >X ServerName test94.private >X ServerAlias *.test94.private test94.private >X # (or test94.private without www) >X <Directory "/rmi/htdocs/"> >X Options +Indexes +FollowSymLinks +MultiViews +ExecCGI +Includes >X AllowOverride All >X Order allow,deny >X Allow from all >X Require all granted >X >X HeaderName HEADER.html >X IndexIgnore HEADER.html .htaccess >X IndexOptions +NameWidth=* +FancyIndexing +SuppressHTMLPreamble >X IndexOrderDefault Ascending Name >X >X# AuthType Basic >X# AuthName "dbmrmi" >X# AuthBasicProvider dbm >X# AuthDBMUserFile /rmi/passwd.dbm >X# Require valid-user >X >X <IfModule mod_perl.c> >X <Files ~ "\.cgi$"> >X SetHandler perl-script >X PerlHandler ModPerl::RegistryPrefork >X </Files> >X </IfModule> >X # AddType text/html .shtml >X # AddHandler server-parsed .shtml >X </Directory> >X <Directory "/rmi/htdocs/"> >X Include "/rmi/htaccess" >X </Directory> >X >X<Directory "/rmi/htdocs/RegisterdUser"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Registered User" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd FROM USRS WHERE UsrID = %s" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >X<Directory "/rmi/htdocs/RegisterdUser/ActiveMembers"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Active users Only" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd from USRS, USRS_GRPS where USRS.UsrID=%s AND USRS.UsrID=USRS_GRPS.UsrID" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >X<Directory "/rmi/htdocs/RegisterdUser/AdminOnly"> >X Options FollowSymLinks Indexes MultiViews >X AuthType Basic >X AuthName "Admin users Only" >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT Passwd from USRS, USRS_GRPS where USRS.UsrID=%s AND USRS.UsrID=USRS_GRPS.UsrID AND GRP='Administrator'" >X Require valid-user >X AllowOverride None >X Order allow,deny >X Allow from all >X</Directory> >X >X # Vhost END >X</VirtualHost> >X >X# The Virtual SSL Host Entry >X# >X<IfDefine SSL> >X #Include etc/apache24/extra/httpd-ssl.conf >X Listen 443 >X SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 >X SSLPassPhraseDialog builtin >X SSLSessionCache "shmcb:/var/run/ssl_scache(512000)" >X SSLSessionCacheTimeout 300 >X <VirtualHost _default_:443> >X >X <IfModule mod_dbd.c> >X DBDriver mysql >X DBDParams "host=127.0.0.1 dbname=apache user=apacheBR pass=some_pass" >X DBDMin 1 >X DBDKeep 8 >X DBDMax 20 >X DBDExptime 300 >X </IfModule> >X >X SSLEngine on >X SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL >X SSLCertificateFile "/usr/local/etc/apache24/ssl.crt/server.crt" >X SSLCertificateKeyFile "/usr/local/etc/apache24/ssl.key/server.key" >X BrowserMatch ".*MSIE.*" \ >X nokeepalive ssl-unclean-shutdown \ >X downgrade-1.0 force-response-1.0 >X ErrorLog /var/log/apache/test94.private-ssl-error.log >X CustomLog /var/log/apache/test94.private-ssl-request.log \ >X "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" >X >X <FilesMatch "\.(cgi|shtml|phtml|php)$"> >X SSLOptions +StdEnvVars >X </FilesMatch> >X >X # Vhost START >X # common for HTTP or HTTPS >X ServerAdmin webmaster@test94.private >X DocumentRoot "/rmi/htdocs/" >X ServerName test94.private >X ServerAlias *.test94.private test94.private >X # (or test94.private without www) >X <Directory "/rmi/htdocs/"> >X Options +Indexes +FollowSymLinks +MultiViews +ExecCGI +Includes >X AllowOverride All >X Order allow,deny >X Allow from all >X >X HeaderName HEADER.html >X IndexIgnore HEADER.html .htaccess >X IndexOptions +NameWidth=* +FancyIndexing +SuppressHTMLPreamble >X IndexOrderDefault Ascending Name >X >X >X AuthType Basic >X AuthName "rmissl" >X AuthBasicProvider file >X AuthUserFile /rmi/htpasswd >X Require valid-user >X >X <IfModule mod_perl.c> >X <Files ~ "\.cgi$"> >X SetHandler perl-script >X PerlHandler ModPerl::RegistryPrefork >X </Files> >X </IfModule> >X # AddType text/html .shtml >X # AddHandler server-parsed .shtml >X </Directory> >X <Directory "/rmi/htdocs/"> >X Include "/rmi/htaccess" >X </Directory> >X # Vhost END >X </VirtualHost> >X</IfDefine> >X >X# VHOST END >X >XServerName test94.private >X+++++++++++++ END +++++++++ >8ef6d81b80e872f74eb780c57d3a44a4 >echo x - MOD_PERL_PROBLEM-2016-04-17/step1 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step1 << '0f16c51931262c714a632c952624fd5c' >X#!/bin/sh >X# Modify configuration >X# >Xecho "uudecoding test103.png test file" >Xif ! uudecode test103.png.uuencode ; then >X echo "uudecode test103.png.uuencode failed" >X exit 1 >Xfi >X >Xecho "Modify configuration" >Xset -e >Xhostname=`hostname` >Xf=/etc/hosts >Xdate=`date '+%Y-%m-%d-%H-%M-%S'` >Xif ! grep "$hostname" $f ; then >X echo "Adding hostname $hostname" >X cp $f $f-$date >X echo "127.0.0.1 $hostname $hostname.private" >>/etc/hosts >Xfi >Xf=/etc/pkg/FreeBSD.conf >Xif [ -f /etc/pkg/FreeBSD.conf ] ; then >X sed -e 's/quarterly/latest/' $f >/tmp/$$ >X if diff $f /tmp/$$ ; then >X echo nochange $f >X else >X echo update $f >X cp $f $f-$date >X cp /tmp/$$ $f >X fi >Xfi >Xf=/etc/rc.conf >Xcp $f /tmp/$$ >Xif ! grep mysql_enable /tmp/$$; then >X echo adding mysql_enable >X echo 'mysql_enable="YES"' >>/tmp/$$; >Xelse >X echo mysql_enable already added >Xfi >Xif ! grep apache24_enable /tmp/$$; then >X echo adding apache24_enable >X echo 'apache24_enable="YES"' >>/tmp/$$; >Xelse >X echo apache24_enable already added >Xfi >Xif diff $f /tmp/$$ ; then >X echo "$f - no change" >Xelse >X echo "$f - changed" >X cp $f $f-$date >X cp /tmp/$$ $f >Xfi >Xpkg || true >Xpkg update || true >Xf=/usr/ports/DONE >Xif [ ! -f $f ] ; then >X portsnap fetch || exit 1 >X portsnap extract || exit 1 >X touch $f >Xfi >0f16c51931262c714a632c952624fd5c >echo x - MOD_PERL_PROBLEM-2016-04-17/step2 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step2 << 'eeb843b04080aaac7083293483b2ff77' >X#!/bin/sh >X >Xecho "Install ports from pkg repository" >Xpackages=PACKAGES >Xusage(){ >X cat <<EOF 1>&2 >Xuse: $0 [-d][-f PACKAGES] >X >Xuses pkg to get the current set of required or baseline utilities >X options: >X -x - turn on tracing >X >XThe package database is stored in /var/db/pkg/*.sql >X >XThe packages are stored in /var/cache/pkg/All >X >XSee also: >X baseline_init - clears pkg database, cache >X baseline_install - gets the pkg files >X >XEOF >X exit 1 >X} >X >Xwhile [ "$*" ] ; do >X case "$1" in >X -x ) set -x; x=-x;; >X * ) usage ;; >X esac >X shift >Xdone >X >X# just in case you want to get the latest version pkg >X#pkg fetch -y pkg >X#sh bootstrap >X >Xpkg update >X# set -x >XINSTALL=-n >XINSTALL= >XYES=-y >XNOUPDATE= >X#NOUPDATE=-U >Xset -e >X >Xp(){ >X #pkg search -x "$1" >X #pkg search -o -x "$1" >X pkg search -Q repository -o -x "$1" |tee /tmp/f1 >X sed -e '/ .*:/d' -e 's/ .*//' /tmp/f1 | sort | uniq >/tmp/f2 >X cat /tmp/f2 >X found=`cat /tmp/f2 | wc -l` >X # found=` pkg search -o -x "$1" | wc -l` >X for f in $found ; do >X found=$f >X done >X echo "found '$1' '$found'" >X >X case $found in >X 1 ) >X if pkg info -e `cat /tmp/f2` ; then >X echo "INSTALLED" >X else >X cmd=" pkg install $NOUPDATE $INSTALL $YES `cat /tmp/f2`" >X echo $cmd >X $cmd >X fi >X ;; >X 0 ) echo "NONE FOUND" >X exit 1 >X ;; >X * ) >X # pkg search -Q repository -o -x "$1" >X echo "TOO MANY" >X # pkg install $NOUPDATE $INSTALL $YES -x "$1" >X exit 1 >X ;; >X esac >X} >X >X >Xp '^apache24-2' >Xp '^mysql56-client' >Xp '^mysql56-server' >Xp '^p5-GD-[0-9]' >Xp '^p5-CGI-[0-9]' >Xp '^p5-HTML-Parser-[0-9]' >Xp 'mod_auth_mysql_another' >Xp 'mod_perl2' >eeb843b04080aaac7083293483b2ff77 >echo x - MOD_PERL_PROBLEM-2016-04-17/step3 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step3 << '25f6ed98293a0737ea594950a5da1dce' >X#!/bin/sh >X# compile and install apr1 >Xecho "Compiling and installing apr1" >X >Xapr=/usr/local/lib/apr-util-1/apr_dbd_mysql-1.so >Xport=/usr/ports/devel/apr1 >Xoptions=/var/db/ports/devel_apr1/options >Xneed_compile= >X >Xif [ ! -f $apr ] ; then >X need_compile=YES; >Xelif [ ! -f $options ] ; then >X need_compile=YES; >Xelif ! grep 'OPTIONS_FILE_SET.=MYSQL' $options ; then >X need_compile=YES; >Xfi >Xcd $port >Xif [ "$need_compile" ] ; then >X make clean >X cat <<EOF 2>&1 >XCompile and install $port with OPTION MYSQL >XWe will attempt to use a canned set of options. >XIf this fails, then do: >X cd $port >X make clean >X make config # select MYSQL option >X make deinstall reinstall >XEOF >X >Xcat <<EOF >$options >X# This file is auto-generated by 'make config'. >X# Options for apr-1.5.2.1.5.4 >X_OPTIONS_READ=apr-1.5.2.1.5.4 >X_FILE_COMPLETE_OPTIONS_LIST= SSL NSS IPV6 DEVRANDOM BDB GDBM LDAP MYSQL NDBM PGSQL SQLITE FREETDS >XOPTIONS_FILE_SET+=SSL >XOPTIONS_FILE_UNSET+=NSS >XOPTIONS_FILE_SET+=IPV6 >XOPTIONS_FILE_SET+=DEVRANDOM >XOPTIONS_FILE_SET+=BDB >XOPTIONS_FILE_SET+=GDBM >XOPTIONS_FILE_UNSET+=LDAP >XOPTIONS_FILE_SET+=MYSQL >XOPTIONS_FILE_UNSET+=NDBM >XOPTIONS_FILE_UNSET+=PGSQL >XOPTIONS_FILE_UNSET+=SQLITE >XOPTIONS_FILE_UNSET+=FREETDS >XEOF >X >Xfi >X >Xmake deinstall reinstall >X >Xif [ ! -f $apr ] ; then >X echo "Missing APR Mysql Driver file $apr" >X exit 1 >Xfi >Xexit 0 >25f6ed98293a0737ea594950a5da1dce >echo x - MOD_PERL_PROBLEM-2016-04-17/step4 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step4 << '75b4724128372d9ac902296a07c94d36' >X#!/bin/sh >X >Xusage(){ >X cat <<EOF; >Xuse: $0 [-x][-r] >X setup test files for mod_auth_dbm testing >X >XOptions: >X -x - turn on tracing >X -r - reinitialize database >XEOF >X exit 1 >X} >Xinit= >Xwhile [ "$*" ] ; do >X case "$1" in >X -x ) set -x;; >X -r ) init=YES;; >X * ) usage;; >X esac >X shift >Xdone >X >Xset -e >X >Xmysql_server= >Xif [ -f /usr/local/etc/rc.d/mysql-server ] ; then >X mysql_server=/usr/local/etc/rc.d/mysql-server >Xelif [ -f /usr/local/etc/rc.d/mysql-server.sh ] ; then >X mysql_server=/usr/local/etc/rc.d/mysql-server.sh >Xelse >X echo "No /usr/local/etc/rc.d/mysql-server" >X exit 1 >Xfi >X >X >XADMINUSER=admin >XADMINPW=password >X >Xdo_admin_query() { >X FLAGS= >X while [ "$1" != '' ] ; do >X case "$1" in >X -* ) FLAGS="$FLAGS $1";; >X * ) break ;; >X esac >X shift; >X done >X if [ -n "$*" ] ; then >X env MYSQL_PWD="$ADMINPW" mysql $FLAGS --user=${ADMINUSER} -B -e "$@" >X else >X env MYSQL_PWD="$ADMINPW" mysql $FLAGS --user=${ADMINUSER} -B >X fi >X} >X >Xreinitialize(){ >X echo "REINITIALIZING Database - Removing /var/db/mysql directories that are not symbolic links" >X sh $mysql_server stop || true >X sleep 2 >X killall mysqld || true >X ps -axuw |grep mysqld || true >X rm -rf /var/db/mysql >X # ps -axuw |grep mysql >X /usr/local/bin/mysql_install_db --user=mysql --basedir=/usr/local --datadir=/var/db/mysql >X sh $mysql_server start || true >X while true ; do >X nc -v -v -w 1 localhost 3306 >/dev/null && break; >X sleep 1; >X done >X chown -R mysql:mysql /var/db/mysql >X >X echo "setup: ignore errors concerning dropping or revoking" >X # WARNING: this will assume that you need to set up: >X # admin - Administrator (God Mode) - can do anything, i.e. original mysql 'root' >X # root - total control of rmi database >X # other users: defined by db_users in database >X # db_users [user:password@host[,w]]* - a list of user accounts to be created >X if ! mysql -u$ADMINUSER -p$ADMINPW -e 'quit' ; then >X if mysqladmin -uroot password mysql reload ; then >X echo "Set root password, setting up ADMINUSER '$ADMINUSER' password '$ADMINPW'" >X mysql -uroot -pmysql -e "GRANT ALL PRIVILEGES ON *.* TO '$ADMINUSER'@'localhost' IDENTIFIED BY '$ADMINPW' WITH GRANT OPTION;" >X mysql -uroot -pmysql -e "FLUSH PRIVILEGES;" >X fi >X if ! do_admin_query 'quit' ; then >X cat <<EOF >XYou need to set the default configuration for MYSQL. >XRun the following and then restart >X sh /usr/local/etc/rc.d/mysql-server stop || true >X mysql_install_db --basedir=/usr/local --user=mysql --datadir=/var/db/mysql >X sh /usr/local/etc/rc.d/mysql-server start || true >XEOF >X exit 1 >X fi >X fi >X do_admin_query "DELETE from mysql.user where User !='$ADMINUSER'" || true >X do_admin_query "DELETE from mysql.db where Db !='mysql'" || true >X mysqladmin -u$ADMINUSER -p$ADMINPW reload >X # do_admin_query "select Host,User,Password from mysql.user " || true >X >X do_admin_query "DROP DATABASE IF EXISTS test" || true >X do_admin_query "DROP DATABASE IF EXISTS apache" || true >X do_admin_query "DROP DATABASE IF EXISTS rmi" || true >X #do_admin_query "GRANT ALL PRIVILEGES ON $SQLDB.* TO '$SQLUSER'@'$SQLHOST' IDENTIFIED BY '$SQLPW'" >X do_admin_query "FLUSH PRIVILEGES" >X # db_users is a list with format user[:password][@host][,w]* >X # >X} >X >Xreinitialize >Xif [ "$init" ] ; then >X echo DOING INIT >X reinitialize >Xfi >Xif mysql -u$ADMINUSER -p"$ADMINPW" -e 'quit'; then >X echo OK >Xelse >X echo NEEDS INIT >X reinitialize >Xfi >X >Xuser=root >Xuserpw=` htpasswd -bnd $user password | sed -e "s/$user://"` >Xadminpw=` htpasswd -bnd $ADMINUSER $ADMINPW | sed -e "s/$ADMINUSER://"` >X >Xmysql -v -v -u$ADMINUSER -p"$ADMINPW" <<EOF; >X >XCREATE database if not exists apache; >XSHOW databases; >X >Xuse apache; >Xcreate table if not exists permissions ( >X # OPTIONS NORESTART >X PRIMARY KEY entry (id) , # unique index >X id varchar(32) , # id (GENERATED) >X password varchar(256) default '' # encrypted password (MONITORED) >X); >X >X >XINSERT INTO apache.permissions (id, password) VALUES ('$user', '$userpw') >X on duplicate key update password='$userpw'; >XINSERT INTO apache.permissions (id, password) VALUES ('admin', '$adminpw') >X on duplicate key update password='$adminpw'; >X >Xselect * from apache.permissions; >XEOF >Xexit 0 >75b4724128372d9ac902296a07c94d36 >echo x - MOD_PERL_PROBLEM-2016-04-17/step5 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step5 << 'b18b2efe4b2d53609667ce2b042833ac' >X#!/bin/sh >X >X# Set up configuration files >Xecho "Setting up httpd.conf file" >X >Xhostname=`hostname` >Xdate=`date '+%Y-%m-%d-%H-%M-%S'` >X >Xhttpd=/usr/local/etc/apache24/httpd.conf >X >Xif [ ! -f $httpd ] ; then >X echo "Missing httpd.conf $httpd" >X exit 1 >Xfi >Xcp $httpd /tmp/$$ >Xs="ServerName $hostname" >Xif ! grep "$s" /tmp/$$ ; then >X echo "$s" >>/tmp/$$ >Xfi >X >Xecho TMP /tmp/$$ >Xperl -pi.bak -e '$_ = "" if /LOADMODULE/../ENDLOADMODLE/' /tmp/$$ >X >Xif ! grep LOADMODULE /tmp/$$ ; then >X echo ADDING LOADMODULES TO /tmp/$$ >X cat <<EOF >>/tmp/$$ >X######## LOADMODULE ############# >XLoadModule rewrite_module libexec/apache24/mod_rewrite.so >XLoadModule cgi_module libexec/apache24/mod_cgi.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X >X <IfModule mod_dbd.c> >X DBDriver mysql >X DBDParams "host=127.0.0.1 dbname=apache user=admin pass=password" >X DBDMin 1 >X DBDKeep 8 >X DBDMax 20 >X DBDExptime 300 >X </IfModule> >X >X<Directory "/usr/local/www/apache24/data"> >X Options +ExecCGI >X AddHandler cgi-script .cgi >X <IfModule mod_perl.c> >X <Files ~ "\.cgi$"> >X SetHandler perl-script >X PerlHandler ModPerl::RegistryPrefork >X </Files> >X </IfModule> >X</Directory> >X<Directory "/usr/local/www/apache24/data/restricted"> >X# >X# Authentication Support >X# htaccess file: >X AuthName "Testing2" >X AuthType Basic >X Require valid-user >X <IfModule mod_dbd.c> >X AuthBasicProvider dbd >X AuthDBDUserPWQuery "SELECT password FROM permissions WHERE id = %s" >X </IfModule> >X >X <IfModule mod_auth_mysql.c> >X AuthMySQLEnable On >X AuthMySQLHost localhost >X AuthMySQLUser admin >X AuthMySQLPassword password >X AuthMySQLDB apache >X AuthMySQLUserTable permissions >X AuthMySQLNameField id >X AuthMySQLPasswordField password >X AuthBasicAuthoritative off >X AuthMySQLAuthoritative On >X AuthUserFile /dev/null >X </IfModule> >X >X >X</Directory> >X >X######## ENDLOADMODULE ############# >XEOF >Xelse >X echo LOADMODULES ADDED >Xfi >X >Xif diff $httpd /tmp/$$ ; then >X echo "$httpd NO CHANGE" >Xelse >X echo "$httpd CHANGED" >X cp $httpd $httpd-$date >X cp /tmp/$$ $httpd >Xfi >X >Xdatadir=/usr/local/www/apache24/data/ >Xecho "Copying test files to $datadir" >X >X >Xif [ ! -d $datadir ] ; then >X echo "Apache default data directory missing - $datadir" >X exit 1 >Xfi >Xif ! diff test103.cgi $datadir ; then >X echo "copying test103.cgi to $datadir" >X cp test103.cgi test103.png $datadir >Xfi >Xif ! cmp test103.png $datadir ; then >X echo "copying test103.png to $datadir" >X cp test103.cgi test103.png $datadir >Xfi >b18b2efe4b2d53609667ce2b042833ac >echo x - MOD_PERL_PROBLEM-2016-04-17/step6 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6 << 'deba510e85f1877696c9ff05cf79998c' >X#!/bin/sh >X >Xecho "Restart apache and then run test" >X >Xconfig=/usr/local/etc/apache24/httpd.conf >Xmods=/usr/local/etc/apache24/httpd.conf.mod >Xclearflags(){ >Xperl -sp -e ' >Xs/#+// if /#LoadModule authn_dbd/; >Xs/#+// if /#LoadModule authz_dbd/; >Xs/#+// if /#LoadModule dbd_module/; >Xs/#+// if /#LoadModule perl_module/; >Xs/#+// if /#DBDriver mysql/; >Xif( /LoadModule mysql_auth_module/ ){ >X s/#+// if /#LoadModule mysql_auth_module/; >X s/L/#L/ if /LoadModule mysql_auth_module/; >X} >X' $config >$mods >Xif ! diff $mods $config >/dev/null ; then >X cp $mods $config >Xfi >X} >Xshowflags(){ >Xecho FLAGS >Xperl -sn -e ' >Xprint $_ if /LoadModule perl_module/; >Xprint $_ if /LoadModule dbd/; >Xprint $_ if /LoadModule authn_dbd/; >Xprint $_ if /LoadModule authz_dbd/; >Xprint $_ if /LoadModule mysql_auth/; >Xprint $_ if /DBDriver mysql/; >X' $config >X} >X >Xnodriver(){ >Xclearflags >Xperl -sp -e ' >Xs/DB/#DB/ if /^\s*DBDriver mysql/; >X' $config >$mods >Xif ! diff $mods $config >/dev/null ; then >X cp $mods $config >Xfi >X} >X >Xnomodperl(){ >Xclearflags >Xperl -sp -e ' >Xs/L/#L/ if /LoadModule perl_module/; >X' $config >$mods >Xif ! diff $mods $config >/dev/null ; then >X cp $mods $config >Xfi >X} >X >Xmysqlauth(){ >Xclearflags >Xperl -sp -e ' >Xs/^/#/ if /^\s*LoadModule authn_dbd/; >Xs/^/#/ if /^\s*LoadModule authz_dbd/; >Xs/^/#/ if /^\s*LoadModule dbd_module/; >Xs/#// if /^\s*#\s*LoadModule mysql_auth_module/; >X' $config >$mods >Xif ! diff $mods $config >/dev/null ; then >X cp $mods $config >Xfi >X} >X >Xtestconfig(){ >Xshowflags >Xif ! apachectl restart >/dev/null ; then >X echo "apachectl restart failed" 2>&1 >X apachectl restart >X exit 1 >Xfi >X >Xecho "Running Test:" >X >Xnc localhost 80 <<EOF |grep -i image >XGET /test103.cgi HTTP/1.1 >XHost: www.example.com >XUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) >XConnection: close >X >XEOF >X >X} >X >Xclearflags >Xecho "" >Xecho "MOD Perl, DB Driver Enabled" >Xtestconfig >X >Xecho "" >Xecho "MOD Perl, DB Driver Disabled" >Xnodriver >Xtestconfig >X >Xecho "" >Xecho "No MOD Perl, DB Driver Enabled" >Xnomodperl >Xtestconfig >X >X >Xecho "" >Xecho "Using mod_auth_mysql" >Xmysqlauth >Xtestconfig >Xexit >X >deba510e85f1877696c9ff05cf79998c >echo x - MOD_PERL_PROBLEM-2016-04-17/test103.cgi >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/test103.cgi << '64e865644d732ed892e365c0841e69ae' >X#!/usr/local/bin/perl >X >Xuse strict; >Xuse warnings; >Xuse CGI; >Xuse CGI::Carp qw( fatalsToBrowser ); >Xuse GD; >X >X $| = 1; >X >X my $query = new CGI; >X print $query->header(); >X print $query->start_html(); >X >X my $test_png = "test103.png"; >X print $query->h1($test_png); >X print <<EOF; >X<img src="$test_png"> >XEOF >X >X my $image = GD::Image->new( $test_png ); >X if( $image ){ >X print "<br> Read Image\n"; >X } else { >X print "<br> Did NOT Read Image\n"; >X } >X >X print $query->end_html(); >X >X exit 0; >X >64e865644d732ed892e365c0841e69ae >echo x - MOD_PERL_PROBLEM-2016-04-17/step6.out >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6.out << '0d2f2917a710fc69ad54dd3c05bc2363' >XRestart apache and then run test >X >XMOD Perl, DB Driver Enabled >XFLAGS >XLoadModule perl_module libexec/apache24/mod_perl.so >X DBDriver mysql >XSyntax OK >XSyntax OK >XRunning Test: >X<br> Did NOT Read Image >X >XMOD Perl, DB Driver Disabled >XFLAGS >XLoadModule perl_module libexec/apache24/mod_perl.so >X #DBDriver mysql >XSyntax OK >XSyntax OK >XRunning Test: >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >XFLAGS >X#LoadModule perl_module libexec/apache24/mod_perl.so >X DBDriver mysql >XSyntax OK >XSyntax OK >XRunning Test: >X<br> Read Image >0d2f2917a710fc69ad54dd3c05bc2363 >echo x - MOD_PERL_PROBLEM-2016-04-17/README >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/README << 'b2bd22bfac4da8b2ac23d8493b1f56ce' >XApache, MOD_PERL, and MySQL Modules >X Have Wierd Failure on FreeBSD 10.X >X But Not on FreeBSD 9.3 >X Patrick Powell papowell@astart.com >X Tue May 17 11:16:10 PDT 2016 >X >XFreeBSD 10.3: >X >XThe Apache mod_perl + p5-GD + mod_dbd DBD + mysql appear >Xto have a subtle but catastrophic interaction. >X >XIF >X a Perl GCI script to try to read a PNG file using the GD Perl module >XTHEN >X reading the PNG file fails, you get an error and the apache log file contains: >X >X GD Error: gd-png: fatal libpng error: bad parameters to zlib >X GD Warning: gd-png error: setjmp returns error condition 2 >X >XAlso, the same interaction occurs when you have >XApache mod_perl + p5-GD + mod_auth_mysql >X >XThe common element appears to be the dynamic loading of the MySQL client library. >X >XFreeBSD 9.3: >XThe same combination shown above works fine. >X >XDETAILS: >X >XOn FreeBSD 10.3: >XApache 24 >XIF you load the mod_perl >X AND you have a Perl CGI script >X AND the perl Perl CGI script uses GD via the p5-gd (GD.pm) module >X >X AND you load the mod_dbd module >X AND you configure mod_dbd to use mysql >X i.e. - >X <IfModule mod_dbd.c> >X DBDriver mysql >X DBDParams "host=127.0.0.1 dbname=apache user=admin pass=password" >X </IfModule> >X >X AND The Perl GCI script to try to read a PNG file >X >XTHEN >X reading the PNG file fails, you get an error and the apache log file contains: >X >X GD Error: gd-png: fatal libpng error: bad parameters to zlib >X GD Warning: gd-png error: setjmp returns error condition 2 >X >XCGI Script: >X >X#!/usr/local/bin/perl >X >Xuse strict; >Xuse warnings; >Xuse CGI; >Xuse CGI::Carp qw( fatalsToBrowser ); >Xuse GD; >X >X$| = 1; >X >Xmy $query = new CGI; >Xprint $query->header(); >Xprint $query->start_html(); >X >Xmy $test_png = "test103.png"; >Xprint $query->h1($test_png); >Xprint <<EOF; >X <img src="$test_png"> >XEOF >X >Xmy $image = GD::Image->new( $test_png ); >Xif( $image ){ >X print "<br> Read Image\n"; >X} else { >X print "<br> Did NOT Read Image\n"; >X} >X >Xprint $query->end_html(); >X >Xexit 0; >X >XJust to make it more complicated, If you do not use mod_perl, or do >Xnot use the mysql DBDriver then everything works OK: >X >XMOD Perl, DB Driver Enabled >XLoadModule perl_module libexec/apache24/mod_perl.so >X DBDriver mysql >X<br> Did NOT Read Image >X >XMOD Perl, DB Driver Disabled >XLoadModule perl_module libexec/apache24/mod_perl.so >X #DBDriver mysql >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >X#LoadModule perl_module libexec/apache24/mod_perl.so >X DBDriver mysql >X<br> Read Image >X >XIf you do not used mod_dbd, but use mod_auth_mysql, then it also fails: >X >XUsing mod_auth_mysql >X >X#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X#LoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >X<br> Did NOT Read Image >X~ >X >X >XTo Reproduce this, attached are a set of scripts that will configure a FreeBSD installation. >Xand run the tests which generated the fault indications. >X >X1. Install the FreeBSD system. (I use VirtualBox and Virtual Machines) >X You will need the latests versions of the PORTS tree so you can >X skip installing the ports. You may want to do this for FreeBSD 10.3 >X and FreeBSD 9.3 >X >X2. Copy the step* and test103* files to the test system. >X >X3. On the test system run the step* files: >X sh step1 # will modify /etc/rc.conf and install pkg and ports tree >X sh step2 # installs Apache, MySQL, GD, and support modules >X sh step3 # configures, compiles and installs devel/apr1 >X # you need to select MySQL support >X sh step4 # sets up a toy MySQL database for testing. See >X # Enabling_and_Administring_authn_dbd for an explanation >X sh step5 # modifies the Apache httpd.conf file and installs the >X # test103.cgi script and test103.png file. >X sh step6 # runs a set of tests on different Apache configurations. >X # This is done by commenting out critical lines in the >X # Apache httpd.conf file. >b2bd22bfac4da8b2ac23d8493b1f56ce >echo x - MOD_PERL_PROBLEM-2016-04-17/httpd-access.log >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/httpd-access.log << 'cfce473de641a3269930d5eb004d8903' >X127.0.0.1 - - [16/May/2016:13:47:35 -0700] "GET /test103.cgi HTTP/1.1" 200 413 >X127.0.0.1 - - [16/May/2016:13:47:36 -0700] "GET /test103.cgi HTTP/1.1" 200 405 >X127.0.0.1 - - [16/May/2016:13:47:36 -0700] "GET /test103.cgi HTTP/1.1" 200 405 >cfce473de641a3269930d5eb004d8903 >echo x - MOD_PERL_PROBLEM-2016-04-17/httpd-error.log >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/httpd-error.log << 'cea78d5ccc9705a2be32230252513cd2' >XGD Error: gd-png: fatal libpng error: bad parameters to zlib >XGD Warning: gd-png error: setjmp returns error condition 2 >cea78d5ccc9705a2be32230252513cd2 >echo x - MOD_PERL_PROBLEM-2016-04-17/step6.out_102 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6.out_102 << 'a4b22fbe31a1b49402f7a2868c1f1706' >XRestart apache and then run test >X >XMOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >X >XMOD Perl, DB Driver Disabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X #DBDriver mysql >XRunning Test: >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >X#LoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >X >XUsing mod_auth_mysql >XFLAGS >X#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X#LoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >a4b22fbe31a1b49402f7a2868c1f1706 >echo x - MOD_PERL_PROBLEM-2016-04-17/step6.out_101 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6.out_101 << '44b5cf22777f1ab88e498a844bb67790' >XRestart apache and then run test >X >XMOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >X >XMOD Perl, DB Driver Disabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X #DBDriver mysql >XRunning Test: >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >X#LoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >X >XUsing mod_auth_mysql >XFLAGS >X#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X#LoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >44b5cf22777f1ab88e498a844bb67790 >echo x - MOD_PERL_PROBLEM-2016-04-17/step6.out_103 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6.out_103 << '706dccd7aa3363f12b1fd0098ba94abe' >XRestart apache and then run test >X >XMOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >X >XMOD Perl, DB Driver Disabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X #DBDriver mysql >XRunning Test: >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >X#LoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >X >XUsing mod_auth_mysql >XFLAGS >X#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X#LoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Did NOT Read Image >706dccd7aa3363f12b1fd0098ba94abe >echo x - MOD_PERL_PROBLEM-2016-04-17/step6.out_93 >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/step6.out_93 << '73fb7e893c79fc51e01796e7a9dc72d3' >XRestart apache and then run test >X >XMOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >X >XMOD Perl, DB Driver Disabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X #DBDriver mysql >XRunning Test: >X<br> Read Image >X >XNo MOD Perl, DB Driver Enabled >XFLAGS >XLoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >XLoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >XLoadModule dbd_module libexec/apache24/mod_dbd.so >X#LoadModule perl_module libexec/apache24/mod_perl.so >X#LoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >X >XUsing mod_auth_mysql >XFLAGS >X#LoadModule authn_dbd_module libexec/apache24/mod_authn_dbd.so >X#LoadModule authz_dbd_module libexec/apache24/mod_authz_dbd.so >X#LoadModule dbd_module libexec/apache24/mod_dbd.so >XLoadModule perl_module libexec/apache24/mod_perl.so >XLoadModule mysql_auth_module libexec/apache24/mod_auth_mysql.so >X DBDriver mysql >XRunning Test: >X<br> Read Image >73fb7e893c79fc51e01796e7a9dc72d3 >echo x - MOD_PERL_PROBLEM-2016-04-17/test103.png.uuencode >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/test103.png.uuencode << 'f7f58a5a12608d411cc70646bfbca7d3' >Xbegin 644 test103.png >XMB5!.1PT*&@H````-24A$4@```&(````@!`,````;&[!:````&U!,5$6-S_0` >XM``!IF[<C,SU[M=4T35M8@9@1&1Y&9WJ#E(@V````"7!(67,```[$```.Q`&5 >XM*PX;```!BTE$050XC>V3O4_"0!C&#VA+1Q\*EK$&C8YT<BUBU!$,T;6-N/<T >XM[)*8\&_[?O3:$I19$R_IO<US][M[O\Z8WSHF/TD%>+ZPF\08;X=-YE9Q"(CD >XM638A@#'3P&FUC$-"I7LQO!5YEV<DQXFN%6.1%RA]1+=+3(\2W27$8&1\#,+K >XMH9GAI%H%_4TD/(H2[[E*'0@18D#4F'?.4#:$K^&Q0915Q!L3/0R-AX@3D2)O >XMB"W/'T8,IDHP:4Q?B)@VIGJ3.DU2<DE+%FMO]Y1)'+U<3(>=%\+2D3414JH# >XM^ES^JF0TA"8M;K+KG+6(DA^)[(QV.;TO_L=<K7CU'<%>D1>CFI!,D@UX7NT1 >XM3>3.[!$F2*476D23W:;6XM70E?LJI3JU"%\KR#5OW^'7;:F.MXA`NZ1'.\(F >XMCO,;ZLZ'S=K</7]Z6^HWDC)3)Y4[D2),"KI.!KF^X*ZC$U())Q?)$44MJ:A2 >XM*0TU-7/4SZ=T1/6BYG*DCL#&"VK:^)'^7RVXAT5RN=%7:U[4_(\_/[X`R\!" >X1&PX5@IL`````245.1*Y"8((` >X` >Xend >f7f58a5a12608d411cc70646bfbca7d3 >echo x - MOD_PERL_PROBLEM-2016-04-17/Makefile >sed 's/^X//' >MOD_PERL_PROBLEM-2016-04-17/Makefile << '86d84706cba096406565a0c4b6c3b0f1' >Xall: >X echo "Use:" >X echo " make setup - run setup steps" >X echo " make test - run test step" >X echo " make shar - create SHAR file" >X >Xsetup: >X sh step1 >X sh step2 >X sh step3 >X sh step4 >X sh step5 >Xtest: >X sh step6 >X >Xshar: >X dir=`/bin/pwd`; base=`basename $$dir`; \ >X cd ..; \ >X shar ` find $$base | grep -v '.png$$' ` >$$base.shar >86d84706cba096406565a0c4b6c3b0f1 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 209585
: 170413