Solved

Turning off "strict errors..."

Posted on 2014-12-30
6
93 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 76

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 82

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now