Skip to content
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
Merged

Fix logging in in PHP 5.3 #11430

merged 1 commit into from Aug 4, 2016

Conversation

@wilsonge
Copy link
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
Copy link
Contributor Author

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
Copy link

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
Copy link

Sandhie commented Aug 4, 2016

Works for me... Thank you!

@mediosweb
Copy link

mediosweb commented Aug 4, 2016

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

@missnene
Copy link

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
Copy link

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
Copy link

Flow1976 commented Aug 4, 2016

👍 Thanks!


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

@joomdonation
Copy link
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
Copy link
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
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
@DenysNosov
Copy link
Contributor

DenysNosov 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
Copy link
Contributor Author

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
Copy link
Contributor

PhilETaylor commented Aug 4, 2016

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

@jrmain
Copy link

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
Copy link

jrmain commented Aug 4, 2016

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

@PhilETaylor
Copy link
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
Copy link

elistina commented Aug 4, 2016

IT WORKS!!! Thanks a lot!

@jrmain
Copy link

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.

@ghost
Copy link

ghost commented Aug 4, 2016

Thx a lot. Works fine!

@mbabker
Copy link
Contributor

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
Copy link

Luisriveraa commented Aug 4, 2016

Great. I works fine. Thanks a lot.

@Nexthought
Copy link

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
Copy link
Contributor

wojsmol commented Aug 4, 2016

@Nexthought
Copy link

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
Copy link

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
Copy link
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
Copy link

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
Copy link
Member

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
Copy link
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
Copy link

eduardocfs commented Aug 4, 2016

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

@ninj1766
Copy link

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
Copy link

ninj1766 commented Aug 5, 2016

Also I am using PHP 5.39 right now

@PhilETaylor
Copy link
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
Copy link

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
Copy link

Nexthought commented Aug 5, 2016

@ninj1766 did you set your ftp server ?

@motofficina
Copy link

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
Copy link
Member

brianteeman commented Aug 5, 2016

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

@wilsonjda
Copy link

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
Copy link
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
Copy link

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
Copy link
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
Copy link

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
Copy link

motofficina commented Aug 5, 2016

hey, thanks! it worked :D

@Belaswan
Copy link

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.

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.