Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

PHP 5.5 upgrade

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

PHP 5.5 upgrade
  • Quote

Post by drMacFaulty » Thu Mar 06, 2014 8:03 pm

Hello,

I'm new to VestaCP and have a question.
I tried installing PHP 5.5 (most recent one) and after that Apache wouldn't start because it isn't thread safe.

My question is, why is this PHP version (5.4.4) compiled as thread safe? What's the advantage, because the PHP site itself tells you not to do it, because of stability and (possibly) security issues?

Is there a possibility to upgrade to PHP 5.5? Do I need to recompile PHP for this? How would I accomplish this?

Just a few beginners questions :) Hope it isn't too much :)

Kind Regards

edit: Already found a thread in the russian forum, but Google Translate won't let me understand everything :) I also don't speak / write Russian, so no go :(
Top

drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

Re: PHP 5.5 upgrade
  • Quote

Post by drMacFaulty » Fri Mar 07, 2014 8:49 pm

Anybody?
Top

ken
Posts: 15
Joined: Fri Feb 28, 2014 5:20 am

Re: PHP 5.5 upgrade
  • Quote

Post by ken » Fri Mar 07, 2014 10:56 pm

drMacFaulty wrote:Anybody?
Can you post the following outputs? I'm curious when it was built because I cannot replicate it. Also can you check if apache is running prefork or worker MPM? Prefork shouldn't need thread safety.

Code: Select all

# php -v
PHP 5.4.25 (cli) (built: Feb 11 2014 08:48:29)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

# php -i | grep Thread
Thread Safety => disabled
Top

drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

Re: PHP 5.5 upgrade
  • Quote

Post by drMacFaulty » Sat Mar 08, 2014 7:11 pm

Sure, no problem.

Here is the output of both commands:

Code: Select all

# php -v
PHP 5.4.4-14+deb7u7 (cli) (built: Dec 12 2013 10:55:22) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
    with XCache v2.0.0, Copyright (c) 2005-2012, by mOo
    with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

Code: Select all

# php -i | grep Thread
Thread Safety => disabled
Thread Safety is disabled. But if I install PHP 5.5 from dotdeb.org via APT, then Apache won't start, because PHP is not compiled as thread safe.

Apache is using prefork:

Code: Select all

# /usr/sbin/apache2 -l
  core.c
  mod_log_config.c
  mod_logio.c
  mod_version.c
  prefork.c
  http_core.c
  mod_so.c
I have PHP 5.5 and Apache2 running on standalone installation and that's no issue.

Anything I can do next? What is the regular update procedure for PHP? I usually install it via APT from dotdeb.org.
I am currently on Debian Wheezy (x86).

edit: This is a fresh install from a few days ago.
edit2: What eats less RAM: event of prefork?
Top

ken
Posts: 15
Joined: Fri Feb 28, 2014 5:20 am

Re: PHP 5.5 upgrade
  • Quote

Post by ken » Sun Mar 09, 2014 4:57 am

edit: This is a fresh install from a few days ago.
edit2: What eats less RAM: event of prefork?
Prefork spawns a new process for each request. Worker and Event are threaded so less processes means less overhead.

Here's a pretty simple perspective: http://www.vps.net/blog/2013/04/08/apac ... and-event/

The NGINX proxy that comes packaged with Vesta should significantly offload some of the burden from Prefork though. For general hosting clients it's recommended that you stick with Prefork as some applications will without a doubt run into issues with Worker/Event. If you have some high transaction applications on dedicated (virtual included) machines that's where threaded apache modules shine.

In regards to the thread safety, to be honest I'm still new to Vesta as well but wanted to help as much as I could until someone responded. I'd have to look into this more as I'm not sure how they compiled things or why yet. Skid or Imperio might have some better insight.
Top

drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

Re: PHP 5.5 upgrade
  • Quote

Post by drMacFaulty » Thu Mar 13, 2014 7:15 am

ken wrote:
edit: This is a fresh install from a few days ago.
edit2: What eats less RAM: event of prefork?
Prefork spawns a new process for each request. Worker and Event are threaded so less processes means less overhead.

Here's a pretty simple perspective: http://www.vps.net/blog/2013/04/08/apac ... and-event/

The NGINX proxy that comes packaged with Vesta should significantly offload some of the burden from Prefork though. For general hosting clients it's recommended that you stick with Prefork as some applications will without a doubt run into issues with Worker/Event. If you have some high transaction applications on dedicated (virtual included) machines that's where threaded apache modules shine.

In regards to the thread safety, to be honest I'm still new to Vesta as well but wanted to help as much as I could until someone responded. I'd have to look into this more as I'm not sure how they compiled things or why yet. Skid or Imperio might have some better insight.
Thanks for the reply. I'm sorry I couldn't answer more quickly, due to some health issues :) It's going already a bit better now.

I'll wait for the answer then :)

Your help is much appreciated!
Top

drMacFaulty
Posts: 88
Joined: Thu Mar 06, 2014 7:52 pm
Contact:
Contact drMacFaulty
Website

Re: PHP 5.5 upgrade
  • Quote

Post by drMacFaulty » Sun Mar 16, 2014 7:50 pm

I figured it out why Apache wasn't starting. For some weird reason it automatically installed the mpm worker compiled version (apache2-mpm-worker that is). When I did apt-get install apache2-mpm-prefork, everything was back to normal.

Thanks for the support everybody! :-)
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password