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

Don't change the default session_handler if it is allready set Ref: #5127 #5142

Closed
wants to merge 5 commits into from
Closed

Conversation

zero-24
Copy link
Contributor

@zero-24 zero-24 commented Nov 19, 2014

Steps to reproduce the issue

We are using memcache as default session handler and this set up is in php.ini.

Expected result

Joomla to use default session handler is not set in configuration.

Actual result

PHP Warning: session_start(): open(tcp://127.0.0.1:11211/sess_r5c5940ecaru55pr69bssctmu2, O_RDWR) failed: No such file or directory

System information (as much as possible)

php.ini: session.save_handler = memcache

Additional comments

Change libraries/joomla/session/storage/none.php to use default php session handler.

See: #5127 by @Olvikolvi

@zero-24
Copy link
Contributor Author

zero-24 commented Nov 20, 2014

tested by @Olvikolvi at #5127

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

@Fedik
Copy link
Member

Fedik commented Feb 12, 2015

found old one #2695, that can be closed after current will be merged

$handler = ini_get('session.save_handler');

// Set session.save_handler to files only if nothing else is set
if ($handler = '')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like here the mistake,
by call if ($handler = '') you reset $handler variable to empty value, so it always false
I think just enough if(!ini_get('session.save_handler'))

@zero-24
Copy link
Contributor Author

zero-24 commented Feb 13, 2015

Thanks @Fedik fixed with: 7e751e1

@Fedik
Copy link
Member

Fedik commented Feb 14, 2015

@zero-24 still small mistake ;)

also I just thought, maybe also can remove this construction, as default PHP 'session.save_handler' is 'files'

@zero-24
Copy link
Contributor Author

zero-24 commented Feb 14, 2015

done @Fedik

@Fedik
Copy link
Member

Fedik commented Feb 14, 2015

@zero-24 thanks!

test
works good

@zero-24
Copy link
Contributor Author

zero-24 commented Feb 14, 2015

Based on testing and a other PR that is tested and that whant to add the same code we can move this to RTC.

Thanks for testing here @Fedik and @Olvikolvi !


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

@brianteeman brianteeman added the RTC This Pull Request is Ready To Commit label Feb 18, 2015
@oparoz
Copy link

oparoz commented Feb 19, 2015

👍

@phproberto phproberto closed this in a99e13b Mar 7, 2015
@phproberto
Copy link
Contributor

Merged. Thanks!

@zero-24 zero-24 deleted the patch-12 branch March 7, 2015 21:21
@zero-24 zero-24 added this to the Joomla! 3.4.1 milestone Apr 1, 2015
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants