Solved

Turning off "strict errors..."

Posted on 2014-12-30
6
105 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

 

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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.

792 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