New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logging in in PHP 5.3 #11430

Merged
merged 1 commit into from Aug 4, 2016

Conversation

Projects
None yet
@wilsonge
Contributor

wilsonge commented Aug 4, 2016

Pull Request for Issue #11428 .

Summary of Changes

Fixes login in PHP 5.3

Testing Instructions

Test logging in and logging out. In PHP 5.4+ continues to work in 5.3 it starts working again

@wilsonge

This comment has been minimized.

Show comment
Hide comment
@wilsonge

wilsonge Aug 4, 2016

Contributor

Marking test of @sarsami from #11428


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Contributor

wilsonge commented Aug 4, 2016

Marking test of @sarsami from #11428


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

@mediosweb

This comment has been minimized.

Show comment
Hide comment
@mediosweb

mediosweb Aug 4, 2016

i have made suggested modfications, and still get same error:
Se ha producido un error.

0 Failed to start the session: already started by PHP ($_SESSION is set). 

mediosweb commented Aug 4, 2016

i have made suggested modfications, and still get same error:
Se ha producido un error.

0 Failed to start the session: already started by PHP ($_SESSION is set). 
@Sandhie

This comment has been minimized.

Show comment
Hide comment
@Sandhie

Sandhie Aug 4, 2016

Works for me... Thank you!

Sandhie commented Aug 4, 2016

Works for me... Thank you!

@mediosweb

This comment has been minimized.

Show comment
Hide comment
@mediosweb

mediosweb Aug 4, 2016

Has worked !
sorry i missed line 154
now its ok!
thanks!!!

mediosweb commented Aug 4, 2016

Has worked !
sorry i missed line 154
now its ok!
thanks!!!

@missnene

This comment has been minimized.

Show comment
Hide comment
@missnene

missnene Aug 4, 2016

IT WORKS!!! 👍 Thanks!
I think if I saw that failed to start session error one more time, I wouldn't own a laptop anymore. 😂

missnene commented Aug 4, 2016

IT WORKS!!! 👍 Thanks!
I think if I saw that failed to start session error one more time, I wouldn't own a laptop anymore. 😂

@Flow1976

This comment has been minimized.

Show comment
Hide comment
@Flow1976

Flow1976 Aug 4, 2016

