Solved

Turning off "strict errors..."

Posted on 2014-12-30
6
106 Views
Last Modified: 2014-12-31
I've got a "strict error" being reported on a page that I'm working on and, from what I can tell, it's not an error as much as it's a warning and I want to get rid of it for the time being.

I've gone into my php.ini file and replaced:

error_reporting=E_ALL

with...

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

...and it didn't make any difference.

I've got screen shot attached that shows the error that I'm thinking for right now is not a priority. It's the one that reads: Strict standards:  Declaration of securityCheck::processLogin() should be compatible with Authenticate::processLogin($username, $plainPassword) in C:\wamp\www\WebTemplate\classes\securityCheck.class.php on line 22

So, what am I missing? What have I yet to disable or am I looking at something beyond my php.ini file?
strict.JPG
0
Comment
Question by:brucegust
6 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 40523912
also make this settings in your php.ini

ini_set('display_errors', '0');     

Open in new window

0
 
LVL 78

Accepted Solution

by:
arnold earned 250 total points
ID: 40523918
the php.ini on some systems includes the descriptions that for development you would use E_ALL|E_STRICT while production will have E_ALL & ~E_DEPRECATED

The error means you have a variable that you are using that you have not declared.
While strict is an annoyance at times, it simplifies trouble shooting i.e. variable name typos, etc. will be immediately repored and you would not wind up with a huge code where under a certain condition the response you get is not one that you expected and going through the code trying to locate ....
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 250 total points
ID: 40523919
Try this as well,
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

Open in new window


Make sure you restarted the server and changes reflected on your php.ini
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:brucegust
ID: 40523982
I learned the hard way just now that regardless of what you document in your php.ini file, if you've got error_reporting set to E_ALL in your file, you're going to have a hard time silencing things that you want to keep quiet.

I got it!

Thanks!
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40524290
You could just fix the errors and warnings instead of hiding them.
0
 

Author Comment

by:brucegust
ID: 40525457
Not looking to sweep anything under the carpet, Dave, but it's not my code and I'm trying to knock out the "dealbreakers" first and then I 'll go back and address what the system is addressing as "...it would be better if" stuff.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question