128_09_2006_phpwcms.php_redirects to login

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

128_09_2006_phpwcms.php_redirects to login

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9791
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Post by Oliver Georgi »

Have you tried to uncomment session_write_close();

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
Oliver Georgi
Site Admin
Posts: 9791
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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,
:)
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post 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.
:)
phux2000
Posts: 6
Joined: Sun 29. Oct 2006, 21:16
Contact:

Post 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
$> man woman
$> segmentation fault (core dumped)
User avatar
Oliver Georgi
Site Admin
Posts: 9791
Joined: Fri 3. Oct 2003, 22:22
Location: Moscow, Russia
Contact:

Post by Oliver Georgi »

I think I have found your problems - check db and field settings...

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
cyppher.nl
Posts: 138
Joined: Wed 19. May 2004, 18:38
Location: Hilversum, Netherlands

Post 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...
How do you do? And how do you do your wife?
Locked