質問

I have compiled php 5.5.9 with ZTS and phtreads support enabled using this instructions: http://eddmann.com/posts/compiling-php-5-5-with-zts-and-pthreads-support/

Everything seems alright, extension installed, server restarted, but when I try to use threads, I get an 500 Fatal error: "PHP Fatal error: Class 'Thread' not found"

Could you tell me what I am missing?

*I did add pthreads extension to php.ini

enter image description here

OS: Ubuntu 10.04

Ty

役に立ちましたか?

解決

If the extension is loaded in CLI and not in Apache, IIS, or insert SAPI here, it is down to the distribution using a separate mod_php5 for apache, and CLI package for the command line; when a SAPI that requires a shared library is configured, like Apache's mod_php5.so, the library produced by PHP - libphp5.so - is only used for the apache module, the CLI binary does not link against it. This means packagers can distribute php-apache2 and php-cli (for example) packages independently, easy for them. It also means you have two isolated installations of the PHP interpreter, whether you like it or not.

You need to find a package that contains mod_php5.so built in ZTS mode for your distribution.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top