MyBB Community Forums

Full Version: Fatal error: Cannot redeclare user_exists()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is getting me quite myth'd. I've not edited the file inc/function_user.php however this error comes up when people log in. Nothing looks dodgy with the coding and I've even used a new copy of the file from the latest 1.2.7 download.

Quote:Fatal error: Cannot redeclare user_exists() (previously declared in /full/path/dalehay.com/convo/inc/functions_user.php:9) in /full/path/dalehay.com/convo/inc/functions_user.php on line 21

Any ideas?
Could you attach your functions_user.php file or paste me the line 9 and line 21?
CraKteR Wrote:Could you attach your functions_user.php file or paste me the line 9 and line 21?

Line 9 - 21 is how it is in the normal download that you can get off the main site, which is what puzzles me.

function user_exists($uid)
{
	global $db;
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid='".intval($uid)."' LIMIT 1");
	if($db->fetch_array($query))
	{
		return true;
	}
	else
	{
		return false;
	}
}
Tried deleting the file and uploading it in Text/ASCII mode?
Tried it and it's still showing the same error. :/
Greetings!
Any solution on this one? I have the same error after upgrading from 1.2 to 1.2.12.. I have tried it like 3 times in a row already... deleting databse, installing 1.2 then upgrading it to 1.2.12.. same error.
Do you have any plugins installed?
Tikitiki Wrote:Do you have any plugins installed?

None.. basically started from scratch since I have already deleted my fairly young forum (just 50+ posts)... so no plugins.. starting from scratch..

I have already done it 3 times in a row.. create database, upload myBB 1.2, chmod, install... delete old Install folder... download and save config.php and settings.php to PC.. upload myBB 1.2.12 (overwriting files that needed to be overwritten) , upload config.php and settings.php ... upgrade to 1.2.12 ... delete Install folder again...

Forum is okay after that... but when logging in as Admin (via xxx.forumnamehere.com/admin) boom! Fatal error.. can't even click Register or Login..

I have done everything by the book... and the downloads are fresh from myBB webstite too.. What could have gone wrong?

Here are my webhost server specifics..maybe its a compatibility issue with MySQL version?

Apache version 1.3.39 (Unix)
PHP version 5.2.5
MySQL version 5.0.45-community
Architecture i686
Operating system Linux
Just one follow up question ..

Installing the major release (1.2) and then jumping off to the 1.2.12 Security and Maintenance upgrade release would also automatically include the patches from 1.2.1 - 1.2.11 ??

What's the proper procedure if one is starting from scratch ??
w00tw00t Wrote:Just one follow up question ..

Installing the major release (1.2) and then jumping off to the 1.2.12 Security and Maintenance upgrade release would also automatically include the patches from 1.2.1 - 1.2.11 ??

What's the proper procedure if one is starting from scratch ??

If one is starting from scratch then one would get 1.2.12 directly from the homepage and use that instead.
Pages: 1 2