?
Solved

Turning off "strict errors..."

Posted on 2014-12-30
6
Medium Priority
?
111 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 79

Accepted Solution

by:
arnold earned 1000 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 1000 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

777 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