We recently updated a 255 install to 272. Things are working fine except we got an error when we first tried to add a new File Upload location under File Upload Preferences. The error was:

A Database Error Occurred Error Number: 1062

Duplicate entry '4-5' for key 'PRIMARY'

INSERT INTO exp_upload_no_access (upload_id, upload_loc, member_group) VALUES (4, 'cp', '5')

Filename: controllers/cp/content_files.php

Line Number: 2338

Since that time, we have not been able to replicate this and it seems adding, editing and deleting locations is working ok. Is this something worth worrying about?

1 Answer 1


Sounds like an odd error to run into. I'd say it was one off with the key index for that table and you will be fine from now on.

If you are concerned however, you can rebuild the table index:

To rebuild a table by dumping and reloading it, use mysqldump to create a dump file and mysql to reload the file:

shell> mysqldump --all-databases > dump.sql
shell> mysql db_name < dump.sql

If you don't have access to the shell to perform this, try the following from PhpMyAdmin (or other DB control panel).

ALTER TABLE exp_upload_no_access ENGINE = MyISAM;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.