Solved

Turning off "strict errors..."

Posted on 2014-12-30
6
102 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 77

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WordPress TK Title 8 25
Access Object's Property 9 22
Configuring a checkbox in CSS and php 18 32
PHP Sessions in WordPress 8 5
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

867 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

12 Experts available now in Live!

Get 1:1 Help Now