2013-01-10 60 views
0

我已經在codeigniter中構建了一個簡單的URL縮短應用程序,該應用程序還允許用戶通過Facebook登錄。爲什麼Facebook認證重定向導致服務器錯誤?

第一次授權時,它在允許Facebook上的權限後返回服務器錯誤。

我將問題縮小到我的路由文件或我的htaccess。但是,無論我嘗試什麼,我都無法得到它的工作。

由於該應用程序是一個網址縮寫,所有未指定的路由都使用默認路由。像這樣...

$route['login'] = "auth/login"; 
$route['about'] = "pages/about"; 
$route['(:any)'] = "redirect/index/$1"; 

我認爲這是爲什麼它沒有auth。我試圖做:

$route['auth_social/(:any)'] = "auth_social/$1"; 

哪個也沒有工作。我唯一一次能得到它的工作是,如果我我的.htaccess改變

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|table-images|js|robots\.txt|css|captcha) 
RewriteRule ^(.*)$ /index.php/$1 [L] 

但後來我的網址縮短休息和將無法正常工作。這讓我瘋狂。

任何人都可以看到我要去哪兒嗎?

這裏是我的全.htaccess文件

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

#Removes access to the system folder by users. 
#Additionally this will allow you to create a System.php controller, 
#previously this would not have been possible. 
#'system' can be replaced if you have renamed your system folder. 
RewriteCond %{REQUEST_URI} ^system.* 
RewriteRule ^(.*)$ /index.php?/$1 [L] 

#When your application folder isn't in the system folder 
#This snippet prevents user access to the application folder 
#Rename 'application' to your applications folder name. 
RewriteCond %{REQUEST_URI} ^application.* 
RewriteRule ^(.*)$ /index.php?/$1 [L] 

#Checks to see if the user is attempting to access a valid file, 
#such as an image or css document, if this isn't true it sends the 
#request to index.php 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 

<IfModule !mod_rewrite.c> 
ErrorDocument 404 /index.php 
</IfModule> 

編輯:

這裏是從服務器日誌中的錯誤:

[10-Jan-2013 11:02:25 UTC] PHP Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. 
    thrown in /Users/mycomputer/Documents/grpe/app/application/libraries/facebook/base_facebook.php on line 1058 
+0

什麼是_actual_錯誤信息? (檢查你的服務器的日誌文件!) – CBroe

+0

好的。我在osx上使用mamp。我如何找到我的日誌文件? –

+0

更新了我的問題。 –

回答

相關問題