Compile PHP 5.5 For Threading

Remove old php package

  • yum erase php*

install epel – note, this link may be outdated!
see here for the latest:

  • rpm Uvh
  • cd /usr/src
  • wget
  • tar jxf php5.5.25.tar.bz2
  • cd php5.5.25
  • yum install wget libxml2devel httpddevel libXpmdevel gmpdevel libicudevel t1libdevel aspelldevel openssldevel bzip2devel libcurldevel libjpegdevel libvpxdevel libpngdevel freetypedevel readlinedevel libtidydevel libxsltdevel y
  • yum install libmcryptdevel y
  • yum install gcc make install zlibdevel readlinedevel libxml12devel openssldevel libmcryptdevel curldevel bzip2devel xml2config


./configure withlibdir=lib64 prefix=/usr/local withlayout=PHP withpear withapxs2 enablecalendar enablebcmath withgmp enableexif withmcrypt withmhash withzlib withbz2 enablezip enableftp enablembstring withiconv enableintl withicudir=/usr withgettext withpspell enablesockets withopenssl withcurl withgd enablegdnativettf withjpegdir=/usr withpngdir=/usr withzlibdir=/usr withxpmdir=/usr withvpxdir=/usr withfreetypedir=/usr witht1lib=/usr withlibxmldir=/usr withmysql=mysqlnd withmysqli=mysqlnd withpdomysql=mysqlnd enablesoap withxmlrpc withxsl withtidy=/usr withreadline enablepcntl enablesysvsem enablesysvshm enablesysvmsg enableshmop enablemaintainerzts
make install
cp php.iniproduction  /usr/local/lib/php.ini
Install the pthreads extension
  • pecl install pthreads2.0.10
  • #Add the following line to your php.ini at /usr/local/lib/php.ini