Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-01-04 05:19:37

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,303
Website

Vanilla Textpattern 4.8.4 hiccup

Not a good start to the year …!

Having trouble with a brand new Textpattern 4.8.4 install. Two problems:

  1. the config.php contents provided during setup is missing the final ?> – the last line is // For more customization options, please consult config-dist.php file.
  2. unable to access the Diags panel – see below

In Safari I get:

Safari Can’t Open the Page
Safari can’t open the page “xxxxxx-imac.local/~adi/textpattern-4.8.4/textpattern/index.php?event=diag” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes and then try again.

In Firefox I get:

The connection was reset
The connection to the server was reset while the page was loading.
    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

All other tabs seem to be OK, public side looks fine, no plugins installed, can add articles OK, green English on Languages.

Same issues with Textpattern 4.8.3. The only significant thing that’s changed since I last did a successful TXP install is a MacOS upgrade to 10.15.7 Catalina.

The truncated config.php code provided doesn’t stop the site from working and fixing it doesn’t sort out my Diags issue. Have also tried deleting .htaccess.

Any thoughts?

Offline

#2 2021-01-04 06:27:25

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,303
Website

Re: Vanilla Textpattern 4.8.4 hiccup

UPDATE: Am getting the same browser issues with 4.8.2 vanilla, which I’d installed successfully some time ago, so it must be something peculiar to my local setup.

I’ve narrowed it down to the following code in function checkUpdates() in txp_diag.php:

   if (function_exists('curl_version')) {
        $ch = curl_init($endpoint);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $contents = curl_exec($ch);
    } else {
        $contents = file_get_contents($endpoint);
    }

More specifically, the curl_exec line – if commented out I see the Diags panel OK.

If I force the use of file_get_contents() the panel displays OK albeit with “There was a problem connecting to the Textpattern update server. Please try again later. Help”.

Offline

#3 2021-01-04 06:36:08

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,303
Website

Re: Vanilla Textpattern 4.8.4 hiccup

UPDATE 2:

Forcing a rerun of function checkUpdates(), using file_get_contents() gives me:

Warning "file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version".

Warning "file_get_contents(): Failed to enable crypto".

Warning "file_get_contents(https://textpattern.com/version.json): failed to open stream: operation failed".

Yuck!

Offline

#4 2021-01-04 06:37:25

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,469
Website

Re: Vanilla Textpattern 4.8.4 hiccup

gomedia wrote #327994:

Not a good start to the year …!

Having trouble with a brand new Textpattern 4.8.4 install. Two problems:

  1. the config.php contents provided during setup is missing the final ?> – the last line is // For more customization options, please consult config-dist.php file.

Hi Ad, and best wishes for the new year.
I noticed that too and there is an explanatiion further down in that thread.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#5 2021-01-04 08:30:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,233
Website

Re: Vanilla Textpattern 4.8.4 hiccup

I have no problem installing / running (various) TXP locally on macOS 10.15.7 and macOS 11 with the default Apache and PHP. One difference with your install is that I access all of them in their specific domain space (e.g http://txp-dev.local/ and http://phiw13.local/).

That said accessing the diagnostics panel is a little slow, but accurate and does not trigger any errors.

Maybe there is some difference between your and my httpd.config? Or my virtual hosts settings?


Where is that emoji for a solar powered submarine when you need it ?

Offline

#6 2021-01-04 08:36:12

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,350

Re: Vanilla Textpattern 4.8.4 hiccup

gomedia wrote #327996:

Warning "file_get_contents(): Failed to enable crypto".

That’s a PHP error, I’ve had that before. My solution was to use a known-good certificate bundle and that made the error go away.

Aside: in your phpinfo(), what is allow_url_fopen set to?

Offline

#7 2021-01-04 08:59:24

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,303
Website

Re: Vanilla Textpattern 4.8.4 hiccup

phiw13 & gaekwad, thanks for the replies.

Access to the 4.8 sites (admin & public) is working OK.

This has the smell of an old version of PHP compiled with an old version of curl/OpenSSL. If not that then something’s out of date.

TXP 4.8 seems to be the first one to start using curl in Diags to check for updates. My 4.7 sites Diags work OK and, as mentioned before, bypassing the curl code to force it to use file_get_contents gets around the issue.

I’ll bodgie it for the time being, so I can get on, and then give PHP an upgrade.

Offline

#8 2021-01-04 09:25:57

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,036
Website

Re: Vanilla Textpattern 4.8.4 hiccup

Are you accessing your site with https:// locally? I’ve had errors before with file_get_contents being disallowed when using a self-signed certificate on a localhost. Maybe curl stumbles over the same thing.

The workaround in this stackoverflow post helped in my case.


TXP Builders – finely-crafted code, design and txp

Offline

#9 2021-01-04 09:46:27

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,303
Website

Re: Vanilla Textpattern 4.8.4 hiccup

jakob wrote #328001:

Are you accessing your site with https:// locally?

No, & access to the site is working OK. The Diags panel is accessing “https://textpattern.com/version.json” using curl (in 4.8) which is where it’s failing.

Offline

#10 2021-01-04 10:26:51

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,350

Re: Vanilla Textpattern 4.8.4 hiccup

gomedia wrote #328004:

https://textpattern.com/version.json

Anecdotally, we do seem to having more reports of update checks failing in recent years. The somewhat baffling thing is that the file above barely makes a dent in the web hits, and I’ve even set up a curl header check every second for weeks and nothing unexpected was reported (i.e. 200 OK all the way unless Nginx was restarting after an update).

I have encountered “Failed to start crypto” stuff on my own server (see the somewhat cryptic comment here: github.com/textpattern/textpattern/issues/1546#issuecomment-708247901), which reared its head on a PHP 8.0 RC compile and a cert bundle that, for whatever reason, just shrugged and failed. My solution was to get the Mozilla cert bundle (see here: curl.haxx.se/docs/caextract.html for info) on a sensible schedule, edit the PHP config, and it all just works fine…which means I haven’t investigated why it bombed out in the first place, ‘cos it just works now. Bad form, I know, but it was a funny year.

Offline

Board footer

Powered by FluxBB