Enable Thread Safety in PHP+Apache2 on Ubuntu - compiling php from source with pthreads -


i'm trying pthreads running on ubuntu-server (14.04) after installed apache2 , php5 via apt-get. initial steps:

  1. installed apache2 - apt-get install apache2
  2. installed php5 usual modules apt-get install php5 libapache2-mod-php5 php5-mcrypt ...

then followed tutorial pthreads running (user contributed manual on php.net):

1 - php version example use version: 5.4.36 # wget http://www.php.net/distributions/php-5.4.36.tar.gz  2- pthreads version: i'm using old version but, take on # wget http://pecl.php.net/get/pthreads-1.0.0.tgz  extract both, php , pthreads versions  #tar zxvf php-5.4.36.tar.gz #tar zxvf pthreads-1.0.0.tgz  3- move pthreads php/ext folder. inside version of php downloaded @ item 1.  4- reconfigure sources # ./buildconf --force # ./configure --help | grep pthreads  have see --enable-pthreads listed. if not, clear buidls commands:  # rm -rf aclocal.m4 # rm -rf autom4te.cache/ # ./buildconf --force  5 - inside php folder run configure command set need: # ./configure --enable-debug --enable-maintainer-zts --enable-pthreads   --prefix=/usr --with-config-file-path=/etc 6 - install php run make clear sure no other crashed build mess our new one.  # make clear # make # make install  7 - copy configuration file of php , add local lib include path # cp php.ini-development /etc/php.ini  edit php.ini , set include_path this:  include_path = “/usr/local/lib/php”  9 - check modules # php -m (check pthread loaded)  have see pthreads listed  10 - if pthread not listed, update php.ini # echo "extension=pthreads.so" >> /etc/php.ini 

everything works fine until step 7. there new directory (seems make install - outcome) in /usr/lib/php .

now don't know how handle replacing existing php-installation new one.

where have copy php.ini-development step 7?

i tried cp php.ini-development /etc/php.ini had no effect on existing installation.

how can new-compiled php working in / apache2?

i found 3 php.ini-files initial installation on server:

/etc/php5/apache2/php.ini  /etc/php5/fpm/php.ini  /etc/php5/cli/php.ini 

create file in webserver's root folder (or folder can access browser). inside file write following , save phpinfo.php:

<?php phpinfo(); ?> 

when access file browser, see configuration of php engine parsed file. somewhere there path php.ini file, 1 need modify.

usually, if using mod_php5 php.ini should 1 located under apache2 folder; if using php-fpm should 1 under fpm, way know 1 using issue phpinfo().


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -