-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Auth::attempt() showing error in Linux server #1257
Comments
Try deleting the bootstrap compiled file and composer updating. On May 9, 2013, at 8:08 PM, Tanvir Gaus notifications@github.com wrote:
|
It was same. |
NO I was wrong its not working. BTW I have my storage folder writable. |
I tried to set the user object into the session & retrieve that in the redirected page but seems Session::put() is not working at all. nothings getting set when I try to Session::get() in the redirected page. I debug more and seems like you used different functions for different PHP version. in the NativeSessionStorage I found different code for different PHP versions if (version_compare(phpversion(), '5.4.0', '>=')) { |
Your session probably isn't being written because your dumping crap out to the browser with var_dump etc. On May 10, 2013, at 3:16 AM, Tanvir Gaus notifications@github.com wrote:
|
My Controller: $login = array( in home: if(Auth::check()) { |
I use sessions on a large 5.3 app on Laravel 4 and they work properly. Quit echoing stuff in that home route... just use |
Same. No use. Session::put is not working at all |
What session driver? Also, I want you to make two routes:
|
Nothing. /put shows Done then /get shows blank |
OK, post as much information about this installation as possible. Any On Fri, May 10, 2013 at 8:45 AM, Tanvir Gaus notifications@gh.neting.ccwrote:
|
Is the session using Symfony2? if yes then http://symfony.com/doc/2.0/reference/requirements.html shows prerequisite is PHP 5.3.2 at least. My server is having 5.3.13 |
I have a Laravel 4 app on 5.3.10. Works fine. |
FYI the same server is running Laravel 3 application without any issues |
Post packages used, etc. Entire routes file, etc. |
From PHP info - This program makes use of the Zend Scripting Language Engine: |
Route::any('/', array("as" => "home", "uses" => "PageController@index")); //Works with both registration and the login Route::post('login', "UserController@checkLogin"); Route::get('logout', array('as' => 'logout', function () { Route::get('put', function() { Route::get('get', function() { |
What about packages? Anything installed from Composer? Using anything like Firebug etc in your browser? |
I just ran a clean Laravel installation on PHP 5.3.10 (Ubuntu 12.04) and the session works prefectly, so I know it isn't broken on 5.3. |
What about your mangled compiled file that you edited yourself? Have you deleted that and composer updated? |
yes I did. I didn't change anything in the core/compiled files. I just -- Tanvir Gaus On Sat, May 11, 2013 at 12:19 AM, Taylor Otwell notifications@gh.neting.ccwrote:
|
Well, I don't know. I'm sort of out of options at this point. It works for PHP 5.3 both on my company's production server and my personal 5.3 VM. |
Is there any issue with shared hosting? |
I don't know. Would depend on the host and their settings I guess. |
Going to close this as it doesn't appear to be a bug in the framework. I would post on the forums maybe and see if anyone else has had similar issues on certain hosts. |
same problem !!! |
im having the sample problem, i spent whole freaking day!!! After saving in Auth::login create or retrieve users function , I print Auth:;users() and isnt empty, but when it redirected its gone! im using php 5.6 PHP 5.6.4-4ubuntu6.4 (cli) (built: Oct 28 2015 01:21:29) Laravel 5.2 Im using redis on my session then back on file and then back again to redis. no luck! please help! |
My second attempt, Redis is working , but Session is not. How do I configure Redis as my Session??
|
Feel free to discuss on the forums. |
Not sure what's wrong, it works in my local dev environment but not in the server. all other DB related function works but not Auth::attempt()
Warning: array_diff() [function.array-diff]: Argument #1 is not an array in .../web/bootstrap/compiled.php line 11346
$user = array(
'username' => 'myuser',
'password' => 'abc'
);
if (Auth::attempt($user)) {
echo "Here I am : " .Auth::user()->id;
}
FYI - I'm running xampp 1.8.1 in windows7 with PHP 5.4.7 and my server is Linux bluejays with PHP 5.3.13
I changed the flash() in bootstrap/compiled.php like this
public function flash($key, $value)
{
$this->put($key, $value);
$this->push('flash.new', $key);
$old = $this->get('flash.old');
$old = (empty($old)) ? array() : $old;
$this->put('flash.old', array_diff($old, array($key)));
}
Then I managed to make it work and get the "Here I am : 1" but it didn't set anything in the session
The text was updated successfully, but these errors were encountered: