Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2019-01-03 18:18:28

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

Re: Encoding problem

Can you try adding the two lines I posted above either before # BEGIN Textpattern or after # END Textpattern and report what happens? If you get an error of any sort, all you will need to do is delete those lines.

ps. I edited them to force php 7.2

Last edited by colak (2019-01-03 18:20:11)


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

Offline

#26 2019-01-03 18:25:09

jrmartin
Member
From: California | Italy
Registered: 2013-03-07
Posts: 118
Website

Re: Encoding problem

This could be a problem: RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC] RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]

Offline

#27 2019-01-03 21:18:12

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Encoding problem

I made 2 experiments.

experiment 1:

deleted

RewriteCond %{HTTPS} !=on [OR]
	RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
	RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]

and added

 AddHandler application/x-httpd-php72 .php
AddDefaultCharset utf-8

before # BEGIN Textpattern

Nothing changed.

experiment 2:

deleted

RewriteCond %{HTTPS} !=on [OR]
	RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
	RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]	

and added

AddHandler application/x-httpd-php72 .php
AddDefaultCharset utf-8

after # END Textpattern

Nothing changed.

This is probably the specifics of hosting.

Tomorrow I will try a new installation of the new site.


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#28 2019-01-03 22:34:12

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

Re: Encoding problem

This bit:

RewriteCond %{HTTPS} !=on [OR]
	RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
	RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]

is not relevant for the PHP version. It only has to do with redirecting to a secure connection and you’ll need an SSL certificate (e.g. Let’s Encrypt or a paid one) to avoid the browser trying to block access. The important thing is mydomain.com should be changed to match your own domain – maybe that is what jrmartin was referring to.

The AddHandler method is a way to force php files to handled via a specific version of php that can be different to the one set in your control panel. Setting the PHP version in the control panel or your host’s settings is preferable. You only need the AddHandler method if:

  • your host doesn’t allow you to reset your php version on a host’s site (webfaction’s specific app-container setup can make that necessary)
  • you want to change the php version for just one folder in your host’s container. For example, you have Textpattern running on php 7+ but need to use an older script in a subdirectory that is only compatible with php 5.6 (or vice versa).

You can put a phpinfo.php file into the respective directory and call it via the browser to display your php version and settings. Remember to remove it again after you’re done.

So, in summary, if all your scripts for that site run with php 7.x, set that in your control panel and you should be fine. I think gaekward’s comment is probably right: the line under open_basedir is probably just a leftover path from when the site was running an earlier version of php.


TXP Builders – finely-crafted code, design and txp

Offline

#29 2019-01-06 22:15:23

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Encoding problem

jakob thanks!

Open question for me

I will try and write off later


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

Board footer

Powered by FluxBB