Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Thursday, 28 November 2013

Error reporting in PHP

I've seen quite a few blogs which go into great depth about error reporting in PHP. What I and almost everyone else wants when something is going wrong is... Tell me everything. So, here are the lines to put at the top of your .php file
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(-1);
?>
Job done.

Tuesday, 13 December 2011

Invalid field count in csv input on line 1

I came across this annoying phpmyadmin 'feature' when trying to import some data to a newly created MySQL table. I had a CSV file full of data. The columns matched the number of fields but I kept getting the error 'Invalid field count in csv input on line 1'.

The problem was, that the 'Fields terminated by' field in the import screen was set to ';' instead of a ','. By resetting this field, everything worked.