You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ””)’ at line 2

There is a single quote in $submitsubject or $submit_message Why is this a problem? The single quote char terminates the string in MySQL and everything past that is treated as a sql command. You REALLY don’t want to write your sql like that. At best, your application will break intermittently (as you’re observing) and at worst, you have just introduced … Read more

MySQL said: Documentation #1045 – Access denied for user ‘root’@’localhost’ (using password: NO)

I installed xampp,but when I tried to run it I got an error as thus: Error MySQL said: Documentation 1045 – Access denied for user ‘root’@’localhost’ (using password: NO) Connection for controluser as defined in your configuration failed. phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check … Read more

How to use Memcached with PHP7?

You need to use the php7 branch; see here, Travis is passing. This should be the complete set of steps to install the memcached extension on a Debian/Ubuntu OS: You may need to change some of the paths if you have them installed at different locations.

Error: Duplicate entry ‘0’ for key ‘PRIMARY’

For those arriving at this question because of the question title (as I did), this solved my problem: This error can indicate that the table’s PRIMARY KEY is not set to AUTO-INCREMENT, (and your insert query did not specify an ID value). To resolve: Check that there is a PRIMARY KEY set on your table, and that the … Read more