Page 1 of 2

Php 8 CMSimple xh

Posted: Wed Jan 06, 2021 8:34 am
by ustalo
boilerplate error with php 8 cannot open name.htm
any solution?

Re: Php 8 CMSimple xh

Posted: Wed Jan 06, 2021 9:55 am
by olape
A little more information please.
Switch on debugmode!

Re: Php 8 CMSimple xh

Posted: Fri Jan 08, 2021 6:09 am
by ustalo
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/

Re: Php 8 CMSimple xh

Posted: Fri Jan 08, 2021 6:57 am
by olape
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.

Re: Php 8 CMSimple xh

Posted: Fri Jan 08, 2021 9:12 am
by ustalo
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

Re: Php 8 CMSimple xh

Posted: Fri Jan 08, 2021 12:05 pm
by lck
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

Re: Php 8 CMSimple xh

Posted: Fri Jan 08, 2021 6:12 pm
by cmb
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)

Re: Php 8 CMSimple xh

Posted: Sat Jan 09, 2021 7:14 am
by ustalo
It is works
thanks a lot

Re: Php 8 CMSimple xh

Posted: Sat Jan 09, 2021 12:00 pm
by lck
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';

Re: Php 8 CMSimple xh

Posted: Sat Jan 09, 2021 12:05 pm
by lck
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.