I have a same problem :(
0 Failed to start the session: already started by PHP ($_SESSION is set).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Flow1976 commented Aug 4, 2016

I have a same problem :(
0 Failed to start the session: already started by PHP ($_SESSION is set).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

@Flow1976

This comment has been minimized.

Show comment
Hide comment
@Flow1976

Flow1976 Aug 4, 2016

👍 Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Flow1976 commented Aug 4, 2016

👍 Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

@joomdonation

This comment has been minimized.

Show comment
Hide comment
@joomdonation

joomdonation Aug 4, 2016

Contributor

I have tested this item successfully on cfcaac3

Tested on two test sites:

  1. One site running on PHP 5.3: Before patch, we had issue with Login. After patch, login works.
  2. One site running on PHP 5.6: Login still works after applying the patch.
    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.
Contributor

joomdonation commented Aug 4, 2016

I have tested this item successfully on cfcaac3

Tested on two test sites:

  1. One site running on PHP 5.3: Before patch, we had issue with Login. After patch, login works.
  2. One site running on PHP 5.6: Login still works after applying the patch.
    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.
@khanhlh

This comment has been minimized.

Show comment
Hide comment
@khanhlh

khanhlh Aug 4, 2016

Contributor

The fix works. Anyway, set default value for $started as false and $closed as true is enough to fix the issue.

Contributor

khanhlh commented Aug 4, 2016

The fix works. Anyway, set default value for $started as false and $closed as true is enough to fix the issue.

@wilsonge wilsonge merged commit 1a6a250 into staging Aug 4, 2016

3 checks passed

JTracker/HumanTestResults Human Test Results: 2 Successful 0 Failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@joomla-ua

This comment has been minimized.

Show comment
Hide comment
@joomla-ua

joomla-ua Aug 4, 2016

Contributor

PHP 5.3.17 after apply patch work perfect!

Contributor

joomla-ua commented Aug 4, 2016

PHP 5.3.17 after apply patch work perfect!

@wilsonge wilsonge deleted the fix-5.3-login branch Aug 4, 2016

@wilsonge

This comment has been minimized.

Show comment
Hide comment
@wilsonge

wilsonge Aug 4, 2016

Contributor

Thanks guys. I've merged this. I'll hold until this evening to make sure there are no more issues that are going to crop up. But probably will be a 3.6.2 tonight with this in

Contributor

wilsonge commented Aug 4, 2016

Thanks guys. I've merged this. I'll hold until this evening to make sure there are no more issues that are going to crop up. But probably will be a 3.6.2 tonight with this in

@rdeutz rdeutz added this to the 3.6.2 milestone Aug 4, 2016

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor Aug 4, 2016

Contributor

If you are running PHP 5.3 then you have bigger issues than just this. Pathetic.

Contributor

PhilETaylor commented Aug 4, 2016

If you are running PHP 5.3 then you have bigger issues than just this. Pathetic.

@jrmain

This comment has been minimized.

Show comment
Hide comment
@jrmain

jrmain Aug 4, 2016

@PhilETaylor - in my case, as it likely is with many other people still technically running PHP 5.3, what I'm actually running is a version of PHP 5.3 that's had relevant post-5.3 security fixes applied to it, such as the versions available for Ubuntu LTS releases. I actually prefer to run tried and tested version of PHP, rather than the latest versions with new features and changes that are typically the source of new security vulnerabilities. Of course, eventually I'll have to upgrade when certain new features become necessary.

jrmain commented Aug 4, 2016

@PhilETaylor - in my case, as it likely is with many other people still technically running PHP 5.3, what I'm actually running is a version of PHP 5.3 that's had relevant post-5.3 security fixes applied to it, such as the versions available for Ubuntu LTS releases. I actually prefer to run tried and tested version of PHP, rather than the latest versions with new features and changes that are typically the source of new security vulnerabilities. Of course, eventually I'll have to upgrade when certain new features become necessary.

@jrmain

This comment has been minimized.

Show comment
Hide comment
@jrmain

jrmain Aug 4, 2016

This fix worked perfectly for me. Looking forward to the official fix in 3.6.2. Thanks!

jrmain commented Aug 4, 2016

This fix worked perfectly for me. Looking forward to the official fix in 3.6.2. Thanks!

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor Aug 4, 2016

Contributor

There is no reason at all for running PHP 5.3 in July 2016... its all excuses I have heard time and again.

Contributor

PhilETaylor commented Aug 4, 2016

There is no reason at all for running PHP 5.3 in July 2016... its all excuses I have heard time and again.

@elistina

This comment has been minimized.

Show comment
Hide comment
@elistina

elistina Aug 4, 2016

IT WORKS!!! Thanks a lot!

elistina commented Aug 4, 2016

IT WORKS!!! Thanks a lot!

@jrmain

This comment has been minimized.

Show comment
Hide comment
@jrmain

jrmain Aug 4, 2016

@PhilETaylor - Yeah, well, that's just, like, your opinion, man. I would rather run a secure server than one that supports features I don't need.

jrmain commented Aug 4, 2016

@PhilETaylor - Yeah, well, that's just, like, your opinion, man. I would rather run a secure server than one that supports features I don't need.

@smu77

This comment has been minimized.

Show comment
Hide comment
@smu77

smu77 Aug 4, 2016

Thx a lot. Works fine!

smu77 commented Aug 4, 2016

Thx a lot. Works fine!

@mbabker

This comment has been minimized.

Show comment
Hide comment
@mbabker

mbabker Aug 4, 2016

Member

Not sure how a server running unsupported software is secure but that's neither here nor there regarding this issue.

Member

mbabker commented Aug 4, 2016

Not sure how a server running unsupported software is secure but that's neither here nor there regarding this issue.

@Luisriveraa

This comment has been minimized.

Show comment
Hide comment
@Luisriveraa

Luisriveraa Aug 4, 2016

Great. I works fine. Thanks a lot.

Luisriveraa commented Aug 4, 2016

Great. I works fine. Thanks a lot.

@Nexthought

This comment has been minimized.

Show comment
Hide comment
@Nexthought

Nexthought Aug 4, 2016

How can I apply the patch ? I have no directory where to put it and can't open the joomla session. Please help !! 😰

Nexthought commented Aug 4, 2016

How can I apply the patch ? I have no directory where to put it and can't open the joomla session. Please help !! 😰

@wojsmol

This comment has been minimized.

Show comment
Hide comment
@Nexthought

This comment has been minimized.

Show comment
Hide comment
@Nexthought

Nexthought Aug 4, 2016

@wojsmol I saw it but I don't know where/how to apply it to make it effective. I am just beggining in this stuff.

Nexthought commented Aug 4, 2016

@wojsmol I saw it but I don't know where/how to apply it to make it effective. I am just beggining in this stuff.

@lalapo1

This comment has been minimized.

Show comment
Hide comment
@lalapo1

lalapo1 Aug 4, 2016

@Nexthought go here and copy:
https://raw.githubusercontent.com/joomla/joomla-cms/cfcaac3b7bf553a33a6bced765f3b8bdcb2f41fb/libraries/joomla/session/handler/native.php

replace

in

route

public_html/libraries/joomla/session/handler/native.php

native.php

regards

lalapo1 commented Aug 4, 2016

@Nexthought go here and copy:
https://raw.githubusercontent.com/joomla/joomla-cms/cfcaac3b7bf553a33a6bced765f3b8bdcb2f41fb/libraries/joomla/session/handler/native.php

replace

in

route

public_html/libraries/joomla/session/handler/native.php

native.php

regards

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor Aug 4, 2016

Contributor

I have tested this item successfully on cfcaac3

I used Joomla 3.6.1 Stable, _PHP 5.3.29_, on attempting to Login to frontend as super admin I get the common reported error message

I then manually applied patch from https://patch-diff.githubusercontent.com/raw/joomla/joomla-cms/pull/11430.patch with patch -p0 < patch and retested.

I was able to login in and out on the frontend and the admin console with a super admin with no errors.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Contributor

PhilETaylor commented Aug 4, 2016

I have tested this item successfully on cfcaac3

I used Joomla 3.6.1 Stable, _PHP 5.3.29_, on attempting to Login to frontend as super admin I get the common reported error message

I then manually applied patch from https://patch-diff.githubusercontent.com/raw/joomla/joomla-cms/pull/11430.patch with patch -p0 < patch and retested.

I was able to login in and out on the frontend and the admin console with a super admin with no errors.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

@microtribe

This comment has been minimized.

Show comment
Hide comment
@microtribe

microtribe Aug 4, 2016

I applied this fix and it worked running PHP 5.3. But upgrading to PHP 5.6 worked too and didn't require this fix.

microtribe commented Aug 4, 2016

I applied this fix and it worked running PHP 5.3. But upgrading to PHP 5.6 worked too and didn't require this fix.

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Aug 4, 2016

Contributor

On 4 Aug 2016 7:55 p.m., "Tony" notifications@github.com wrote:

I applied this fix and it worked running PHP 5.3. But upgrading to PHP
5.6 worked too and didn't require this fix.

Obviously because this is only needed on 5.3


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Contributor

brianteeman commented Aug 4, 2016

On 4 Aug 2016 7:55 p.m., "Tony" notifications@github.com wrote:

I applied this fix and it worked running PHP 5.3. But upgrading to PHP
5.6 worked too and didn't require this fix.

Obviously because this is only needed on 5.3


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor Aug 4, 2016

Contributor

I applied this fix and it worked running PHP 5.3. But upgrading to PHP 5.6 worked too and didn't require this fix.

Which is actually the CORRECT reaction to hitting a bug like this - well done. Upgrading is FTW.

Contributor

PhilETaylor commented Aug 4, 2016

I applied this fix and it worked running PHP 5.3. But upgrading to PHP 5.6 worked too and didn't require this fix.

Which is actually the CORRECT reaction to hitting a bug like this - well done. Upgrading is FTW.

@eduardocfs

This comment has been minimized.

Show comment
Hide comment
@eduardocfs

eduardocfs Aug 4, 2016

Works for me... Thank you!
I will follow the @PhilETaylor advice and upgrade my PHP.

eduardocfs commented Aug 4, 2016

Works for me... Thank you!
I will follow the @PhilETaylor advice and upgrade my PHP.

@ninj1766

This comment has been minimized.

Show comment
Hide comment
@ninj1766

ninj1766 Aug 5, 2016

what file name and where do I need to paste in this patch? Please.
Do I need to edit/replace any other code?

ninj1766 commented Aug 5, 2016

what file name and where do I need to paste in this patch? Please.
Do I need to edit/replace any other code?

@ninj1766

This comment has been minimized.

Show comment
Hide comment
@ninj1766

ninj1766 Aug 5, 2016

Also I am using PHP 5.39 right now

ninj1766 commented Aug 5, 2016

Also I am using PHP 5.39 right now

@PhilETaylor

This comment has been minimized.

Show comment
Hide comment
@PhilETaylor

PhilETaylor Aug 5, 2016

Contributor

Also I am using PHP 5.39 right now

There is no such version!

5.3.9? 5.3.29? Those are valid (albeit end of life, insecure, buggy, historic, ancient) versions.

Contributor

PhilETaylor commented Aug 5, 2016

Also I am using PHP 5.39 right now

There is no such version!

5.3.9? 5.3.29? Those are valid (albeit end of life, insecure, buggy, historic, ancient) versions.

@ninj1766

This comment has been minimized.

Show comment
Hide comment
@ninj1766

ninj1766 Aug 5, 2016

5.4 now at the time of the error it was 5.3 so should I revert back to 5.3 to use this patch and where do I place it? Please. I am not a coder but I can manage my C-Panel file manager and copy and paste.

ninj1766 commented Aug 5, 2016

5.4 now at the time of the error it was 5.3 so should I revert back to 5.3 to use this patch and where do I place it? Please. I am not a coder but I can manage my C-Panel file manager and copy and paste.

@Nexthought

This comment has been minimized.

Show comment
Hide comment
@Nexthought

Nexthought Aug 5, 2016

@ninj1766 did you set your ftp server ?

Nexthought commented Aug 5, 2016

@ninj1766 did you set your ftp server ?

@motofficina

This comment has been minimized.

Show comment
Hide comment
@motofficina

motofficina Aug 5, 2016

I encountered the same problem yesterday when I was trying to log in on the back end. An error message appears as "Failed to start the session: already started by PHP ($_SESSION is set)"

Originally, my joomla website is on 3.6.0 version and then, there was an available update to 3.6.1 so I tried. First there was an error, but when I clicked back, the update was successful. Then, after a few hours I wasn't able to log in on the back end anymore nor on the front end.

I don't know technically what I need to do especially about erasing or adding a code in a php or whatever file it could be because I am not familiar with the programming language... but I'm willing to learn step by step and I can manage to do the repair as much as I can. Please help me!!!

Urgent...

motofficina commented Aug 5, 2016

I encountered the same problem yesterday when I was trying to log in on the back end. An error message appears as "Failed to start the session: already started by PHP ($_SESSION is set)"

Originally, my joomla website is on 3.6.0 version and then, there was an available update to 3.6.1 so I tried. First there was an error, but when I clicked back, the update was successful. Then, after a few hours I wasn't able to log in on the back end anymore nor on the front end.

I don't know technically what I need to do especially about erasing or adding a code in a php or whatever file it could be because I am not familiar with the programming language... but I'm willing to learn step by step and I can manage to do the repair as much as I can. Please help me!!!

Urgent...

@brianteeman

This comment has been minimized.

Show comment
Hide comment
@brianteeman

brianteeman Aug 5, 2016

Contributor

@motofficina please use the forum for support http://forum.joomla.org

Contributor

brianteeman commented Aug 5, 2016

@motofficina please use the forum for support http://forum.joomla.org

@wilsonjda

This comment has been minimized.

Show comment
Hide comment
@wilsonjda

wilsonjda Aug 5, 2016

Hello everybody, I have a problem, I tried to fix the file native.php but now I had a blank page.

wilsonjda commented Aug 5, 2016

Hello everybody, I have a problem, I tried to fix the file native.php but now I had a blank page.

@ggppdk

This comment has been minimized.

Show comment
Hide comment
@ggppdk

ggppdk Aug 5, 2016

Contributor

Hello everybody, I have a problem, I tried to fix the file native.php but now I had a blank page.

while trying to apply the fix you have broken the SYNTAX of the file

  • error is not displayed by default thus it is hidden

Just restore the file

Now , If you have J3.6.1 !!

  1. Edit file
    libraries/joomla/session/handler/native.php
  2. Delete all contents (do not save yet)
  3. Carefully copy paste ALL text from here:
    https://raw.githubusercontent.com/joomla/joomla-cms/3.6.2/libraries/joomla/session/handler/native.php
  4. Save file , now you can login and update to J3.6.2

You can also do "Save as" in your browser for the above link and replace the file too

For anything more, please post here:
http://forum.joomla.org

Contributor

ggppdk commented Aug 5, 2016

Hello everybody, I have a problem, I tried to fix the file native.php but now I had a blank page.

while trying to apply the fix you have broken the SYNTAX of the file

  • error is not displayed by default thus it is hidden

Just restore the file

Now , If you have J3.6.1 !!

  1. Edit file
    libraries/joomla/session/handler/native.php
  2. Delete all contents (do not save yet)
  3. Carefully copy paste ALL text from here:
    https://raw.githubusercontent.com/joomla/joomla-cms/3.6.2/libraries/joomla/session/handler/native.php
  4. Save file , now you can login and update to J3.6.2

You can also do "Save as" in your browser for the above link and replace the file too

For anything more, please post here:
http://forum.joomla.org

@wilsonjda

This comment has been minimized.

Show comment
Hide comment
@wilsonjda

wilsonjda Aug 5, 2016

Hello ggppdk, thanks for your answer, I did what you said, but it doesn't work, blank page and in the Chrome console said: Error 500.

wilsonjda commented Aug 5, 2016

Hello ggppdk, thanks for your answer, I did what you said, but it doesn't work, blank page and in the Chrome console said: Error 500.

@ggppdk

This comment has been minimized.

Show comment
Hide comment
@ggppdk

ggppdk Aug 5, 2016

Contributor

are you sure that you copy pasted the exact text ?
are you sure that you have not editted ANY other files ?

also you may need to close all browser windows and re-open the browser (forces login session to expire)

Do the above and if it does not work then do this:

  1. Rename the file libraries/joomla/session/handler/native.php
  2. Do a "save as" of: https://raw.githubusercontent.com/joomla/joomla-cms/3.6.2/libraries/joomla/session/handler/native.php
  3. Save it as: native.php Copy it to: libraries/joomla/session/handler/native.php
  4. Close all browsers windows, restart your browser, login and upgrade to J3.6.2

Finally it is possible to see the error of the "blank" page

Edit (you may need to make it writable (temporarily))

  • configuration.php

change:

public $error_reporting = 'default';

to: (see errors)

public $error_reporting = 'simple';

or to see errors / notice / warnings too

public $error_reporting = 'maximum';

Other option is to extract the full J3.6.2 package ... ask how here: http://forum.joomla.org (I will not answer any further in this thread)

Contributor

ggppdk commented Aug 5, 2016

are you sure that you copy pasted the exact text ?
are you sure that you have not editted ANY other files ?

also you may need to close all browser windows and re-open the browser (forces login session to expire)

Do the above and if it does not work then do this:

  1. Rename the file libraries/joomla/session/handler/native.php
  2. Do a "save as" of: https://raw.githubusercontent.com/joomla/joomla-cms/3.6.2/libraries/joomla/session/handler/native.php
  3. Save it as: native.php Copy it to: libraries/joomla/session/handler/native.php
  4. Close all browsers windows, restart your browser, login and upgrade to J3.6.2

Finally it is possible to see the error of the "blank" page

Edit (you may need to make it writable (temporarily))

  • configuration.php

change:

public $error_reporting = 'default';

to: (see errors)

public $error_reporting = 'simple';

or to see errors / notice / warnings too

public $error_reporting = 'maximum';

Other option is to extract the full J3.6.2 package ... ask how here: http://forum.joomla.org (I will not answer any further in this thread)

@wilsonjda

This comment has been minimized.

Show comment
Hide comment
@wilsonjda

wilsonjda Aug 5, 2016

I changed error reporting and there a problem with Akeeba Backup, I'm going talk to my client in order to they update PHP version. Thanks for your advice it is not a joomla issue, excuse me.

wilsonjda commented Aug 5, 2016

I changed error reporting and there a problem with Akeeba Backup, I'm going talk to my client in order to they update PHP version. Thanks for your advice it is not a joomla issue, excuse me.

@motofficina

This comment has been minimized.

Show comment
Hide comment
@motofficina

motofficina Aug 5, 2016

hey, thanks! it worked :D

motofficina commented Aug 5, 2016

hey, thanks! it worked :D

@Belaswan

This comment has been minimized.

Show comment
Hide comment
@Belaswan

Belaswan Aug 10, 2016

I can't login from frontend after upgrade from joomla 3.6.1 to joomla 3.6.2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Belaswan commented Aug 10, 2016

I can't login from frontend after upgrade from joomla 3.6.1 to joomla 3.6.2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11430.

Edu20 pushed a commit to Edu20/joomla-cms that referenced this pull request Aug 11, 2016

roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment