草庐IT

mod_auth_sspi

全部标签

php - Laravel Auth::attempt 每次都失败

我在我的laravel应用程序上创建了一个测试用户。详情是用户:joe@gmail.com密码:123456当我完成注册过程时,一切都按预期进行,并且在数据库的用户表中创建了一个条目完成后,我将用户重定向到仪表板。publicfunctionpostCreate(){//Rules$rules=array('fname'=>'required|alpha|min:2','lname'=>'required|alpha|min:2','email'=>'required|email|unique:users','password'=>'required|alpha_num|between

php - Mod_rewrite 和 $_GET 变量

如果我正在修改URL来自:http://www.mysite.com/blog/this-is-my-title/1/到http://www.mysite.com/blog.php?title=this-is-my-title&id=1...之后是否可以任意将get值附加到URL,或者mod_rewrite是否将其丢弃?我的重写规则:RewriteRule^blog/([A-Za-z]+)/(0-9]+)/?blog?title=$1&id=$2[L]示例:我可以走了吗http://www.mysite.com/blog/this-is-my-title/1/?first=Johnni

php - 我可以将 Ion auth 设置为通过用户名或电子邮件登录吗

我知道我可以在配置中将ionauth设置为通过用户名登录,我也知道我可以在配置中将它设置为通过电子邮件登录。有没有一种简单的方法可以将其设置为自动使用? 最佳答案 如果是自动的,你的意思是先尝试一个,然后再尝试另一个,看看其中一个是否给出有效的返回:登录发生在ion_auth_model行:899->where($this->identity_column,$this->db->escape_str($identity))因此您可以将其更改为执行“或”并尝试两列。您需要在整个模型中执行此操作,因为要考虑的不仅仅是实际登录,还有一个用

php - mod_php 与 mod_python

为什么mod_python是oop而mod_php不是?例子:我们去www.example.com/dir1/dir2如果你使用mod_python,apache打开www/dir1.py并调用dir2方法但是如果你使用php模块,apache打开www/dir1/dir2/index.php 最佳答案 让我们谈谈mod_python与mod_php。由于Python语言不是专门为网页服务而设计的,mod_python必须做一些额外的工作。由于PHP语言是专门为网页服务而设计的,mod_php只是启动一个命名的PHP模块。对于mod

php - 恐惧超时与 'mod_fcgid: read timeout from pipe'

我的应用程序尝试访问超时的URL有问题。我正在trycatch此超时并使用以下代码解决此问题:$timeout=120;if(false==$handle=@fsockopen($host,$port,$errno,$errstr,$timeout)){thrownewException("Couldnotconnecttourl:".$errstr);}$getRequest="GET{$url}HTTP/1.0\r\n";$getRequest.="Host:{$urlParts['host']}\r\n";$getRequest.="Connection:close\r\n\r\

php - 将 mod_rewrite 与 XAMPP 和 Windows 7 - 64 位一起使用?

我有一个简单的mod_rewrite规则,它允许我将任何不是实际文件或目录的请求重定向到index.php文件Options+SymLinksIfOwnerMatchRewriteEngineOnRewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule./index.php[L]在PHP文件中我放置了这个简单的代码来处理这个导航我的开发环境是XAMPP和Windows7-64位httpd.conf文件OptionsFollowSymLinksAllowOverrideAllOrderden

php - 拉维尔 4 : Two different view pages for a single URI based on auth status

我最近开始使用Laravel4进行开发,我对路由有疑问。对于“/”,我希望根据用户的授权状态有两个不同的View页面。如果用户已登录并正在查看“/”,我想向他们展示一个带有管理控件的View,当用户在未登录的情况下以普通用户的身份查看“/”时,我想提供一个一般信息View。为了实现这一点,我一直在尝试使用过滤器“auth”和“guest”,但没有成功。//应用程序/routes.php//routeforloggedinusersRoute::get('/',array('before'=>'auth',function(){return'loggedin!';}));//fornor

php - 在 Laravel 5.1 中使用中间件时出现 Class jwt-auth does not exist 错误

我按照官方的JWT-Auth安装https://github.com/tymondesigns/jwt-auth/wiki/Installation.现在我的Controller中有一个中间件:$this->middleware('jwt-auth',['only'=>['postChange','postChoose']]);我还在config/app.php的提供程序数组中添加了Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class但是,当我向API发出请求时,我收到此错误消息:ReflectionExceptioninConta

php - 拉维尔 4 : Stock Auth login won't persist across pages

从所有教程中,我应该能够对用户进行身份验证,然后跳转到任何其他页面,并保持登录。然而,这不起作用。自定义编译的PHPLAMP堆栈。应用存储是可写的。与教程的唯一区别是我使用的是电子邮件而不是用户名。http://laravelbook.com/laravel-user-authentication/http://codehappy.daylerees.com/authenticationsession有效,因为我能够将var存储到session并在不同的页面上读出它。models/User.php(股票)useIlluminate\Auth\UserInterface;useIllum

php - Laravel 5.2 -> 5.3 Auth::user() 返回 null

我已经从5.2升级到5.3,Auth::user()返回null。路线Route::group(['middleware'=>['auth']],function(){Route::get('/test','MyController@showMain');}Controller构造函数调用Auth::check()返回nullpublic$user;publicfunction__construct(){$this->user=Auth::user();}publicfunctionshowMain(){return$this->user;}ControllershowMain调用Au