pdo_concat() declared in both index.php and db.inc [message #39148] |
Wed, 03 October 2007 16:52 |
pgregg
Messages: 14 Registered: July 2006
Karma: 0
|
Junior Member |
|
|
I've building out a new website with FUDforum using the API to automate the login and user creation with our single sign on. How this works is that you click on the login button from any page in the site and it takes you out to a SSO website which bounces you back to the page you were on upon successful login.
Everything is working so far with one exception - if I login on a page outside of the forums then browse into the forum, no problem.
However, if I am on a forum page and login - my redirect back goes into the forum and the forum processing happens first and I get the following error:
Fatal error: Cannot redeclare pdo_concat() (previously declared in E:\web\support\production\community\index.php:68) in E:\web\support\FUDforum_data\include\theme\default\db.inc on line 67
The index.php page contains the same code as db.inc file so to fix on my end, I have wrapped the top half of index.php down to and including function _esc declaration in a if !function_exists('pdo_concat'
when I did this, the error message swapped saying previously declared in db.inc - so I had to make the same change in db.inc and db.inc.t
I just wonder if I rebuild the theme, will my main forum index.php get blown away (coudn't find the template for that).
The reason this is happening is because in my template header, I call my site's global login handler, which because it is the first time the user has authed to the site, pulls in fudapi/forum_login (and so db.inc) in order to setup/login the user.
Thanks,
PG
|
|
|
|
Re: pdo_concat() declared in both index.php and db.inc [message #39151 is a reply to message #39148] |
Wed, 03 October 2007 20:32 |
pgregg
Messages: 14 Registered: July 2006
Karma: 0
|
Junior Member |
|
|
Yep, I'm already doing that - see attached image.
[edit]
I suppose as a workaround, in the login handler, check if the current url is the forum and, instead of letting execution drop through to the rest of the forum code, issue a header redirect to REQUEST_URI - the subsequent call will have authentication all set and my login handler won't pull in the fudapi files and so there will be no conflict.
Regards,
PG
-
Attachment: fud.jpg
(Size: 88.22KB, Downloaded 1172 times)
[Updated on: Wed, 03 October 2007 20:38] Report message to a moderator
|
|
|