Strict Standards: Non-static method HTML_QuickForm Error

Greetings all.

I have been the caretaker for a website for a good number of years now. It runs on php. I am not not much (hardly at all really) of a coder - I can diagnose and fix the bare basic stuff. Until recently the site has run pretty much perfectly and then suddenly the Contacts and Login pages fail to work. I can only assume my webspace host has upgraded their PHP version and it has now broke QuickForm.

www.annualclownsdirectory.com
Click on “Contact Us” or on “Log In” and you will see the errors that come up to do with QuickForm.

Strict Standards: Non-static method HTML_QuickForm_RuleRegistry::singleton() should not be called statically, assuming $this from incompatible context in /home/sifsskhn/public_html/AnnualClownsDirectoryCom/HTML/QuickForm.php on line 382

I have downloaded the latest version of QuickForm and installed that.
I have downloaded the latest version of common.php and installed that.
I tried installing QuickForm2 and changing the calls to that instead but the relevant pages come up blank because the coding from 1 to 2 is different for forms and I’ve no idea how to upgrade the code.
I have tried adding “error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT;” to the php.ini but with no difference.

So I need to ask your help in sorting this out so the site functions again, please.

Many thanks.
Bifford.

Hi Bifford welcome to the forum

I think what should help you a lot is instead of

Find out !

upload a simple PHP file

<?php
phpinfo();
?>

go to it.
Save Page As to your computer.
Delete the PHP file from your server before anyone happens upon it.

My guess is the change in error_reporting that happened ver 5.4
E_STRICT not part of E_ALL <5.4> E_STRICT included in E_ALL

I think you should think about finding more to date code, but you can buy some time editing the sites ini file eg. my localhost install is for developement only, I want to see error messages/

; Common Values:
;   E_ALL (Show all errors, warnings and notices including coding standards.)
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL

Thank you for the reply,

PHP is 5.5.36

and the Perl version (I did some digging) is 5.16.3

Well version 5.5 fits the version > 5.3 theory.

Can you edit the sites php.ini file / convince the site hosts to edit it?

1 Like

I did have a php.ini file where I thought it had to go, but that made no difference. So I went hunting and found their version in the /etc folder of the root! Edited to include “& ~E_STRICT;” on the error reporting line, and now everything is fine and back to working again! :smiley:

A Huge thank you Mittineague for helping me pin down a solution! :slight_smile:

1 Like

Are you aware that patch support for that PHP version has now ended and that the next security hole that is found will not be fixed.

I am in the process of redesigning the site, so as long as the ship doesn’t sink any time soon it will all be good! :smiley:

PHP 5.5 effectively sank yesterday so the minimum you should now be using is 5.6.

It would be surprising to me that a host upgraded php without first notifying customers.

I have seen situations where a notice was sent giving plenty of warning to everyone except those who joined up in the months between the notice being sent and the upgrade being done.

There’s also the possibility of the notice being trapped by a spam filter and so not being seen.

In my opinion that is very poor customer service and not a good company.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.