FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167821] Sat, 13 October 2012 10:08 Go to next message
-ml- is currently offline  -ml-
Messages: 12
Registered: March 2012
Karma: 0
Junior Member
Hello All,

My forum is broken since I tried to upgrade from 3.0.1 to 3.0.4.1 Sad

I see the following error during upgrade:

Convert reg_ip to registration_ip for IPv6 compatibility

Warning: pg_query(): Query failed: FEHLER: Spalte »reg_ip« existiert nicht LINE 1: SELECT id, reg_ip FROM fud30_users ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte »reg_ip« existiert nicht LINE 1: SELECT id, reg_ip FROM fud30_users ^ @ SELECT id, reg_ip FROM fud30_users' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('SELECT id, reg_...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/upgrade.php(67): q('SELECT id, reg_...') #2 /home/httpd/XXX/rag/upgrade.php(915): users_registration_ip(Array) #3 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158 


Before that I saw the following:
Warning: pg_query(): Query failed: FEHLER: Spalte i.oid existiert nicht LINE 1: ...id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fu... ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte i.oid existiert nicht LINE 1: ...id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fu... ^ @ DELETE FROM fud30_ann_forums WHERE EXISTS (SELECT 1 FROM fud30_ann_forums i WHERE i.ann_id = fud30_ann_forums.ann_id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fud30_ann_forums.oid)' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('DELETE FROM fud...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/private/include/dbadmin.inc(589): q('DELETE FROM fud...') #2 /home/httpd/XXX/rag/private/include/dbadmin.inc(379): delete_duplicate_rows('fud30_ann_forum...', 'ann_id,forum_id') #3 /home/httpd/XXX/rag/upgrade.php(978): create_primary_key('fud30_ann_forum...', 'ann_id,forum_id') #4 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158 


Is this a known issue?
Is there anything I can do?
Currently I can't even log in as administrator. I just get a blank page after login.

My configuration
FUDforum version: 	3.0.1
PHP version: 	5.3.3-7+squeeze8
PHP built on: 	Linux rechenknecht 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64
Database type: 	pgsql (pgsql)
Database version: 	PostgreSQL 8.4.11 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit
Web server: 	Apache/2.2
Web server to PHP interface: 	apache2handler
WebServer User/Group: 	33 / 33
Relevant PHP settings: 	
Safe mode: 	OFF
Open basedir: 	none
Display errors: 	OFF
File uploads: 	ON
Maximum file upload size: 	20M
Magic quotes: 	OFF
Register globals: 	OFF
Output buffering: 	Yes
Disabled functions: 	none
PSpell support: 	No
Zlib support: 	Yes


Any help is highly appreciated!

[Updated on: Sat, 13 October 2012 10:22]

Report message to a moderator

Aw: Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167823 is a reply to message #167821] Sat, 13 October 2012 21:26 Go to previous messageGo to next message
-ml- is currently offline  -ml-
Messages: 12
Registered: March 2012
Karma: 0
Junior Member
I commented out all database modifications that are causing errors in upgrade.php one after another.
Doing this I was able to trigger subsequent errors:

Translations for the German words:
FEHLER means ERROR
existiert nicht means does not exist
Spalte means Column

Convert last_known_ip to last_used_ip IPv6 compatibility
Warning: pg_query(): Query failed: FEHLER: Spalte »last_known_ip« existiert nicht LINE 1: SELECT id, last_known_ip FROM fud30_users ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte »last_known_ip« existiert nicht LINE 1: SELECT id, last_known_ip FROM fud30_users ^ @ SELECT id, last_known_ip FROM fud30_users' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('SELECT id, last...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/upgrade.php(77): q('SELECT id, last...') #2 /home/httpd/XXX/rag/upgrade.php(915): users_last_used_ip(Array) #3 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158 


