Incorrect integer value WATCHDOG_ERR

This tutorial is related to issue with Drupal after upgrade, module change or module activation. The error is similar to this one:

“PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: ‘WATCHDOG_ERR’ for column ‘severity’ at row 1: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => file [:db_insert_placeholder_2] => The specified file %file could not be copied to %destination. [:db_insert_placeholder_3] => a:2:{s:5:”%file”;s:22:”temporary://filefCLBmE”;s:12:”%destination”;s:56:”public://ctools/css/818a9e4e3a8a0543c79825df2bf73444.css”;} [:db_insert_placeholder_4] => WATCHDOG_ERR [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.domain-name.com/ [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 84.22.6.242 [:db_insert_placeholder_9] => 1317299034 ) in dblog_watchdog() (line 157 of /var/www/vhosts/www.domain-name.com/httpdocs/modules/dblog/dblog.module).”

After some search and investigation the issue appeared to be in a file called ‘file.inc’ located inside ‘includes’ folder. All the rest variables were WATCHDOG_ERROR, but there was one WATCHDOG_ERR which seams to be not declared anywhere.

The output was :

One of the watchdog lines is not like the rest, and instead of WATCHDOG_ERROR is WATCHDOG_ERR:

So use your preferred editor and just change the variable to WATCHDOG_ERROR and save the file.
Then the issue should be resolved.

Filed Under: CMSDrupalPHPTutorials

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply