Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-01-20 19:23:45

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Fatal Error on Login

Hi Guys

Suffered a hacked installation on an old version of Textpattern. All passwords changed, updated to the latest version of Textpattern and logged in. PHP error was the first problem – the server was on 5.1, so quick ticket to host and PHP was updated to 5.3. This allowed log in and access to diagnostics, but it threw a huge number exceptions at me – first with lib files appearing to be different and then telling me that most of the other Textpattern files were svn, which was not what I intended at all!

So I started from scratch, deleted the three root files, rpc directory and textpattern directory and re-uploaded a newly downloaded version of 4.5.7 .

Now I get access to a blank Write page, Logged in as is empty and the message;

Fatal error: Call to undefined function json_encode() in /var/www/html/textpattern/lib/txplib_html.php on line 28

Any attempt to access Admin or any other tabs logs me out immediately…..

Help???!!!!!

Offline

#2 2015-01-20 19:44:28

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

Re: Fatal Error on Login

Try visiting /textpattern/index.php?event=diag&step=high on your website. What does it show?

Offline

#3 2015-01-20 19:57:42

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: Fatal Error on Login

That sounds like either pre-5.2 PHP or PHP compiled without JSON support; if support did a quick-style update to 5.3, I would wager it’s the JSON thing.

Edit: make a file on your server called lemoncake.php and put this into it:

<?php phpinfo(); ?>

Load it in a browser. Search the page for the json header and you should see json support listed – it needs to be enabled for Textpattern to work. If it’s disabled, you’ll have to contact your host to have them reinstall or recompile with JSON support.

Delete lemoncake.php as soon as you’re done. The type of cake is not important, but filenames like info.php and phpinfo.php are regularly searched for; with your site being hacked before, it’s smart to keep this low profile.

Last edited by gaekwad (2015-01-20 20:05:52)

Offline

#4 2015-01-20 20:06:33

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Fatal Error on Login

Visiting /textpattern/index.php?event=diag&step=high gives the same result, simply presenting the login page and nothing else.

If its a JSON thing, what should I ask support to do? Re-install PHP compiled with JSON support?

Many thanks

Offline

#5 2015-01-20 20:09:52

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: Fatal Error on Login

Leithen wrote #287573:

If its a JSON thing, what should I ask support to do? Re-install PHP compiled with JSON support?

Yep. JSON is included in PHP installs usually, which makes this a bit strange. Try the phpinfo() business I mentioned above to confirm it’s JSON.

Edit: I think JSON support came in with 5.2, so the upgrade from 5.1 to 5.3 might not have taken properly.

Last edited by gaekwad (2015-01-20 20:13:30)

Offline

#6 2015-01-20 20:12:24

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: Fatal Error on Login

You could ask for PHP 5.4, too – it’s been around since 2012 and is pretty widespread.

Offline

#7 2015-01-20 20:31:00

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Fatal Error on Login

So…. I rechecked the phpinfo() that had been uploaded by hosting support originally (without prompting), only to find that it had reverted to 5.1.6.

A quick message to support and I received a somewhat curt response telling me not to delete these lines from my .htaccess file

Action php5-cgi /cgi-bin/php53-cgi
AddHandler php5-cgi .php

All working now….

I think a new host might be required.

Offline

#8 2015-01-20 20:35:00

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,134
GitHub

Re: Fatal Error on Login

Leithen wrote #287576:

I think a new host might be required.

For what it’s worth, I still have clients who have Textpattern 4.4.x and PHP 5.1 – this scares me. Getting them to move hosts is…a challenge. The status quo is a powerful thing.

But yeah, look around – see what you can get as an alternative.

Offline

#9 2015-01-20 20:38:39

Leithen
Member
From: Scotland
Registered: 2006-02-05
Posts: 24

Re: Fatal Error on Login

Many thanks for your help – hair pulling out ceased before complete loss of elevated follicles.

Offline

Board footer

Powered by FluxBB