This error appear when I as admin or one of site user wants to upload a profile picture.

Notice: Use of undefined constant WATCHDOG_ERR - assumed 'WATCHDOG_ERR' in file_unmanaged_copy() (line 909 of ../includes/file.inc).
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] => 5 [: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:33:"temporary://specialreportsart.gif";s:12:"%destination";s:42:"public://pictures/picture-5-1313744141.gif";} [:db_insert_placeholder_4] => WATCHDOG_ERR [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://../user/5/edit [:db_insert_placeholder_7] => http://.../user/5/edit [:db_insert_placeholder_8] => 79.112.16.161 [:db_insert_placeholder_9] => 1313744141 ) in dblog_watchdog() (line 157 of .../modules/dblog/dblog.module).

Comments

Ionut Adrian Luchian’s picture

Issue summary: View changes

This error appear when I as admin or one of site user wants to upload a profile picture.

helior’s picture

Status: Active » Postponed (maintainer needs more info)

Try disabling the masked input module and see if you still get this error. Let me know if you still think this is a masked input problem, because I don't see how this would effect uploading profile images.

Ionut Adrian Luchian’s picture

StatusFileSize
new138.58 KB
new67.77 KB

I tried, but no success.

I downloaded the drupal 7.7 core, I ftp it on my server and I installed drupal 7.
I clicked on "My account" then "Edit" and I tryed to upload a profile picture when this warning appeared:

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access temporary://specialed_0.jpg in file_save_upload() (line 1541 of /home/x4locals/public_html/ucreateawebsite.com/includes/file.inc).
    File upload error. Could not move uploaded file.

I tried to modify this line if (!move_uploaded_file($_FILES['files']['tmp_name'][$source], $file->uri)) { with this line if (!move_uploaded_file($_FILES['files']['tmp_name'][$source], drupal_realpath($file->uri))) { in includes/file.inc but when I retry to upload my profile picture this error appear:

Notice: Use of undefined constant WATCHDOG_ERR - assumed 'WATCHDOG_ERR' in file_unmanaged_copy() (line 909 of /home/x4locals/public_html/ucreateawebsite.com/includes/file.inc).
    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] => 1 [: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:27:"temporary://specialed_0.jpg";s:12:"%destination";s:42:"public://pictures/picture-1-1313830020.jpg";} [:db_insert_placeholder_4] => WATCHDOG_ERR [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://ucreateawebsite.com/user/1/edit?render=overlay&render=overlay [:db_insert_placeholder_7] => http://ucreateawebsite.com/user/1/edit?render=overlay [:db_insert_placeholder_8] => 79.112.11.248 [:db_insert_placeholder_9] => 1313830020 ) in dblog_watchdog() (line 157 of /home/x4locals/public_html/ucreateawebsite.com/modules/dblog/dblog.module).

I don't know what I'm wrong. I downloaded a fresh drupal-7.7 core, it's a fresh drupal installation. Do you have any ideea?

Thanks,
Ionut Adrian Luchian.

hellojoker’s picture

First of all I apologize for my English, I got the same error after creating the tmp folder in /sites/deault/files/, because after installation, I received an error on first login, which indicated the absence of this folder. At this point, removing the folder, I got in again, but with the same error I had initially

Warning: file_put_contents (temporary: / / filewn9dEt) [function.file-put-contents]: failed to open stream: "DrupalTemporaryStreamWrapper: stream_open" call failed in file_unmanaged_save_data () (line 1859 of / var / www / vhosts / .. ............../drupal-7.7/includes/file.inc).
It was not possible to create the file.

The same fresh drupal-7.7 core and fresh drupal installation

Thanks in advance

sethlbrown’s picture

I had the same problem, the following update to core should resolve the issue: http://drupalcode.org/project/drupal.git/commitdiff/3ed6929?hp=73db412ca...

Ionut Adrian Luchian’s picture

This errors appears only an online server.
I installed wamp server and all works great.
But my question is: When I'll move the site on a online server this errors will persist?

Can anyone answer this question?
Can anyone solve this errors?

mikec.pt’s picture

subscribe

kash83’s picture

subscribe

helior’s picture

Your local environment's PHP config file may do error handling differently than your server environment. For example, your local may not report these errors (or notices) on screen, although they are still actually occurring. So yes, your online server may behave differently than your local server.

helior’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

By the way, to those that are subscribing to this issue because they found it via Google: This issue is unrelated to the masked-input module, rather a Drupal core issue. However, as sethlbrown has mentioned in #4 there is already a patch that fixes this issue and should be rolled out in Drupal 7.9, my guess anyway :)

Cristian Banu’s picture

Google Analytics module: readme.txt

Installation
1. Copy the 'googleanalytics' module directory in to your Drupal sites/all/modules directory as usual.
2. In the settings page enter your Google Analytics account number.

All pages will now have the required JavaScript added to the HTML footer can confirm this by viewing the page source from your browser.

Good luck !

Anonymous’s picture

Applying patch indicated in #4 works. Error no longer persists. Thanks @sethlbrown

Anonymous’s picture

Issue summary: View changes

This error appear when I as admin or one of site user wants to upload a profile picture.

avpaderno’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Assigned: Ionut Adrian Luchian » Unassigned
Issue summary: View changes
Issue tags: -PDOException, -WATCHDOG_ERR, -file_unmanaged_copy, -SQLSTATE[HY000], -, -