close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error - Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP?

Thread began 2/12/2018 8:41 am by Nathon Jones Web Design | Last modified 2/12/2018 7:58 pm by Ray Borduin | 80 views | 6 replies |

Nathon Jones Web Design

Error - Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP?

Have started getting the following error on our contact form pages...

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Validations_WhereClause has a deprecated constructor in /home/linweb08/j/jb-graham.co.uk/user/htdocs/webassist/form_validations/wavt_scripts_php.php on line 667

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WA_MAILOBJ has a deprecated constructor in /home/linweb08/j/jb-graham.co.uk/user/htdocs/webassist/email/mail_php.php on line 70

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WAUE_Log_Bindings has a deprecated constructor in /home/linweb08/j/jb-graham.co.uk/user/htdocs/webassist/email/mailformatting_php.php on line 2

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WAUE_Log_Event has a deprecated constructor in /home/linweb08/j/jb-graham.co.uk/user/htdocs/webassist/email/mailformatting_php.php on line 23

Live example:
http://www.jb-graham.co.uk/contact-JBGraham.php

Has something changed with PHP7? How do we fix this?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Turn off Deprecated messages. They are warnings that it might not work in php8 but won't cause an issue in the current version. Those messages can be turned off and ignored for now.

Sign in to reply to this post

Nathon Jones Web Design

It's on shared hosting so we don't have control over settings like that. I'm really not clear why these messages have just started appearing and, of course, I'm having to scurry off to all my other sites to check that the same isn't happening there. Hopefully the host can resolve this.

Thinking ahead Ray, is this going to be a problem when PHP8 gets rolled out?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

We are already making the necessary updates so that it won't be an issue with php8.

This is a debug setting that should be turned off in any live hosting scenario. What hosting company do you use?

I'm sure there is a way to turn it off. Worst case scenario you can add code to the individual pages to turn it off.

php:
<?php

ini_set
('error_reporting'E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
?>
Sign in to reply to this post

Nathon Jones Web Design

The hosts are Fasthosts and they continually change server settings without letting customers know first.
Their reply to this is...

“We are unable to stop the error from being generated, but it looks like the issue here is that the site itself is displaying the error as part of the content of the page.

This will either need to be disabled via a script or perhaps via a setting if your site is a drupal or wordpress site or something like that but you will need to do some research online into how to do so. Depending on the platform it may not be possible (as from the forum I found it looks like this is not yet a feature of drupal for example).“

Looks like i’m going to have to disable errors on every page. Urggh :(

...and what happens now if an error is genuine? I’ll have errors turned off and will be none the wiser.

NJ

Sign in to reply to this post

Ray BorduinWebAssist

The code example only removes strict, deprecated, and notices... which aren't consequential. Actual errors would still be displayed.

Sign in to reply to this post

Nathon Jones Web Design

Thank you Ray.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...