Bug #26982
closedcheck SID constant - install tool
0%
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
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
Updated by Tomas Norre Mikkelsen over 13 years ago
- File extList.txt extList.txt added
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
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.