Create composite primary key on fud30_ann_forums(ann_id,forum_id).
Warning: pg_query(): Query failed: FEHLER: Spalte i.oid existiert nicht LINE 1: ...id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fu... ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte i.oid existiert nicht LINE 1: ...id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fu... ^ @ DELETE FROM fud30_ann_forums WHERE EXISTS (SELECT 1 FROM fud30_ann_forums i WHERE i.ann_id = fud30_ann_forums.ann_id AND i.forum_id = fud30_ann_forums.forum_id AND i.oid < fud30_ann_forums.oid)' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('DELETE FROM fud...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/private/include/dbadmin.inc(589): q('DELETE FROM fud...') #2 /home/httpd/XXX/rag/private/include/dbadmin.inc(379): delete_duplicate_rows('fud30_ann_forum...', 'ann_id,forum_id') #3 /home/httpd/XXX/rag/upgrade.php(978): create_primary_key('fud30_ann_forum...', 'ann_id,forum_id') #4 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158


Add new database index fud30_msg_report_i_mu to table fud30_msg_report(msg_id,user_id).
Warning: pg_query(): Query failed: FEHLER: Spalte i.oid existiert nicht LINE 1: ...g_id AND i.user_id = fud30_msg_report.user_id AND i.oid < fu... ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte i.oid existiert nicht LINE 1: ...g_id AND i.user_id = fud30_msg_report.user_id AND i.oid < fu... ^ @ DELETE FROM fud30_msg_report WHERE EXISTS (SELECT 1 FROM fud30_msg_report i WHERE i.msg_id = fud30_msg_report.msg_id AND i.user_id = fud30_msg_report.user_id AND i.oid < fud30_msg_report.oid)' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('DELETE FROM fud...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/private/include/dbadmin.inc(589): q('DELETE FROM fud...') #2 /home/httpd/XXX/rag/private/include/dbadmin.inc(624): delete_duplicate_rows('fud30_msg_repor...', 'msg_id,user_id') #3 /home/httpd/XXX/rag/upgrade.php(942): create_index('fud30_msg_repor...', 'fud30_msg_repor...', 1, 'msg_id,user_id') #4 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158 


Recreate database index fud30_mime_f on table fud30_mime(fl_ext).
Warning: pg_query(): Query failed: FEHLER: Spalte i.oid existiert nicht LINE 1: ...d30_mime i WHERE i.fl_ext = fud30_mime.fl_ext AND i.oid < fu... ^ in /home/httpd/XXX/rag/private/sql/pgsql/db.inc on line 108 Fatal error: Uncaught exception 'Exception' with message ': FEHLER: Spalte i.oid existiert nicht LINE 1: ...d30_mime i WHERE i.fl_ext = fud30_mime.fl_ext AND i.oid < fu... ^ @ DELETE FROM fud30_mime WHERE EXISTS (SELECT 1 FROM fud30_mime i WHERE i.fl_ext = fud30_mime.fl_ext AND i.oid < fud30_mime.oid)' in /home/httpd/XXX/rag/upgrade.php:158 Stack trace: #0 /home/httpd/XXX/rag/private/sql/pgsql/db.inc(108): fud_sql_error_handler('DELETE FROM fud...', 'FEHLER: Spalte...', '', '8.4.13') #1 /home/httpd/XXX/rag/private/include/dbadmin.inc(589): q('DELETE FROM fud...') #2 /home/httpd/XXX/rag/private/include/dbadmin.inc(624): delete_duplicate_rows('fud30_mime', 'fl_ext') #3 /home/httpd/XXX/rag/upgrade.php(948): create_index('fud30_mime', 'fud30_mime_f', 1, 'fl_ext') #4 {main} thrown in /home/httpd/XXX/rag/upgrade.php on line 158



I hope this helps for error analysis and bug fixing.

[Updated on: Sat, 13 October 2012 21:37]

Report message to a moderator

Re: Aw: Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167824 is a reply to message #167823] Sun, 14 October 2012 07:07 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Let's look at the first error:

