We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
PHP 5.5 upgrade
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
PHP 5.5 upgrade
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 :(
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 :(
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: PHP 5.5 upgrade
Anybody?
Re: PHP 5.5 upgrade
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.drMacFaulty wrote:Anybody?
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
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: PHP 5.5 upgrade
Sure, no problem.
Here is the output of both commands:
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:
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?
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
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
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?
Re: PHP 5.5 upgrade
Prefork spawns a new process for each request. Worker and Event are threaded so less processes means less overhead.edit: This is a fresh install from a few days ago.
edit2: What eats less RAM: event of prefork?
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.
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: PHP 5.5 upgrade
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.ken wrote:Prefork spawns a new process for each request. Worker and Event are threaded so less processes means less overhead.edit: This is a fresh install from a few days ago.
edit2: What eats less RAM: event of prefork?
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.
I'll wait for the answer then :)
Your help is much appreciated!
-
- Posts: 88
- Joined: Thu Mar 06, 2014 7:52 pm
- Contact:
Re: PHP 5.5 upgrade
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! :-)
Thanks for the support everybody! :-)