I have tried to change the PHP version in my webspace from v5.5 to v 7 and loading a webpage I got the warning:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; XH_CSRFProtection has a deprecated constructor in /www/c/m/u13296/public_html/_sub/funnytree/cmsimple/classes/CSRFProtection.php on line 28...
So I went back to v 5.6. Shouldn't it be revised on older webpages and change thing with some patches?
PHP 7
PHP 7
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: PHP 7
The message does not currently point at an error in the code, but rather points out that there will be a problem in a future version, which is most likely to be PHP 8. There is plenty of time until PHP 8 will be released, so we have plenty of time to fix the issue.Tata wrote:Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; XH_CSRFProtection has a deprecated constructor
While it would be possible to fix the deprecation notice and let the code still work for PHP 4, I don't think it makes sense to do so. Instead I still prefer to drop support for PHP 4 altogether in the next version of CMSimple_XH (i.e. 1.7)[1], where this issue will be resolved in a clean way.
Anyhow, there's no real problem to use CMSimple_XH 1.6.7 with PHP 7.0.x, and most likely not with 7.1.x.
[1] Well, actually I would prefer that we had dropped PHP 4 support long ago.
Christoph M. Becker – Plugins for CMSimple_XH
Re: PHP 7
Fine. So I probably update my webspace for a use of PHP7?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: PHP 7
If there are no problems with any plugins you are using or are planning to use, I suggest you do so. For instance, PHP 7 removed the regex extension by default, and a lot of old plugins use ereg*(), what would break the site.Tata wrote:Fine. So I probably update my webspace for a use of PHP7?
Christoph M. Becker – Plugins for CMSimple_XH
Re: PHP 7
Well, so far no problems. But I haven't checked all websites running in my webspace. I will test them this week, hopefully.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: PHP 7
Well, but after upgrading to PHP v7, the warbing
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; XH_CSRFProtection has a deprecated constructor in /www/c/m/u13296/public_html/_sub/funnytree/cmsimple/classes/CSRFProtection.php on line 28...
is back.
Where and how shall I switch the warning OFF? It would be nice to have some PHP script to be able to hide the warnings in "visitor" mode and keep it optional in "edit" mode.
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; XH_CSRFProtection has a deprecated constructor in /www/c/m/u13296/public_html/_sub/funnytree/cmsimple/classes/CSRFProtection.php on line 28...
is back.
Where and how shall I switch the warning OFF? It would be nice to have some PHP script to be able to hide the warnings in "visitor" mode and keep it optional in "edit" mode.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: PHP 7
That is exactly how the debug mode is supposed to work.Tata wrote:Where and how shall I switch the warning OFF? It would be nice to have some PHP script to be able to hide the warnings in "visitor" mode and keep it optional in "edit" mode.
Christoph M. Becker – Plugins for CMSimple_XH
Re: PHP 7
Hi Tata,
set the debug level in the _XHdebug.txt from 6 (?) to 3 to get only messages when a real issue will occur.
set the debug level in the _XHdebug.txt from 6 (?) to 3 to get only messages when a real issue will occur.