Which version of php?

Hello,

I’m planning to upgrade php 5.3.3 to a newer version. On the server is only one account with own developed content so the deprecated functions are not problem. We don’t use MySQL, we won’t have problem with new hashing algorithm.

The most important goal to make the server more secure and reduce memory usage. I checked comparison videos, articles but I can’t choose :slight_smile:

Which version do you recommend?

Thanks!

Hi dss

I personally would go with 5.6 or 5.8. Licensecart has posted an excellent tutorial for upgrading php and MySQL

I do not like to use the newest release until after 6 months and proven to be stable, where a lot of fixes may have taken place but this is production servers only. Test servers I’d use latest if I needed.

Please do not update IW php version or you could break IW.

MySQL hashing issue only appears if you set my.cnf to off for compatibility

I hope that helps

Many thanks

John

Thank you, John!

Of course, I don’t want to update IW php.
php 5.6 was released in Aug 2014, it’s around 6 month. Which version are you using on your production servers? What is your experience after upgrading?

Hi dss

To be honest, we use various php on different servers depending on the server.

If it’s shared and not dedicated, and there are a lot of sites on it, we have to fully schedule for any php changes, as some sites may fail if we arbitrarily upgrade, whereas dedicated is quicker, but depending upon the client, they may not want to upgrade, unless it is critical too.

If we put a new production server in use, we always make sure it is latest version plus 6 months, or inform clients it is the very latest and may be upgraded as needed.

The versions of php we run are 5 to 5.6, on centos and windows.

I hope that helps, and I’m sure other users will have their own preferences.

Many thanks

John

I use PHP 5.4 myself but I am moving to 5.6 for my server with InterWorx 5.1 when it comes out.

So it looks like 5.6 is stable to use production server. Are you using suhosin patch? What do you think is it good to have or is it unnecessary?

I don’t like suhosin, but I don’t host websites, just my own.

Hi dss and mike

That’s strange, if you look at IW repo legacy, you will see it used to contain suhosin, which I’m sure I check led a few years ago and it showed but not now in current versions.

I’m thinking there must be a reason for this, perhaps later php versions are more secure or perhaps it’s an oversight, or even perhaps it has been left to server admins to decide.

I personally would want to test this on a test server, but if you install suhosin and it causes issues, you could disable it from php.ini

I hope that helps a little

Many thanks

John

[QUOTE=d2d4j;27071]Hi dss and mike

That’s strange, if you look at IW repo legacy, you will see it used to contain suhosin, which I’m sure I check led a few years ago and it showed but not now in current versions.

I’m thinking there must be a reason for this, perhaps later php versions are more secure or perhaps it’s an oversight, or even perhaps it has been left to server admins to decide.

I personally would want to test this on a test server, but if you install suhosin and it causes issues, you could disable it from php.ini

I hope that helps a little

Many thanks

John[/QUOTE]

Yeah SuHosin was a PHP 5.3, it wasn’t updated to support PHP 5.4+ but someone has made a new edit but if it’s good or not that’s another story, I don’t recommend it or use it :stuck_out_tongue: http://en.wikipedia.org/wiki/Suhosin

Thank you for your reply! I installed 5.6.6 without SuHosin patch.

You’re welcome :slight_smile: I’ve re-done the PHP 5.6 ioncube loader scripts for InterWorx if you need them.

So I took a look at this thread: http://forums.interworx.com/threads/8035-php-update-error?p=25591#post25591 on the SCL repo.

It looks like this repo doesn’t replace the current PHP, but instead adds it as php54. What’s the recommend way to get this loaded as the default setup for a NodeWorx system?

Hi justin

IW uses 2 php versions, php 5.3.8 for IW (which should not be changed) itself, and if default php for hosting account, is ver 5.3.8, but this can be updated to which php version you want.

To check, goto nodeworx, system settings, web server, and php info is at the bottom, which will display the php version used by hosting accounts.

I hope I have understood your post correctly, sorry if I have not.

Many thanks

John

Hi John, I was speaking only in user side of it, nothing to do with InterWorx.

When using the SCL repo, it doesn’t replace the built in PHP 5.3.x version that comes with CentOS 6, but rather lets you install php54 (not php). So I was asking how to make the php54 act as the main PHP for the system. Because even if you install that php54 from the SCL package, your sites (as far as I understand it) would still use the base php.

I’ve actually gone ahead and use the other remi repo which replaces the base install so I don’t even have to worry about this two PHP setup anymore.

I see the same REMI repo has PHP 5.5 as well (under a php55, but still installs to the base PHP install). Although when I did the check updates it shows some obsolete packages.
So I’m a bit confused as to what this is saying. Does that mean that both php-mysqlnd 5.5.24 and php-mysql 5.4.40 are being deleted? Does it mean that php-mysqlnd is being installed and php-mysql is being deleted?

My logical thought is it means that php-mysqlnd is going to be installed instead of php-mysql by default. After doing the update I could then remove php-mysqlnd and put back in php-mysql.

Anyone have tips on this? I’d like to use the new password_hash features built right into PHP 5.5 (and drop the include file that serves the same purpose).

Thanks!

Update: And another reason this is important to know is it seems InterWorx doesn’t like running on mysqlnd if you see my other post here: http://forums.interworx.com/threads/8276-Best-way-to-move-from-php-mysql-to-php-mysqlnd

Here’s the update output:


php.x86_64                          5.5.24-1.el6.remi                 remi-php55
php-cli.x86_64                      5.5.24-1.el6.remi                 remi-php55
php-common.x86_64                   5.5.24-1.el6.remi                 remi-php55
php-devel.x86_64                    5.5.24-1.el6.remi                 remi-php55
php-gd.x86_64                       5.5.24-1.el6.remi                 remi-php55
php-mbstring.x86_64                 5.5.24-1.el6.remi                 remi-php55
php-mcrypt.x86_64                   5.5.24-1.el6.remi                 remi-php55
php-pdo.x86_64                      5.5.24-1.el6.remi                 remi-php55
php-process.x86_64                  5.5.24-1.el6.remi                 remi-php55
php-xml.x86_64                      5.5.24-1.el6.remi                 remi-php55
php-xmlrpc.x86_64                   5.5.24-1.el6.remi                 remi-php55
[B]Obsoleting Packages
php-mysqlnd.x86_64                  5.5.24-1.el6.remi                 remi-php55
    php-mysql.x86_64                5.4.40-1.el6.remi                 @remi[/B]

I’m installing a php script that requires MCrypt to be installed, is it best to manually compile PHP? Or does IW offer the option to recompile it for me with it included?

For example under WHM you could recompile directly from with in WHM with the modules you wanted installed.

Thanks!

Hi Katronix
You should not need to recompile php, you should just need to install mcrypt.
If your not too sure how to, just ssh into server, yum install mcrypt or su yum install mcrypt I think from memory.
Many thanks
John

As I remember mcrpyt is php-mcrypt, but it is possible to install via yum, recompile not needed.

Hi dss

Many thanks, your absolutely correct sorry.

It is php-mcrypt and I must be getting too old.

Many thanks

John