Php 8 CMSimple xh

A place for general not CMSimple related discussions
ustalo
Posts: 121
Joined: Mon Aug 16, 2010 7:42 am
Location: Russia
Contact:

Php 8 CMSimple xh

Post by ustalo » Wed Jan 06, 2021 8:34 am

boilerplate error with php 8 cannot open name.htm
any solution?
Aleksei

olape
Posts: 1763
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: Php 8 CMSimple xh

Post by olape » Wed Jan 06, 2021 9:55 am

A little more information please.
Switch on debugmode!

ustalo
Posts: 121
Joined: Mon Aug 16, 2010 7:42 am
Location: Russia
Contact:

Re: Php 8 CMSimple xh

Post by ustalo » Fri Jan 08, 2021 6:09 am

1local server mama php 8
I get a message

Could not open file
contact3colon.htm

2 officialhosting
no any message, just white page on any site (not only boilerplate)
http://test.sima.spb.ru/cmsimple/
Aleksei

olape
Posts: 1763
Joined: Fri Mar 13, 2015 8:47 am
Contact:

Re: Php 8 CMSimple xh

Post by olape » Fri Jan 08, 2021 6:57 am

ustalo wrote:
Fri Jan 08, 2021 6:09 am
http://test.sima.spb.ru/cmsimple/
--> finally results in a server error 500

OK, you are using 1.7.3.
The current version is 1.7.4, but that won't make much difference for php8.

Some problems are already known.

viewtopic.php?f=29&t=16381#p76366

ustalo wrote:
Fri Jan 08, 2021 6:09 am
Could not open file
contact3colon.htm
Hmm, that's not much.
Read / write permissions?

But I think Boilerplate_XH has problems even with php 7.3 and 7.4.

ustalo
Posts: 121
Joined: Mon Aug 16, 2010 7:42 am
Location: Russia
Contact:

Re: Php 8 CMSimple xh

Post by ustalo » Fri Jan 08, 2021 9:12 am

i just test different version of php
to be ready
my main site all works on boilerplate (not a lot version) Last one does not works.
Clean CMSimple works ok
now i check what is wrong
http://test.sima.spb.ru/clean/?login test
some error in debag
Aleksei

lck
Posts: 2287
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Php 8 CMSimple xh

Post by lck » Fri Jan 08, 2021 12:05 pm

Honestly, I don't understand the whole discussion here. In this thread it is clearly stated that CMSimple_XH 1.7.4 is not yet PHP 8 ready and also plugins will have problems with it. This is also true for Boilerplate_XH*!

Conclusion: XH 1.7.4 not yet run with PHP 8

* Boilerplate_XH runs under PHP 7.4.8, only a deprecated notice:
DEPRECATED: Methods with the same name as their class will not be constructors in a future version of PHP; Boilerplate_Model has a deprecated constructor
D:\xampp\htdocs\cmsimplexh174\plugins\boilerplate\classes\model.php:25
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

cmb
Posts: 13672
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Php 8 CMSimple xh

Post by cmb » Fri Jan 08, 2021 6:12 pm

lck wrote:
Fri Jan 08, 2021 12:05 pm
Conclusion: XH 1.7.4 not yet run with PHP 8
We have to hurry up with the PHP 8 compatibility. Question is which version to target: CMSimple_XH 1.8? If so, we should probably not introduce a lot of new features, but rather aim for PHP 8 compatibility.
lck wrote:
Fri Jan 08, 2021 12:05 pm
* Boilerplate_XH runs under PHP 7.4.8, only a deprecated notice:
DEPRECATED: Methods with the same name as their class will not be constructors in a future version of PHP; Boilerplate_Model has a deprecated constructor
D:\xampp\htdocs\cmsimplexh174\plugins\boilerplate\classes\model.php:25
And that would be a fatal error with PHP 8. Quick fix: replace this line with:

Code: Select all

    function __construct($dataFolder)
Christoph M. Becker – Plugins for CMSimple_XH

ustalo
Posts: 121
Joined: Mon Aug 16, 2010 7:42 am
Location: Russia
Contact:

Re: Php 8 CMSimple xh

Post by ustalo » Sat Jan 09, 2021 7:14 am

It is works
thanks a lot
Aleksei

lck
Posts: 2287
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Php 8 CMSimple xh

Post by lck » Sat Jan 09, 2021 12:00 pm

cmb wrote:
Fri Jan 08, 2021 6:12 pm
lck wrote:
Fri Jan 08, 2021 12:05 pm
* Boilerplate_XH runs under PHP 7.4.8, only a deprecated notice:
DEPRECATED: Methods with the same name as their class will not be constructors in a future version of PHP; Boilerplate_Model has a deprecated constructor
D:\xampp\htdocs\cmsimplexh174\plugins\boilerplate\classes\model.php:25
And that would be a fatal error with PHP 8. Quick fix: replace this line with:

Code: Select all

    function __construct($dataFolder)
Gut, behebt das Problem mit der Textbaustein-Datei. Aber, da gibt es noch ein anderes Problem beim Aufruf von Plugins > Boilerplate bei der Systemprüfung:
Debug-Mode wrote:Uncaught Error: Call to undefined function get_magic_quotes_runtime() in D:\xampp\htdocs\cmsimplexh174_test-php8\plugins\boilerplate\admin.php:137
Stack trace:
#0 D:\xampp\htdocs\cmsimplexh174_test-php8\plugins\boilerplate\admin.php(342): Boilerplate_info()
#1 D:\xampp\htdocs\cmsimplexh174_test-php8\cmsimple\cms.php(1123): include('D:\\xampp\\htdocs...')
#2 D:\xampp\htdocs\cmsimplexh174_test-php8\index.php(6): include('D:\\xampp\\htdocs...')
#3 {main}
thrown in D:\xampp\htdocs\cmsimplexh174_test-php8\plugins\boilerplate\admin.php on line 137
Lösung, in admin.php diese Zeile ersetzen durch

Code: Select all

= !ini_set('magic_quotes_runtime', 0) ? 'ok' : 'fail';
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

lck
Posts: 2287
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Php 8 CMSimple xh

Post by lck » Sat Jan 09, 2021 12:05 pm

cmb wrote:
Fri Jan 08, 2021 6:12 pm
lck wrote:
Fri Jan 08, 2021 12:05 pm
Conclusion: XH 1.7.4 not yet run with PHP 8
We have to hurry up with the PHP 8 compatibility. Question is which version to target: CMSimple_XH 1.8? If so, we should probably not introduce a lot of new features, but rather aim for PHP 8 compatibility.
+1
My gut feeling says rather 1.7.5, because only minor changes. But you know that better.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

Post Reply