Author Topic: [SOLVED]Error registration:"An unexpected error occured. Please try again later"  (Read 7950 times)

0 Members and 1 Guest are viewing this topic.

Offline derrick

  • Newbie
  • *
  • Posts: 15
    • View Profile
Hi,
I have problem with new users registration. Everything worked fine for a long time but I have registration problem right now.. When somebody want to create new account, this message appears: "An unexpected error occured. Please try again later.". I'm running on 4images 1.7.4. url: www.artvision.sk.
I dont want upgrade to new version because I did many many many customizations in gallery and i'm a bit scared of moving them to new version.
Please, do you have an idea what could be wrong there?
Thanks!
Duso
« Last Edit: October 27, 2008, 11:03:52 PM by derrick »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
In includes/db_mysql.php find:
        echo "<br /><font color='#FF0000'><b>An unexpected error occured. Please try again later.</b></font><br />";

replace it with:
        echo "<br /><font color='#FF0000'><b>DB Error</b></font>: ".$errmsg."<br />";


The try register again and post the exact error message it shows.

P.S.
you should remove this change once you see the error.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline derrick

  • Newbie
  • *
  • Posts: 15
    • View Profile
In includes/db_mysql.php find:
        echo "<br /><font color='#FF0000'><b>An unexpected error occured. Please try again later.</b></font><br />";

replace it with:
        echo "<br /><font color='#FF0000'><b>DB Error</b></font>: ".$errmsg."<br />";


The try register again and post the exact error message it shows.

P.S.
you should remove this change once you see the error.


Hi V@no,

This error message appears:
"
DB Error: Bad SQL Query: INSERT INTO 4images1_users (user_id, user_level, user_name, user_password, user_email, user_showemail, user_allowemails, user_invisible, user_joindate, user_activationkey, user_lastaction, user_lastvisit, user_comments, user_homepage, user_icq) VALUES (127, 2, 'bakchus', 'cd717911dab67e1eb51338a73bc627c0', 'something@gmail.com', 0, 1, 0, 1225119792, '039957c7962dc39f9fd411159b01f587', 1225119792, 1225119792, 0, '', '')
Field 'user_signature' doesn't have a default value
"
Thanks for your help and support!

Duso 

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
there are two ways solve this problem:
1) edit 4images1_users table in phpmyadmin and set default value for user_signature field to an empty string.

2) in register_form.html template, above </form> insert:
Code: [Select]
<input type="hidden" name="user_signature"  value="">
the first method is preferable.
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline derrick

  • Newbie
  • *
  • Posts: 15
    • View Profile
I used 1st method and registration is working now!
Thanks!!! :D

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Don't forget remove changes in db_mysql.php ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)