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

Home » FUDforum Development » FUDforum 3.0+ » Problem using forum_login.php
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Problem using forum_login.php [message #29810] Tue, 17 January 2006 18:58 Go to next message
holdech is currently offline  holdech   Canada
Messages: 9
Registered: November 2005
Karma: 0
Junior Member
I upgraded to 2.7.4rc1 and it solved several problems I was having.

But, I need to log into the forum from another application, using the forum_login.php script. This used to work perfectly, but now I get a sql error with thins in sql_errors:

ERROR: Cannot insert a duplicate key into unique index fud26_forum_read_i_fu
Query: INSERT INTO fud26_forum_read (forum_id, user_id, last_view) VALUES (7, 4, 1132240073)

Maybe I should truncate the table?

Chris
Re: Problem using forum_login.php [message #29814 is a reply to message #29810] Tue, 17 January 2006 19:29 Go to previous messageGo to next message
holdech is currently offline  holdech   Canada
Messages: 9
Registered: November 2005
Karma: 0
Junior Member
I emptied the offending table, but still get a sql error.

The sql_error file contains:
?370 ?1137525628?(/home/mysite.com/html/forum/include/theme/default/db.inc:29<br />
/home/mysite.com/html/forum/scripts/forum_login.php:63<br />
/home/mysite.com/lite/html/forum/scripts/forum_login.php:44<br />
/home/mysite.com/lite/html/Fudlogin.php:13<br />
) : <br />
Query: Initiating pg_connect<br />
Server Version: Unknown<br />


Fudlogin.php is my script, with bacically this content:
$fuduid = external_get_user_by_auth($session[clientid]."*".$session[usercontid], "biteme");
$fudret = external_fud_login($fuduid);
if ($fudret) {
header("location: ./forum");
} else {
echo "error";
}

Thank you,

Chris
Re: Problem using forum_login.php [message #29816 is a reply to message #29814] Tue, 17 January 2006 19:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The error seems to be the result of a failing attempt to establish a connection to PostgreSQL database. You need to make sure that the PATH_TO_FUD_FORUM_GLOBALS_PHP variable points to valid path of GLOBALS.php

FUDforum Core Developer
Re: Problem using forum_login.php [message #29820 is a reply to message #29816] Tue, 17 January 2006 20:12 Go to previous message
holdech is currently offline  holdech   Canada
Messages: 9
Registered: November 2005
Karma: 0
Junior Member
Thanks,

That was the problem. I forget that I had to update that variable at the top of forum_login.php - when the upgrade replaced it the problems began.

Works great now. The API sets up new users from my main application - and they can now log in from the app.

I was having problems (previous version) with blank pages being displayed after posting topics/replies. Now everything seems to work fine.

Thanks again,

Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: data-storage - understanding problem
Next Topic: Suggestion: new message indicator
Goto Forum:
  

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

Current Time: Sun Nov 10 13:02:31 GMT 2024

Total time taken to generate the page: 0.02429 seconds