BLaZuRE Posted May 12, 2012 Share Posted May 12, 2012 So I'm trying to learn to install stuff from source rather than binaries. I installed Apache successfully and moved on to PHP. Whenever I try to try /usr/local/apache2/bin/apachectl stop or start, I get: [sat May 12 15:08:27.269134 2012] [so:warn] [pid 31017:tid 140056791607072] AH01574: module php5_module is already loaded, skipping [sat May 12 15:08:27.269406 2012] [:crit] [pid 31017:tid 140056791607072] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. AH00013: Pre-configuration failed I've done some reading on 'threadsafe' php. Seems that people recommend non-threadsafe. Also, I'm wondering about how Apache is running a threaded MPM. My apache config.nice looks like: ./configure --enable-so so I would assume it would default to non-threaded MPM. My PHP config looks like: './configure' \ '--prefix=/usr/local/apache2/php' \ '--with-apxs2=/usr/local/apache2/bin/apxs' \ '--with-config-file-path=/usr/local/apache2/php' \ '--with-mysql' \ "$@" I'm also trying to make it with only what I need. At this point in time, I'm fine with non-threaded, though I think threaded would be better in the future. Currently it's localhost only, but after I learn a bit I wish to start using my configs for development. Quote Link to comment https://forums.phpfreaks.com/topic/262462-thread-safe-php-from-source/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 12, 2012 Share Posted May 12, 2012 If Apache is running PHP as an Apache Module, php must be built as the thread-safe flavor (one copy of php is running multiple concurrent threads.) If Apache is running php as a CGI application, php needs to be built as the non-thread-safe flavor (a separate copy of php is running for each concurrent thread.) Quote Link to comment https://forums.phpfreaks.com/topic/262462-thread-safe-php-from-source/#findComment-1345053 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.