[PHP-users 23980] スレッドセーフでない?

HOTTA Michihide hotta @ net-newbie.com
2004年 12月 23日 (木) 17:35:27 JST


堀田@長崎市です。
Vine Linux 3.1(and/or Seed) 用の php-5.0.3 の RPM パッケージを作
っていて気づいたのですが、apache2 といっしょに動かそうとすると
root @ seed ~# service apache2 start
httpdを起動中: [Thu Dec 23 12:32:24 2004] [crit] Apache is 
running a threaded MPM, but your PHP Module is not compiled to 
be threadsafe. You need to recompile PHP.
Pre-configuration failed
 [失敗]
となります。apache 1.3.x なら問題ありません。
apache2 は全く使っていないのでよくわからないのですが、Vine におけ
るバイナリの状態は以下のようになっているようです。
hotta @ seed ~$ rpm -ql apache2|grep sbin
/usr/sbin/apache2.perchild
/usr/sbin/apache2.prefork
/usr/sbin/apache2.threadpool
/usr/sbin/apache2.worker
/usr/sbin/apache2ctl
/usr/sbin/rotatelogs2
hotta @ seed ~$ ls -l /usr/sbin/apache2
/usr/sbin/apache2 -> /etc/alternatives/apache2
hotta @ seed ~$ ls -l /etc/alternatives/apache2
/etc/alternatives/apache2 -> /usr/sbin/apache2.worker
デフォルトはワーカスレッド?
PHP のビルドオプションを調べてみても、
$ ./configure --help|grep thread
 --enable-maintainer-zts 
 Enable thread safety - for code maintainers only
 --with-tsrm-pthreads 
 Use POSIX threads (default)
という感じで、特にそれらしい指定が見当たりません。某所からの情報
で、--enable-roxen-ztsを入れてみたらというのがありましたが、同じ
でした。どなたか、apache2 + php5 で動かしている方がおられましたら、
設定を教えていただけないでしょうか?
参考までに、現在のビルドオプションをつけておきます。よろしくお願
いします。
build() {
%configure \
 --prefix=%{_prefix} \
 --cache-file=../config.cache \
 --with-config-file-path=%{_sysconfdir} \
 --with-config-file-scan-dir=%{_sysconfdir}/php.d \
 --enable-force-cgi-redirect \
 --disable-debug \
 --enable-pic \
 --disable-rpath \
 --enable-inline-optimization \
 --with-bz2 \
 --with-db4=%{_prefix} \
 --with-curl \
 --with-exec-dir=%{_bindir} \
 --with-freetype-dir=%{_prefix} \
 --with-png-dir=%{_prefix} \
 --with-gd \
 --enable-gd-native-ttf \
 --with-gdbm \
 --with-gettext \
 --with-ncurses \
 --with-gmp \
 --with-iconv \
 --with-jpeg-dir=%{_prefix} \
 --with-openssl \
 --with-png \
 --with-regex=system \
 --with-xml \
 --with-expat-dir=%{_prefix} \
 --with-xsl=%{_prefix} \
 --with-xmlrpc=shared \
 --with-pcre=%{_prefix} \
 --with-zlib=%{_prefix} \
 --with-layout=GNU \
 --enable-bcmath \
 --enable-exif \
 --enable-ftp \
 --enable-magic-quotes \
 --enable-safe-mode \
 --enable-sockets \
 --enable-sysvsem \
 --enable-sysvshm \
 --enable-yp \
 --enable-wddx \
 --with-pear=/usr/share/pear \
 %{?_with_imap:--with-imap=shared --with-imap-ssl} \
 --with-ldap=shared \
 --with-mysql=shared,%{_prefix} \
 %{?_without_sqlite:--without-sqlite} \
 %{?_with_oci8:--with-oci8=shared} \
 %{?_with_mssql:--with-mssql=shared} \
 %{?_with_mhash:--with-mhash=shared} \
 --enable-soap \
 --enable-spl \
 --with-pgsql=shared \
 --with-snmp=shared,%{_prefix} \
 --enable-ucd-snmp-hack \
 --with-unixODBC=shared \
 --enable-memory-limit \
 --enable-shmop \
 --enable-calendar \
 --enable-dbx \
 --enable-dio \
 --enable-mcal \
 --enable-mbstring \
 --with-ttf \
 --enable-discard-path \
 --enable-xslt \
 --with-xslt-sablot=%{_prefix} \
 --enable-zend-multibyte \
 --with-mcrypt=shared,%{_prefix} \
 $*
make %{?_smp_mflags}
}
pushd .build-cli
build --enable-force-cgi-redirect
....
pushd .build-apache
build --with-apxs=%{_sbindir}/apxs
....
pushd .build-apache2
build --with-apxs2=%{_bindir}/apxs --enable-roxen-zts
....
-- 
堀田 倫英 <hotta @ net-newbie.com> <http://www.net-newbie.com>
GPG fingerprint : 7C3F E633 CC38 C53E E61A CF08 F8EF CA01 4ACB C9F5


PHP-users メーリングリストの案内

AltStyle によって変換されたページ (->オリジナル) /