Project

General

Profile

Actions

Bug #26982

closed

check SID constant - install tool

Added by Tomas Norre Mikkelsen over 13 years ago. Updated over 13 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2011-05-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,

I don't know if this is the right fora or not, but no response at the typo3-dev maillinglist.

I have some question regarding the check for sessions made in the typo3/sysext/install/mod/class.tx_install_session.php (line 129)

"} else if (defined('SID') {"

The line checks if the SID constant is defined, but not if its defined as an empty value. The problem is for me, when trying to use the install-tool i got following message.


Install Tool error
Error: Session already started by session_start().
Make sure no installed extension is starting a session in its ext_localconf.php or ext_tables.php.

But none of my extensions installed contains session_start() niegther in ext_localconf.php or ext_tables.php, or in the extensions in generel.

My questions are:

1) Why check for defined, but not if empty?

2) Should there be a patch/bug report? A quick solution that works for me is to edit the line to following:

" } else if (defined('SID') && strlen(SID) >= 0) {"

I'm quite sure its not the prettiest way to fix this, but it works, and i'm quite confused right now.

3) Is it me that have miss the overview of how this is surposed to work?

Any hints, suggestion etc are very welcome. I'm quite confused on this topic.


Files

extList.txt (1.55 KB) extList.txt Tomas Norre Mikkelsen, 2011-05-25 08:29
Actions #1

Updated by Patrick Rodacker over 13 years ago

Hi Tomas,

But none of my extensions installed contains session_start() niegther in ext_localconf.php or ext_tables.php, or in the extensions in generel.

Could you provide the list of installed extensions from your localconf.php?

1) Why check for defined, but not if empty?

2) Should there be a patch/bug report? A quick solution that works for me is to edit the line to following:

" } else if (defined('SID') && strlen(SID) >= 0) {"

I'm quite sure its not the prettiest way to fix this, but it works, and i'm quite confused right now.
3) Is it me that have miss the overview of how this is surposed to work?

Any hints, suggestion etc are very welcome. I'm quite confused on this topic.

Have a look at the php docs [1]:

Alternatively, you can use the constant SID which is defined if the session started. If the client did not send an appropriate session cookie, it has the form session_name=session_id. Otherwise, it expands to an empty string. Thus, you can embed it unconditionally into URLs.

IMO there is no need for an additional check or patch, because the session should not be started at that point of the process. So there must be another place within your system where the session is started before.

HTH
Patrick

[1] http://php.net/manual/en/session.idpassing.php

Actions #2

Updated by Tomas Norre Mikkelsen over 13 years ago

Hi,

My extensionlist is as following, see attachment.

I have searched through the typo3conf/ext dir for sessions_start() but none found. So quite confused where its coming from.

/Tomas

Actions #3

Updated by Tomas Norre Mikkelsen over 13 years ago

This task can be removed.

There was an session_start() in an included library which i didn't find searching through the solution.

Sorry for trouble.

Actions #4

Updated by Steffen Gebert over 13 years ago

  • Status changed from New to Rejected
Actions

Also available in: Atom PDF