Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2013-01-28 17:42:07

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 335
Website

PHP 5.3.10 and older versions of Textpattern

Our server currently has PHP 5.2.17 – we are preparing to upgrade it to PHP 5.3.10 due to some code requirements.

I host about 20 sites that use Textpattern. Some are on older versions of Textpattern intentionally, to avoid breaking a site that works (older plugins that may not work with newer versions of Textpattern.

Will upgrading to PHP 5.3.10 break any older versions of Textpattern? I do have a couple sites on 4.08, some on 4.20, 4.30.

Offline

#2 2013-01-28 17:51:18

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: PHP 5.3.10 and older versions of Textpattern

You should upgrade those TXP installs anyway for security reasons. 4.4.0 and 4.4.1 had significant security fixes. Even 4.5 has some security fixes (which don’t affect all users).

Offline

#3 2013-01-28 17:51:58

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,260
Website GitHub Mastodon Twitter

Re: PHP 5.3.10 and older versions of Textpattern

towndock wrote:

Will upgrading to PHP 5.3.10 break any older versions of Textpattern? I do have a couple sites on 4.08, some on 4.20, 4.30.

I think that it will! I had the same problem with one of my sites which uses a currently replaceable plugin but I found that by using a couple of development files, all is working just fine on txp4.4.1 and php5.4.8.

the files I have changed are /textpattern/index.php, /textpattern/lib/txplib_misc.php, /textpattern/lib/classTextile.php. If you want I can send them to you.

Edited to add that ruud’s suggestion is a better way to go. I guess it all depends on what plugins the sites are using and how important they are to the sites.

Last edited by colak (2013-01-28 17:56:02)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2013-01-28 18:35:35

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 335
Website

Re: PHP 5.3.10 and older versions of Textpattern

I understand the security fixes, but an answer to the question would be helpful, if it is available.

If we don’t know, that’s OK. But if we do know, for example, does it break everything 4.20 and older, or?

Offline

#5 2013-01-28 18:57:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: PHP 5.3.10 and older versions of Textpattern

towndock wrote:

I understand the security fixes, but an answer to the question would be helpful, if it is available.

These mentioned vulnerabilities are well known and critical. Anyone can, for instance, execute any PHP code on the server, granting full access to the whole system. No authentication required, no nothing. Just simple request with one HTTP POST field containing the payload.

But if we do know, for example, does it break everything 4.20 and older, or?

The first fully PHP 5.3 compatible release is Textpattern 4.2.0. You will at least get deprecation notices you will need to suppress, configure timezone on your own and creating thumbnails doesn’t work properly. There are also some compatibility issues in Textile, I believe.

Offline

#6 2013-01-28 19:43:17

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 335
Website

Re: PHP 5.3.10 and older versions of Textpattern

Well, it is Monday. I’ll accept my whipping by two Textpattern developers in two hemispheres, and upgrade some sites…

Offline

#7 2013-01-28 19:43:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: PHP 5.3.10 and older versions of Textpattern

towndock wrote:

I understand the security fixes, but an answer to the question would be helpful, if it is available.

In TXP 4.0.7 on PHP 5.3.3, I get:

Deprecated: Function set_magic_quotes_runtime() is deprecated in /path/to/textpattern/lib/txplib_db.php on line 14
Deprecated: Function split() is deprecated in /path/to/textpattern/include/txp_auth.php on line 144 

That’s on the admin side. On the public side just the txplib_db error.

That txp_lib error can be fixed by commenting out line 14 (which was there mainly for PHP4)
The split error is not pretty but it’s still just a warning (in PHP 5.3). And it’s only on the admin side.

The above assumes that the website is not in testing/debug mode, because if it is, then you’ll get a lot more warnings.

So you could probably upgrade PHP without too much breakage and then focus on upgrading TXP… or the other way around, depending on how big the security issues with your current PHP version are compared to those in the old TXP installs ;)

Offline

#8 2013-01-28 22:16:46

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 335
Website

Re: PHP 5.3.10 and older versions of Textpattern

That’s great news – thank you much Ruud. I’ll be upgrading everything to at least 4.41, but it’s great to know that upgrading PHP won’t really cause a serious problem to older installs.

Offline

Board footer

Powered by FluxBB