Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Need Help Installing: Duplicate entry '1' for key 'PRIMARY'
I installed Vanilla 2 successfully and imported my Vanilla 1 forum successfully. Everything was well and good until I accidentally changed the Vanilla 2 install root folder name. Ever since that happened I was unable to access my site. I tried naming it back but it just gave me errors.
I deleted everything on my server so I could start fresh. I put Vanilla 2 back on the server and tried a fresh reinstall. Now I receive this error every time after I access the installer on my browser and submit my info, trying to install it.
Here's the error. Please let me know if you have a solution.
-------------
Fatal Error in Gdn_Database.Query();
Duplicate entry '1' for key 'PRIMARY'
update GDN_User User set Name = :Name, Password = md5(:Password), Email = :Email, ShowEmail = :ShowEmail, Gender = :Gender, DateOfBirth = :DateOfBirth, DateFirstVisit = :DateFirstVisit, DateLastActive = :DateLastActive, DateInserted = :DateInserted, DateUpdated = :DateUpdated, Admin = :Admin, UserID = :UserID
The error occurred on or near: /usr/local/apache2/htdocs/wcom/vanilla/library/database/class.database.php
* Method: Query
I deleted everything on my server so I could start fresh. I put Vanilla 2 back on the server and tried a fresh reinstall. Now I receive this error every time after I access the installer on my browser and submit my info, trying to install it.
Here's the error. Please let me know if you have a solution.
-------------
Fatal Error in Gdn_Database.Query();
Duplicate entry '1' for key 'PRIMARY'
update GDN_User User set Name = :Name, Password = md5(:Password), Email = :Email, ShowEmail = :ShowEmail, Gender = :Gender, DateOfBirth = :DateOfBirth, DateFirstVisit = :DateFirstVisit, DateLastActive = :DateLastActive, DateInserted = :DateInserted, DateUpdated = :DateUpdated, Admin = :Admin, UserID = :UserID
The error occurred on or near: /usr/local/apache2/htdocs/wcom/vanilla/library/database/class.database.php
* Method: Query
Tagged:
0
Comments
To fix it, login to MySQL (I prefer terminal, but anything will do),
$ mysql -u __your_user__ -p
select the proper database
use __DB_Name__
and issue:
DELETE FROM GDN_User WHERE UserID = 1;
which deletes the user which has ID 1.And then try to reinstall normally.
/cd
Thanks for the help though david.
/cd
Solution (as presented by @cdavid):
Run the following query on your database (either through PhpMyAdmin or some other tool): If you do not understand this, you need someone to actually guide you through the process, and that is not within the scope of this forum (unless some kind user decides to do it for you).
Vanilla Forums COO [GitHub, Twitter, About.me]
Fatal error: Class 'CategoryModel' not found in /home/safinn/public_html/forum/applications/vanilla/settings/structure.php on line 62
any idea?