Weird problem with a warn statement and Apache
So a couple of nights ago we came across a weird problem. A chunk of code in one of the Koha modules was causing a script that called it to hang. Only when called from the web though, it works fine from the command line.
my $query =
“SELECT
quantity, datereceived, freight, unitprice, listprice,
ecost, quantityreceived as qrev, subscription, title, itemtype,
aqorders.biblionumber, aqorders.booksellerinvoicenumber,
quantity-quantityreceived as tleft, aqorders.ordernumber
as ordnum, entrydate, budgetdate, booksellerid, aqbasket.basketno
from aqorderbreakdown, aqbasket, aqorders
LEFT JOIN biblioitems ON
biblioitems.biblioitemnumber = aqorders.biblioitemnumber
WHERE bookfundid=?
AND aqorders.ordernumber = aqorderbreakdown.ordernumber
AND aqorders.basketno = aqbasket.basketno
AND (budgetdate >= ? AND budgetdate < ?)
AND (datecancellationprinted is NULL OR datecancellationprinted = ‘0000-00-00′)
“;
warn $query;
“SELECT
quantity, datereceived, freight, unitprice, listprice,
ecost, quantityreceived as qrev, subscription, title, itemtype,
aqorders.biblionumber, aqorders.booksellerinvoicenumber,
quantity-quantityreceived as tleft, aqorders.ordernumber
as ordnum, entrydate, budgetdate, booksellerid, aqbasket.basketno
from aqorderbreakdown, aqbasket, aqorders
LEFT JOIN biblioitems ON
biblioitems.biblioitemnumber = aqorders.biblioitemnumber
WHERE bookfundid=?
AND aqorders.ordernumber = aqorderbreakdown.ordernumber
AND aqorders.basketno = aqbasket.basketno
AND (budgetdate >= ? AND budgetdate < ?)
AND (datecancellationprinted is NULL OR datecancellationprinted = ‘0000-00-00′)
“;
warn $query;
If the warn is commented out it works fine, I think there is a bug in the apache installed on the machine this was happening on.

