Page 1 of 1

128_09_2006_phpwcms.php_redirects to login

Posted: Fri 27. Oct 2006, 20:12
by jsw_nz
I have done a virgin install of 09_2006 version of 128 - and alas I am encountering the same issue - basically I am always sent back to login.php via redirect.

Essentially $_SESSION data is not available

therefore:
checklogin.inc.php
redirects to login.php

perhaps session_write_close is misbehaving

Since the function in default.inc.php calls it during redirect:

Code: Select all

function headerRedirect($target='') {
	header('Location: '.$target);
	if(isset($_SESSION)) {
		session_write_close();
	}
	exit();
}



I have to believe this is an issue of my hosting service
and not phpwcms code - maybe i should have entered this post in support

here is info of installation:

PHP Version 4.3.9 -- might this be an issue?

http://www.designjournal.co.nz/info.php

Posted: Sun 29. Oct 2006, 23:44
by Oliver Georgi
Have you tried to uncomment session_write_close();

Oliver

Posted: Sun 29. Oct 2006, 23:46
by Oliver Georgi
Ah maybe this might help - in include/inc_lib/default.inc.php:

Code: Select all

function headerRedirect($target='') {
   if(isset($_SESSION)) {
      session_write_close();
   }
   header('Location: '.$target);
   exit();
}
Oliver

Posted: Mon 30. Oct 2006, 00:03
by jsw_nz
Hi Oliver,

Thanks for your response

Reply (1)
Yes I did try to uncomment session_write_close();, which gave me login access to backend. In the newest version of 128 (sept) i found out that the admin menu did not show up - is this now dependent on usr_rechts == 1? Anyway, as far as newest 128, this seemed not a good solution

(2)
Yes I tried changing the order of session_write_close();, placing it before the final redirect - there were no changes to behavior.

I am not sure about all this since dev127 (and maybe even earlier versions) use the session_write_close(); scheme, and I have never encountered this problem. I have used this hosting service in the past and have successfully run 128 (August) inside PHP 4.4.2

The issues I am having with newest install (designjournal.co.nz) might be related to quirky installation of php, which is version 4.3.9 - i have to believe is a quirk in how sessions are handled...

working php version 4.4.2
http://kingshigh.123abc.co.nz/info_2.php

buggy version php version 4.3.9
http://www.designjournal.co.nz/info.php

cheers,
:)

Posted: Tue 31. Oct 2006, 20:57
by jsw_nz
UPDATE

As I thought the issue was related to a server configuration - no session_path/temp folder to save to (was somehow deleted on their end) - thus the issues. Anyway thanks for your response Oli.
:)

Posted: Wed 1. Nov 2006, 13:46
by phux2000
Oliver Georgi wrote:Ah maybe this might help - in include/inc_lib/default.inc.php:

Code: Select all

function headerRedirect($target='') {
   if(isset($_SESSION)) {
      session_write_close();
   }
   header('Location: '.$target);
   exit();
}
Oliver

Hi,

I tried this, but it didn't help ...
What can I do???

Patrick

Posted: Thu 2. Nov 2006, 13:18
by Oliver Georgi
I think I have found your problems - check db and field settings...

Oliver

Posted: Sun 26. Nov 2006, 13:49
by cyppher.nl
What if there's no function called headerRedirect in that file??
(version: phpwcms v1.2.5-DEV )
Add it??

db and table settings seem ok, session is written in table...