|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-10-05 11:01 UTC] info-bugsphp at ch2o dot info
Description: ------------ when user configure script to configure apache2handler with apache 2.4 compiled mpm loadable... and the default httpd.conf are not existing... the configure script fail with this error: httpd: Could not open configuration file /product/apache/moteur/apache2-all-mpms-2.4.23/conf/httpd.conf: No such file or directory after reading the config.m4, is why you search if apache are compiled with an mpm multithread using the command httpd -V... is a bad thing... beceause in apache 2.4 you can choose mpm at runtime... you depend on httpd.conf... that load event, prefork, worker mpm... you cannot know in that way if mpm threaded are compiled... if the default httpd.conf compiled in httpd binary not load threaded mpm at configure time... you dont compile php in thread safe mode... i think the good way is to add configure directive to abel to overide this autoconfiguration. like --apache2-threaded=yes... or ndisable autoconfigure if configure script directive --enable-maintainer-zts is set... or the other way is to query EXTRA_CFLAGS to find "thread" flag but can be os dependent... or doing ldd on httpd binary to find thread library: # ldd /path/to/bin/httpd | grep thread or check presence in modules directory of mod_mpm_event.so or mod_mpm_worker.so, or other mpm thread module... but is dependant of the apache mpm module list... or to check if on of then modules are compiled with thread library (with ldd)... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
the config.m4 part that bug: else APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` if test -n "$APACHE_THREADED_MPM"; then PHP_BUILD_THREAD_SAFE fi fipossible modification of the config.m4: PHP_BUILD_THREAD_SAFE fi else - APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` + if test -n "$enable_maintainer_zts"; then + APACHE_THREADED_MPM="yes" + else + APACHE_MODULE_DIR=`$APXS -q libexecdir` + APACHE_MODULE_BASE_DIR=`dirname $APACHE_MODULE_DIR` + touch /tmp/php-httpd$$.conf + APACHE_THREADED_MPM=`$APXS_HTTPD -f /tmp/php-httpd$$.conf -V -d $APACHE_MODULE_BASE_DIR -C "ErrorLog /tmp/logs.log" -C "LoadModule mpm_worker_module modules/mod_mpm_worker.so" 2>&1 | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + echo "Build thread Safe" + PHP_BUILD_THREAD_SAFE + else + APACHE_THREADED_MPM=`$APXS_HTTPD -f /tmp/php-httpd$$.conf -V -d $APACHE_MODULE_BASE_DIR -C "ErrorLog /tmp/logs.log" -C "LoadModule mpm_event_module modules/mod_mpm_event.so" 2>&1 | grep 'threaded:.*yes'` if test -n "$APACHE_THREADED_MPM"; then + echo "Build thread Safe" PHP_BUILD_THREAD_SAFE fi fi + rm -f /tmp/php-httpd$$.conf + fi + fi AC_MSG_RESULT(yes) PHP_SUBST(APXS) elsenew patch : PHP_BUILD_THREAD_SAFE fi else - APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` + if test -n "$enable_maintainer_zts"; then + APACHE_THREADED_MPM="yes" + else + APACHE_MODULE_DIR=`$APXS -q libexecdir` + APACHE_MODULE_BASE_DIR=`dirname $APACHE_MODULE_DIR` + touch /tmp/php-httpd$$.conf + APACHE_THREADED_MPM=`$APXS_HTTPD -V 2>&1 | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + PHP_BUILD_THREAD_SAFE + else + APACHE_THREADED_MPM=`$APXS_HTTPD -f /tmp/php-httpd$$.conf -V -d $APACHE_MODULE_BASE_DIR -C "ErrorLog /tmp/logs.log" -C "LoadModule mpm_worker_module modules/mod_mpm_worker.so" 2>&1 | grep 'threaded:.*yes'` + if test -n "$APACHE_THREADED_MPM"; then + PHP_BUILD_THREAD_SAFE + else + APACHE_THREADED_MPM=`$APXS_HTTPD -f /tmp/php-httpd$$.conf -V -d $APACHE_MODULE_BASE_DIR -C "ErrorLog /tmp/logs.log" -C "LoadModule mpm_event_module modules/mod_mpm_event.so" 2>&1 | grep 'threaded:.*yes'` if test -n "$APACHE_THREADED_MPM"; then PHP_BUILD_THREAD_SAFE fi fi + fi + rm -f /tmp/php-httpd$$.conf + fi + fi AC_MSG_RESULT(yes) PHP_SUBST(APXS) else