After clean install and config, a Joomla login attempt consistently produces the error below. I am not using CB. The error occurs with BOTH Joomla and SMF registration module selected in the config, during BOTH login and logout. Interestingly, although both login and logout produce the error, the login actually is successful, but the logout is not:
Fatal error: Cannot redeclare db_query() (previously declared in C:\Program Files\xampp\htdocs\r2\forum\Sources\Subs.php:237) in c:\Program Files\xampp\htdocs\r2\forum\Sources\Subs.php on line 237
NO CommunityBuilder (or CB plugin, just the standard login...)
PHP 4.4.0
MySQL 4.1.14-nt
Apache 2.0.54
Occurs in both Firefox 1.5.0.1 and IE 6.0.2;SP2
Running on XP Media Center '05
Only other installed components are ExtCal, MosCE and JoomlaBoard 1.1.2
And yes, I've done several reinstalls, reconfigs, repatches, reloads, and even a reboot for good measure.
This bug was posted last month in the SMF 1.0.x forum, but I thought I'd post it here since I'm using SMF 1.1RC2(patch1), and it was never resolved in the previous release.
my guess is that for some reason if Subs.php has already been included and then it is included again your webserver calls foul... or php... or something doesn't like that. It is obviously a configuration or the rest of us would have this issue. I see that if a user isn't found in SMF this file could be required then included. This happens in two separate functions and normally would occur on login or logout... at the end of login and in the middle of a logout scenario. There might be a better way to do this, I will investigate.
ya, but when it was last reported a move from a localhost machine solved the problem. The issue is that we need to fail if we can't include the file Subs.php so I am very hesitant to change the bit of code that is most likely causing this. As a workaround you can modify the code in and around line 865(1205 in JSMF 1.1):
Code:
require_once($smf_path . '/Sources/Subs.php');
change this to
Code:
include_once($smf_path . '/Sources/Subs.php');
and you should not receive the fatal error anymore.
« Last Edit: April 04, 2006, 07:56:58 AM by -Wolverine »
Thanks for the very quick reply! The code change didn't have any effect; neither did commenting the line out altogether. However, just for fun I commented out line 980, and everything works like a charm now:
I don't know what to make of this yet. I have to work on a few other things tonight. But I wanted to thank you for your speedy assistance and let you know as soon as possible what I found...
ahhh, but this line tells the story. st$p$d windows:
Quote from: php.net include_once definition
Note: Be aware, that the behaviour of include_once() and require_once() may not be what you expect on a non case sensitive operating system (such as Windows).
Thanks for the very quick reply! The code change didn't have any effect; neither did commenting the line out altogether. However, just for fun I commented out line 980, and everything works like a charm now:
I don't know what to make of this yet. I have to work on a few other things tonight. But I wanted to thank you for your speedy assistance and let you know as soon as possible what I found...
Well...my copy of that file looks nothing like the one being talked about here (based on line numbers) and editing it to remove or change any references to including subs.php didn't fix the issue for me.
Right now, I'm going back to an earlier version of the bridge, which didn't contain this issue.
RC2+fixes? Only comments and a few parameters were retrieved using a Joomla function versus regular retrieval, but nothing in regards to the bit of code that is failing for you. And some people had this problem with RC2 so I am not sure what is going on for you though.
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved. Terms of Use