php7 and Pthreads + ZTS
Hello all ,
Since EasyApache 3 in Deprecation mode, so we have to move to the EasyApache 4 which is what i did .
unfortunately PHP7 RPM dos not support ZTS in order to install Pthreads !
I did contact Support, thy side
Unfortunately I am seeing that EasyApache has dropped support for ZTS. It does not look like it would be possible in EasyApache 4, as enabling this feature can only be done during the build process and cannot be done post-build.
I do see the issue though, as pthreads requires PHP 7 and is not available in EasyApache 3. The only thing I can think that may work is revert to EasyApache 3 and use PHP 5.6 with an older pthreads package installed through pecl. We do apologize for any inconvenience and greatly appreciate your understanding.
Thy advice me to go back to EasyApache 3 !!! Ok, i do understand that adding ZTS support is not as click of button ! and we need to recompile the php7 source and install the RPM Please Cpane, you have 2 options 1 - Make a blog an Easy Step By Step, of how to install this, php7 with pthreads support. 2 - Support it in EasyApache 4 as an option. it is our right to use pthreads with php7
Thy advice me to go back to EasyApache 3 !!! Ok, i do understand that adding ZTS support is not as click of button ! and we need to recompile the php7 source and install the RPM Please Cpane, you have 2 options 1 - Make a blog an Easy Step By Step, of how to install this, php7 with pthreads support. 2 - Support it in EasyApache 4 as an option. it is our right to use pthreads with php7
-
Hello, More information on the decision to compile PHP without thread safety is available at: PHP: Installation - Manual Could you provide some more information on why you prefer to use thread safety? Do certain applications fail when it's disabled? Thank you. 0 -
Could you provide some more information on why you prefer to use thread safety? Do certain applications fail when it's disabled?
Thank you for your replay. A lot of my clients asked me directly to upgrade to php7, some of them ask for that cos there application programmed with php7. Now, the problem that i have, there applications need "thread" to work in backgrounds without using "fork, exec ,popen" functions. Now it seem to be no option but compile php7 with ZTS. which i think cpanel has to provide as an option in WHM EasyApache . Compiling it by my self may not the best option since it may not be as Cpanel System required. So i kindly ask you to Ask your team stuff to provide such thing in WHM / EasyApache ASAP0 -
Ok, i understand new thing, i need to seting php to be FAST-CGI. and use "non-thread-safe" . I did that using this DOC Configure PHP-FPM with User Pools for EasyApache 4 - cPanel Knowledge Base - cPanel Documentation Thanks Cpanel. Now how to install "non-thread-safe" to run thread via Command Line ! 0 -
Now new thing i understand it .. installing FASTCGI is the way how apachi work with php, but you still need to install Pthreads + ZTS, in order to code threads :) root@server [/home/mybeshoo/www]# php -v PHP 7.0.10 (cli) (built: Aug 25 2016 16:20:03) ( NTS ) <-------------- Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies root@server [/home/mybeshoo/www]# But when i run : [PHP]i=$i; } public function run(){ while(true){ echo $this->i; sleep(1); } } } for($i=0;$i<50;$i++){ $workers[$i]=new workerThread($i); $workers[$i]->start(); } ?> [/PHP] Fatal error: Class 'Thread' not found in /home//public_html/test.php on line 3 Correct me please 0 -
I think i am a bit confuse . [LIST] - ZTS Enabled is : ( Thread Safety ) whish is not good thats is why FastCGI is installed to avoid using ( Thread Safety )
- Then ! how for God Sake we will code Thread in php ! It seems no way !
0 -
Ok, i understand new thing, i need to seting php to be FAST-CGI. and use "non-thread-safe" . I did that using this DOC Configure PHP-FPM with User Pools for EasyApache 4 - cPanel Knowledge Base - cPanel Documentation Thanks Cpanel.
The information in this document only pertains to cPanel & WHM version 56 and earlier. It's not recommended for use on cPanel 58. I advise against using these instructions, as they are not compatible with FPM support that's currently planned for cPanel version 60: Enhance FPM support Thank you.0
Please sign in to leave a comment.
Comments
6 comments