I have developed some php/mysql code on linux machine, and it runs fine. On client's machine running wamp
server on windows, same operation gives a mysql error - which Php is displaying neatly in a tabular format. The error is in a mysql query with INSERT, pertaining to Duplicate Keys. (I know I can use ON DUPLICATE KEY UPDATE
, but that is not the issue). Problem is, the code is supposed to handle errors gracefully.
It does on my linux machine, but on client's wamp - it displays html tables with error details. I tried try
and catch
around the function call, but that also does not prevent the error from getting displayed in the browser (the PHP file is supposed to emit json data for ajax calls, that is why I cannot afford to have those error display by PHP).
Also, in the php file, I have
ini_set('display_errors', 1); error_reporting(E_ALL);
and still, since its a mysql error, it rightly does not throw any php error on linux, but does on windows.
So basically, I want to know what PHP setting (or something else?) on client's machine could be causing the MySQL error to be propagated / processed by PHP, and how to turn it off.
Thanks