note 116368 added to pthreads.installation
| From: | MichelPhillipeLuca | Date: | Sat, 20 Dec 2014 19:38:44 +0000 |
| Subject: | note 116368 added to pthreads.installation | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201230@lists.php.net to get a copy of this message | ||
Here is how I got it working under Linux Ubuntu distro - WITHOUT USE PECL:
We will download both, PHP and Pthread without PECL
1 - Get PHP version
For this example we will use version: 5.4.36
# wget http://www.php.net/distributions/php-5.4.36.tar.gz
2- Get Pthreads version:
I'm using an old version but, you could take any one
# wget http://pecl.php.net/get/pthreads-1.0.0.tgz
Extract both, php and pthreads versions
#tar zxvf php-5.4.36.tar.gz
#tar zxvf pthreads-1.0.0.tgz
3- Move Pthreads to php/ext folder. Inside version of PHP downloaded at item 1.
4- Reconfigure sources
# ./buildconf --force
# ./configure --help | grep pthreads
You have to see --enable-pthreads listed. If do not, clear the buidls with this commands:
# rm -rf aclocal.m4
# rm -rf autom4te.cache/
# ./buildconf --force
5 - Inside php folder run configure command to set what we need:
# ./configure --enable-debug --enable-maintainer-zts --enable-pthreads --prefix=/usr
--with-config-file-path=/etc
6 - Install PHP
We will run make clear just to be sure that no other crashed build will mess our new one.
# make clear
# make
# make install
7 - Copy configuration file of PHP and add local lib to include path
# cp php.ini-development /etc/php.ini
Edit php.ini and set Include_path to be like this:
Include_path = â/usr/local/lib/phpâ
9 - Check Modules
# php -m (check pthread loaded)
You have to see pthreads listed
10 - If pthread is not listed, update php.ini
# echo "extension=pthreads.so" >> /etc/php.ini
----
Server IP: 72.52.91.14
Probable Submitter: 189.38.181.236
----
Manual Page -- http://php.net/manual/en/pthreads.installation.php
Edit -- https://master.php.net/note/edit/116368
Del: integrated -- https://master.php.net/note/delete/116368/integrated
Del: useless -- https://master.php.net/note/delete/116368/useless
Del: bad code -- https://master.php.net/note/delete/116368/bad+code
Del: spam -- https://master.php.net/note/delete/116368/spam
Del: non-english -- https://master.php.net/note/delete/116368/non-english
Del: in docs -- https://master.php.net/note/delete/116368/in+docs
Del: other reasons-- https://master.php.net/note/delete/116368
Reject -- https://master.php.net/note/reject/116368
Search -- https://master.php.net/manage/user-notes.php