启用线程安全的服务器php
问题描述:
我正在尝试在php中以及在Windows上使用xampp实现线程,我可以做到这一点, 但是我有一个带有cpanel的linux服务器,并且在配置中禁用了线程安全,如何在我的服务器linux上启用它? 我叫phpinfo(),它表明线程安全"已禁用
I'm trying to implement threads in php and with xampp on windows I can do this, however i have a linux server with cpanel and in configurations the Thread Safety is disabled, how can i put enabled on my server linux? I call phpinfo() and it shows that "Thread Safety" is disabled
答
您有两个选择:
- 在您的分发程序包存储库中找到一个线程安全的程序包
- 使用
--enable-maintainer-zts
从源代码编译PHP
- Find a thread safe package in your distributions package repository
- Compile PHP from source with
--enable-maintainer-zts
我非常确定cPanel具有一个配置屏幕,可让您重新配置和重建,一个快速的Google会对此进行显示,这似乎是相关的:
I'm quite sure cPanel has a configuration screen that will allow you to reconfigure and rebuild, a quick google turns up this, which appears relevant:
http://forums.cpanel.net/f442/how-install-php-pthreads-zts-387252.html