Page 1 of 1
How to test PHP in MySQL Strict
Posted: Mon Apr 05, 2010 9:35 pm
by Mr Tech
I had a client who had MySQL Strict which brought up a few errors in my MySQL code... I didn't even know there was a MySQL Strict. I've fixed up a lot of the issues but I want to run some further tests on my local server.
How do I enable MySQL Strict for testing purposes and then disable it when I no longer want it?
Re: How to test PHP in MySQL Strict
Posted: Tue Apr 06, 2010 12:14 am
by requinix
Uh... maybe you mean PHP's Strict warnings?
Everywhere: Find the error_reporting in your php.ini and set it to
Code: Select all
error_reporting = E_ALL | E_STRICT
Don't forget to restart the web server.
Per-script: Use
error_reporting:
Code: Select all
error_reporting(E_ALL | E_STRICT);
Re: How to test PHP in MySQL Strict
Posted: Tue Apr 06, 2010 12:18 am
by Mr Tech
Thanks tasairis but I mean MySQL Strict mode. I only just found out about this recently

Re: How to test PHP in MySQL Strict
Posted: Tue Apr 06, 2010 5:21 am
by requinix
I take it you couldn't find anything
searching?
Re: How to test PHP in MySQL Strict
Posted: Tue Apr 06, 2010 6:01 pm
by Mr Tech
All I could find is how to turn off strict mode... But i'll have another look and see what I can find.