Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-04-28 08:50:58
- yeah
- Member
- Registered: 2006-04-08
- Posts: 15
Warning: Duplicate entry '0' for key 1 insert into txp_log set
since i updated textpattern, this appears on site:
Warning: Duplicate entry ‘0’ for key 1 insert into txp_log set `time`=now(),page=’/Startseite’,ip=‘XXX.XXX.XX.XXX’,host=‘port-XXX-XXX-XX-XXX.dynamic.qsc.de’,refer=’‘,status=‘200’,method=‘GET’ in /homepages/XX/XXXXXX/htdocs/textpattern/lib/txplib_db.php on line 84
does anyone know, how to fix it?
Last edited by yeah (2007-04-28 14:28:39)
Offline
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
If you remove all entries from the txp_log table using phpmyadmin (just the entries, not the table itself), the error should be gone. Your logs will then be empty, of course.
Offline
#3 2007-04-28 09:01:49
- yeah
- Member
- Registered: 2006-04-08
- Posts: 15
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
i did this before…doesn’t work
Offline
#4 2007-04-28 09:11:53
- yeah
- Member
- Registered: 2006-04-08
- Posts: 15
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
of course for the first time i enter the site its ok…but if i move, it happens again.
if i stop logging…it works…but i’d like to see it work.
Offline
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
Can you make sure the ID column of the txp_log table is using auto_increment. I suspect that auto_increment is not set there.
Offline
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
Your problem appeared after you moved your database, right? Or after a restore.
There was a mysql-bug in some versions which lead to auto-increment attributes going missing during backup. There are some older topics on the issue, explaining which fields in which tables could be afected and instructing you to to re-add the attributes (relatively easy ith phpmyadmin). Maybe someone can chip in with a link, or with the necessary information.
Offline
#7 2007-04-28 09:28:37
- yeah
- Member
- Registered: 2006-04-08
- Posts: 15
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
i didn’t move the database or restored it… i just updated textpattern and did a backup of the database before.
below you see the versions
Version Textpattern: 4.0.4 (r1956)
last_update: 2007-04-28 08:11:17/2007-04-28 08:10:18
Absoluter Pfad der Seite: /kunden/homepages/XX/XXXXXXXX/htdocs (/homepages/XX/XXXXXXXX/htdocs)
$path_to_site: /homepages/XX/XXXXXXXX/htdocs/
Pfad Textpattern: /homepages/XX/XXXXXXXX/htdocs/textpattern
Schema der URLs: section_title
Temporäres Verzeichnis: /homepages/XX/XXXXXXXX/htdocs/textpattern/tmp
Seiten-URL: www.XXXXXXXX.de
PHP-Version: 4.4.4
Register globals: 1
server_time: 2007-04-28 11:25:28
MySQL: 5.0.37-log
Regionale Einstellungen: de_DE.UTF-8
Server: Apache/1.3.33 (Unix)
php_sapi_mode: cgi
rfc2616_headers:
os_version: Linux 2.4
active_plugins: ajw_admin_workflow-0.3.1, cbs_navigation_menu-0.4
Inhalt der .htaccess-Datei:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) /index.php </IfModule>#php_value register_globals 0
————————————
Last edited by yeah (2007-04-28 14:27:51)
Offline
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
The solution is explained in this topic
The following tables should have auto_increment set on a column (table => ID). I recommend checking each of these tables to see if auto_increment is set:
textpattern => ID
txp_category => id
txp_discuss => discussid
txp_file => id
txp_image => id
txp_lang => id
txp_link => id
txp_log => id
txp_users => user_id
Last edited by ruud (2007-04-28 09:36:36)
Offline
#9 2007-04-28 09:38:32
- yeah
- Member
- Registered: 2006-04-08
- Posts: 15
Re: Warning: Duplicate entry '0' for key 1 insert into txp_log set
oh great, thank you very much… i should learn more about databases. :-)
it was the “autoincrement”-thing
Offline