|
||||||||||
|
|
Failed to add site to database. DBERR: error ‘ERROR: duplicate key violates unique constraint “domain_key” ‘ in ‘ INSERT INTO siteinfo ENSIMMarch 6, 2009 on 9:30 am | In Pgsql, ensim | 3 CommentsHello guys, You might have come accross the following error Failed to add site to database. DBERR: error ‘ERROR: duplicate key violates unique constraint “domain_key” ‘ in ‘ INSERT INTO siteinfo (site_id, domain, admin_user, email) VALUES (8, ‘domain.com’, ‘xxxx’, ‘xxx@domain.com’)’ ========================= Here is the fix. Login to server via backend. su postgres Take a backup of the database… pg_dump appldb > appldb.dump.out Now lets edit psql postgres=# \l this will list all the databases. The Ensim database is “appldb” postgres=# \c appldb This will list all the tables in the database. You can find the database siteinfo appldb=# SELECT * FROM siteinfo WHERE domain=’domain.com’; site_id | domain | email | admin_user DELETE FROM siteinfo WHERE site_id=35; Now quit the database appldb=# \q bash-3.00$ exit Restart services /etc/rc.d/init.d/virtualhosting restart /etc/rc.d/init.d/epld restart Now try to add the domain from Control panel. PostgreSQL Installation in RHEL pgsqlJune 10, 2008 on 5:08 pm | In Pgsql | No CommentsThis is for fresh install. If you are going for an upgrade, you need to check out the steps from the link. ============== http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html ============== It is easy to install it via yum or up2date. Using yum ============== Using up2date. ============== Using rpm. You need three rpm. ============== Download the RPM from rpm.pbone.net for your coresponding OS and the required version. dowload it to ============== Install them using ============== Once you have completed this you need can start the service. ============== Edit the file ‘/var/lib/pgsql/data/pg_hba.conf’, replace all entries of “ident sameuser” with “trust”. Restart PostgreSQL. If the initialisation fails the files pg_hba.conf and postgresql.conf will not be created. Check the startup log which is found in /var/lib/pgsql/ ============== To make sure it starts automatically on boot – do the following command ============== Kill all the currently running postgre processes. ================== ================== Try starting it again. How to install pdo_pgsql in Cpanel serverApril 23, 2008 on 2:51 pm | In Installation, PHP, Pgsql | No CommentsIts that easy to add the php module pdo_pgsql in a Cpanel server. Just use the command =============== Then go for a Apache restart. It will be shown up in your phpinfo page…….. |
![]() Powered and designed by Presoon.com. |