FUDforum added a 'registration_ip' field to the users table, after that it calls function users_registration_ip() to convert data from the old 'reg_ip' column to the newly added 'registration_ip' column. However, it cannot find the old 'reg_ip' column! So, where did it go? FUDforum certainly couldn't have worked without it. I would restore the database and redo the upgrade.
Aw: Re: Aw: Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167825 is a reply to message #167824] Mon, 15 October 2012 20:49 Go to previous messageGo to next message
-ml- is currently offline  -ml-
Messages: 12
Registered: March 2012
Karma: 0
Junior Member
Thanks for your answer.

Might that 'reg_ip' column have gone during an earlier attempt to update to 3.0.3? I tried this some months ago without success.

Now the good news is that my forum seems to work again.
The consistency check was successful. So far I have no complaints from my users except one:
Adding attachments does not seem to work. I get the following SQL error in the log:

/home/httpd/XXX/rag/index.php:120
/home/httpd/XXX/rag/index.php:210
/home/httpd/XXX/rag/theme/RAG_neu/post.php:2972
/home/httpd/XXX/rag/theme/RAG_neu/post.php:4237
/home/httpd/XXX/rag/index.php:1360
) : FEHLER: NULL-Wert in Spalte »location« verletzt Not-Null-Constraint
Query: INSERT INTO fud30_attach (location, message_id, original_name, owner, attach_opt, mime_type,fsize) SELECT null AS location, 0 AS message_id, 'Erfahrungsbericht 2012.pdf' AS original_name, 2 AS owner, 0 AS attach_opt, id AS mime_type, 71319 AS fsize FROM fud30_mime WHERE fl_ext IN('*', 'pdf') ORDER BY fl_ext DESC LIMIT 1 OFFSET 0
_GET: array ( 't' => 'post', )
_POST: array ( 'S' => '49e73d1e58b7448156ef68da94aac5a7', 'SQ' => 'e36871d64803a03b624c93fd9e7d5250', 'submitted' => '', 'reply_to' => '0', 'th_id' => '113', 'frm_id' => '6', 'start' => '0', 'msg_id' => '959', 'pl_id' => '0', 'old_subject' => '', 'prev_loaded' => '1', 'msg_subject' => 'Fehler in der Forensoftware beim Einrichten für 2013', 'msg_tdescr' => '', 'thr_ordertype' => '0', 'thr_orderexpiry' => '1000000000', 'msg_icon' => '', 'fnt_size' => '', 'fnt_color' => '', 'fnt_face' => '', 'msg_body' => 'YYY', 'MAX_FILE_SIZE' => '20971520', 'attach_control_add' => 'Datei hochladen', 'tmp_f_val' => '1', 'msg_poster_notif' => 'Y', 'msg_show_sig' => 'Y', 'minimsg_pager_switch' => '0', )
Database version: 8.4.13


Looks like there is something wrong with the 'location' column. Is there anything I can do to fix this?
I won't like to revert to an rather old backup.

[Updated on: Mon, 15 October 2012 20:56]

Report message to a moderator

Re: Aw: Re: Aw: Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167827 is a reply to message #167825] Tue, 16 October 2012 05:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You need to change the 'location'column; from
VARCHAR(255) NOT NULL DEFAULT '',
to just
VARCHAR(255),
on the database level.

The upgrade script was supposed to do it.
icon14.gif  Aw: Re: Aw: Re: Aw: Upgrading 3.0.1 -> 3.0.4.1 failed: Convert reg_ip to registration_ip for IPv6 [message #167832 is a reply to message #167827] Tue, 16 October 2012 21:11 Go to previous message
-ml- is currently offline  -ml-
Messages: 12
Registered: March 2012
Karma: 0
Junior Member
Thanks Naudefj,

now everything seems to be fine again!

Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Upgrade from 2.3.5 to 3.0.0 not working
Next Topic: Error when creating custom theme -> mnav.tmpl
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 11:33:29 GMT 2024

Total time taken to generate the page: 0.02280 seconds