1.2.8 double patched, double definition in default.inc.php

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

1.2.8 double patched, double definition in default.inc.php

Post by juergen »

Hello,

my version comes from 1.2.6 (2005) updated to earliest 1.2.8, running smooth.

Today updated the last code, when calling anything (back- or frotend)

Error...in ..../htdocs... /default.inc.php
solved for me in "default.inc.php:

Code: Select all

//function headerRedirect($target='') {

//	header('Location: '.$target);
//	if(isset($_SESSION)) {
//		session_write_close();
//	}
//	exit();
	
//}
running again ... ähem .. had no backup :shock:

Anyway, function is double defined. When removing slashes I can see where

to be honest ... next time I register sourceforge,,

Jürgen :oops:
User avatar
Oliver Georgi
Site Admin
Posts: 9918
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sorry a specific bug only in your installation. Maybe you have forgotten to update all files or what ever.

Have made a search - just one "function headerRedirect()" in default.inc.php. So check your index.php. Can be there only.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Post by juergen »

so i reproduce it:

Fatal error: Cannot redeclare headerredirect() (previously declared in /var/...../include/inc_lib/default.inc.php:228) in /var/...../include/inc_lib/general.inc.php on line 1067

hmm

btw.: A clean install, noch hacks

so here it is (checked 1.2.8 (07.08.2006) in download-source for general.inc.php:

/include/inc_lib/default.inc.php line 228 ff. (this one updated)

Code: Select all

function headerRedirect($target='') {

	header('Location: '.$target);
	if(isset($_SESSION)) {
		session_write_close();
	}
	exit();
	
}
and in /include/inc_lib/general.inc.php Line 1067 ff.:

Code: Select all

function headerRedirect($target='') {

	header('Location: '.$target);
	if(isset($_SESSION)) {
		session_write_close();
	}
	exit();
	
}
As far as I see it makes no difference where I will take that out...

Jürgen
Locked