How to install PHP pthreads or ZTS?
I'm trying to use threads in PHP, so I need to install pthreads. It would be nice if EasyApache would have an option for pthreads. But I couldn't find it, so I tried installing it with the pecl command:
pecl install pthreads
But this complained at me saying:
error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
So I tried looking in EasyApache for a PHP ZTS module, but I couldn't find it either.
Can anyone help me? Has anyone got pthreads working with EasyApache or cpanel?
If not, it might be possible to recompile PHP myself, but would cPanel even let me do that?
Is my only option to uninstall cPanel?
Thanks.
-
Hello :) You could try creating and editing a rawopts file for PHP 5 as described here: [url=http://docs.cpanel.net/twiki/bin/view/EasyApache/EasyApacheRawOpts]EasyApache: Raw Opts The following entry might be suitable in this file: --enable-maintainer-zts
Thank you.0 -
Thank you Michael. In fact, I was trying that right now, and it worked. For anyone else reading this, this is what I did: echo -enable-maintainer-zts >> /var/cpanel/easy/apache/rawopts/all_php5 Then I recompiled with this command: /usr/local/cpanel/scripts/easyapache Then I installed pthreads with pecl like this: pecl install pthreads Now it works, so I'm happy. 0 -
[quote="magmatic, post: 1557822">Thank you Michael. In fact, I was trying that right now, and it worked. For anyone else reading this, this is what I did: echo -enable-maintainer-zts >> /var/cpanel/easy/apache/rawopts/all_php5 Then I recompiled with this command: /usr/local/cpanel/scripts/easyapache Then I installed pthreads with pecl like this: pecl install pthreads Now it works, so I'm happy.
I did the same and it was all ok. The installation of ZTS and pthreads was taken using Easy :: Apache v3.24.11. In my phpinfo appears phtreads extension, but when I run a script he presents the errors below. One of ZendOptmizer and Ioncube, it must have lost his way in the rebuild. The other malformed header. Can help me eliminate these errors happened only after the need ZTS and pthreads. As the error malformation referece to the script, the script follows the pastbin, do not know where something's wrong. phpinfo() /http://www.rendawbs.com/fb/phpinfo.php script cron.php /http://pastebin.com/PwADPg4S Errors [Thu Feb 27 11:52:02 2014] [error] [client 198.91.92.190] Failed loading /usr/local/IonCube/ioncube_loader_lin_5.4.so: /usr/local/IonCube/ioncube_loader_lin_5.4.so: undefined symbol: executor_globals [Thu Feb 27 11:52:02 2014] [error] [client 198.91.92.190] Failed loading /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: undefined symbol: compiler_globals [Thu Feb 27 11:53:30 2014] [error] [client 186.207.60.54] malformed header from script. Bad header=
apiSEND is Thread #1397080: cron.php0 -
I installed the pthreads but I need to keep the modules ZendGuard and IonCube working extension. After getting the errors I reported checking the logs in apache: /usr/local/apache/logs/error_log The staff of Customer Support cPanel helped me with the following message: cPanel support can not assist you with manually installing the IonCube and Zend Thread Safety loaders. The official Ioncube loaders are available for download here: [url=http://www.ioncube.com/loaders.php]Loader Download - PHP Encoder, protection, installer and performance tools from ionCube The Zend loaders are available for download here: [url=http://www.zend.com/en/products/guard/downloads]Download Zend Guard - Zend.com The thread-safe versions of each loader can be copied to the same location to the original loaders and then the /usr/local/lib/php.ini file and any custom site-specific php.ini files will need to be modified to load the correct thread-safe version of each loader instead of the non-thread-safe version. I did the manual installation procedure as advised. And the IonCube loader has been resolved. changed the php.ini to (non-thread-safe version): zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.4.so"
for (thread-safe version):zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.4_ts.so"
Have the loader's ZendGuard not yet been resolved. Read by the Zend forum, loaders that are both TS and non-TS so a single. And the error in /usr/local/apache/logs/error_log is: [Wed Mar 05 12:09:02 2014] [error] [client 198.91.92.190] Failed loading /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: undefined symbol: compiler_globals And command php -v root@server [~]# php -v Failed loading /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: /usr/local/Zend/lib/Guard-6.0.0/php-5.4.x/ZendGuardLoader.so: undefined symbol: compiler_globals PHP 5.4.25 (cli) (built: Mar 5 2014 10:07:37) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with the ionCube PHP Loader v4.5.3, Copyright (c) 2002-2014, by ionCube Ltd. How can I solve this. There is a hidden specific download. I appreciate any help or hint ???0
Please sign in to leave a comment.
Comments
4 comments