0

I have a server which has PHP5 installed. I need pthreads and found that link to install php5 with pthreads:

PHP5 installation with pthreads

I install all the packages I need with apt-get install. I have no idea about what a make file is, how to compile a source code etc. I am a web developer with limited OS knowledge.

I have followed the steps given in the link above. At the last command on step 4, I get an error because /opt/php-zts/modules.d/ does not exist.

I simply wanted to replace existing php with a new php installation that supports pthreads. Now, the server code does not work.

How can I install PHP5 with pthreads enabled so that it will replace existing PHP5 installation that I installed with sudo apt-get install php5 libapache2-mod-php5?

Also, I have another question. I need some other packages like php-curl. Can I install them with sudo apt-get install php-curl after I succesfully install PHP? Do these commands work with custom builds?

Edit: how-to-install-pthread-in-ubuntu-12-10 This is not a solution for my problem because I don't want an isolated installation. I want the installation to replace already existing php installation.

Community
  • 1
  • 1
zarax
  • 871
  • 1
  • 10
  • 30
  • Hmm, can I ask why PHP 5.6 and not directly PHP 7.0? – Charlotte Dunois Jan 30 '16 at 18:37
  • Possible duplicate of [how to install pthread in ubuntu 12.10](http://stackoverflow.com/questions/18033191/how-to-install-pthread-in-ubuntu-12-10) – Charlotte Dunois Jan 30 '16 at 18:37
  • We do not think about migrating to PHP 7.0 currently as it might break current production code. First we need to test it and we do not have time for that right now. – zarax Jan 30 '16 at 18:48
  • @CharlotteDunois That problem is not a solution for me. I do not want an isolated installation. I want to replace existing installation. – zarax Jan 30 '16 at 18:49
  • Well, your linked gist also makes an isolated installation. Quick google search: https://blog.flowl.info/2015/compile-php-5-6-pthreads-mongo-ubuntu/ – Charlotte Dunois Jan 30 '16 at 18:50
  • @CharlotteDunois That is why I asked this question. I do not want an isolated installation. I tried that to see if I can install php with pthreads. It failded. If it would succeed, I was going to try an installation to replace old one. – zarax Jan 30 '16 at 18:53
  • I also saw the page you posted. I have seen tens of pages like that. But most of them install packages I don't need and I dont know how to change installation steps. Also most of the examples are for isolated installation. – zarax Jan 30 '16 at 18:55
  • 2
    Replacing your existing PHP install with a threaded version is a bad idea. The PHP extensions distributed with your OS are not compatible with a threaded PHP; you will end up with a messy situation if you try to "mix and match" the two, particularly if you aren't comfortable installing it yourself already. –  Jan 30 '16 at 19:52
  • Thanks for your comment. Can we use pthreads if we make an isolated installation? – zarax Jan 30 '16 at 20:14

0 Answers0