Bug 139840

Summary: security/php5-mhash is not working with apache compiled as worker
Product: Ports & Packages Reporter: Lukasz Wasikowski <lukasz>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Lukasz Wasikowski 2009-10-22 14:10:01 UTC
PHP5 is not working when compiled as apache module (and apache is compiled as worker), and php5-mhash is loaded.

mhash is obsoleted (in favour of hash), as stated here:

http://www.php.net/manual/en/intro.mhash.php

but still some ports use it:

cd /usr/ports && make search rdeps=php5-mhash display=path

results (among many others):

/usr/ports/mail/squirrelmail
/usr/ports/sysutils/gosa
/usr/ports/www/phpwebgallery

How-To-Repeat: echo "WITH_MPM=worker" >> /etc/make.conf

cd /usr/ports/www/apache22 && make install clean
cd /usr/ports/lang/php5 && make rmconfig && make install clean (turn on apache module)
cd /usr/ports/security/php5-mhash && make install clean

Run: 
php-config
Usage: /usr/local/bin/php-config [OPTION]
Options:
--prefix            [/usr/local]
--includes          [-I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib]
--ldflags           [ -L/usr/local/lib]
--libs              [-lcrypt   -lcrypt -lm  -lxml2 -lz -liconv -lm -lcrypt -lcrypt ]
--extension-dir     [/usr/local/lib/php/20060613-zts]
--include-dir       [/usr/local/include/php]
--php-binary        [/usr/local/bin/php]

php -v
ALERT - canary mismatch on efree() - heap overflow detected (attacker 'REMOTE_ADDR not set', file 'unknown')
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-10-22 14:35:39 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Fix synopsis and assign.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2009-10-22 14:39:59 UTC
State Changed
From-To: open->closed

Since mhash is obsoleted, threaded php not recommended, 
apache worker not the default, why are you complaining?
Comment 3 Lukasz Wasikowski 2009-10-22 15:03:15 UTC
Still, since apache worker is an option to use, php5-mhash IS required
by bunch of ports, then at least php5-mhash should be marked broken when
one is using apache-worker.

-- 
Best regards,
Lukasz Wasikowski