歡迎光臨, 訪客. 請先 登入註冊一個帳號.
三月 29, 2024, 06:37:09 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  安裝與設定精華區  |  沒有權限進入管理介面的問題 « 上篇主題 下篇主題 »
頁: [1] 2
作者 主題: 沒有權限進入管理介面的問題  (閱讀 56086 次)
guest
訪客
« 於: 四月 15, 2005, 11:23:05 下午 »

各位前輩
我在架好plog後用admin的身分登入後
進入    管理面版 » Allen's Blog » 內容管理 » 發表新文章
選擇任何功能(包含預覽要新增的文章)都會被踢出來回到
login畫面,並顯示"您目前沒有權限進入管理介面。請到這裡登入。"
的訊息
不知道是我哪裡有操作錯誤,還請各位先進幫忙,謝謝
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 四月 15, 2005, 11:26:28 下午 »

引用自: guest
各位前輩
我在架好plog後用admin的身分登入後
進入    管理面版 » Allen's Blog » 內容管理 » 發表新文章
選擇任何功能(包含預覽要新增的文章)都會被踢出來回到
login畫面,並顯示"您目前沒有權限進入管理介面。請到這裡登入。"
的訊息
不知道是我哪裡有操作錯誤,還請各位先進幫忙,謝謝


Allen 你的問題很清楚,可是你的系統『環境』描述的很不清楚,所以我只能用猜的!這是 session 的問題,通常是因為 session.save_path 沒設對,請看你 php.ini 中的設定對不對。

Mark
已記錄

guest
訪客
« 回覆文章 #2 於: 四月 16, 2005, 12:01:58 上午 »

Hello Mark

        真的是很謝謝你,你說的應該是沒錯,應該是我的session設定有問題
         
          以下是我的php.ini  session的設定不知道我那裡有設錯了....

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
;
; As of PHP 4.0.1, you can define the path as:
;
;     session.save_path = "N;/path"
;
; where N is an integer.  Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories.  This is useful if you
; or your OS have problems with lots of files in one directory, and is
; a more efficient layout for servers that handle lots of sessions.
;
; NOTE 1: PHP will not create this directory structure automatically.
;         You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
;         use subdirectories for session storage
;
; The file storage module creates files using mode 600 by default.
; You can change that by using
;
;     session.save_path = "N;MODE;/path"
;
; where MODE is the octal representation of the mode. Note that this
; does not overwrite the process's umask.
session.save_path = "c:/tmp"

; Whether to use cookies.
session.use_cookies = 1

; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1

; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = c:/tmp

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data.  php is the standard serializer of PHP.
session.serialize_handler = php

; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts
; on each request.

session.gc_probability = 1
session.gc_divisor     = 1000

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

; NOTE: If you are using the subdirectory option for storing session files
;       (see session.save_path above), then garbage collection does *not*
;       happen automatically.  You will need to do your own garbage
;       collection through a shell script, cron entry, or some other method.
;       For example, the following script would is the equivalent of
;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
;          cd /path/to/sessions; find -cmin +24 | xargs rm

; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled.  PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.

session.bug_compat_42 = 0
session.bug_compat_warn = 1

; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public,} to determine HTTP caching aspects
; or leave this empty to avoid sending anti-caching headers.
session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 1800

; trans sid support is disabled by default.
; Use of trans sid may risk your users security.
; Use this option with caution.
; - User may send URL contains active session ID
;   to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
;   in publically accessible computer.
; - User may access your site with the same session ID
;   always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0

; Select a hash function
; 0: MD5   (128 bits)
; 1: SHA-1 (160 bits)
session.hash_function = 0

; Define how many bits are stored in each character when converting
; the binary hash data to something readable.
;
; 4 bits: 0-9, a-f
; 5 bits: 0-9, a-v
; 6 bits: 0-9, a-z, A-Z, "-", ","
session.hash_bits_per_character = 5

; The URL rewriter will look for URLs in a defined set of HTML tags.
; form/fieldset are special; if you include them here, the rewriter will
; add a hidden <input> field with the info which is otherwise appended
; to URLs.  If you want XHTML conformity, remove the form entry.
; Note that all valid entries require a "=", even if no value follows.
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #3 於: 四月 16, 2005, 12:10:42 上午 »

引用
session.save_path = "c:/tmp"


在這個設定中,你的 save_path 是 c:/tmp,mmm.... 請問你的 c: 下面有 tmp 這個目錄嗎?沒有的話就請你自己建一個。

改過後記得要重起 apache.

Mark
已記錄

guest
訪客
« 回覆文章 #4 於: 四月 16, 2005, 12:14:19 上午 »

在c:\底下已經有tmp目錄了
而且可以看到有幾個session file在裡面了
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #5 於: 四月 16, 2005, 12:25:18 上午 »

引用自: guest
在c:\底下已經有tmp目錄了
而且可以看到有幾個session file在裡面了


傷腦筋,相同的問題又發生了  傷心  真是搞不懂。

你能把 save_path remark 掉,讓他用系統的 tmp 試試嗎?

引用
;session.save_path = "c:/tmp"


Mark
已記錄

guest
訪客
« 回覆文章 #6 於: 四月 16, 2005, 12:49:45 上午 »

我已經改回來了
但是狀況還是一樣

然後我有發現一個奇怪的地方

要進入admin.php的時候會要求輸入帳號密碼
進入後要點選 XXX Blog的連結才能進去
管理面版 » Allen's Blog » 內容管理 » 發表新文章
照理說假如session有問題的話,這時候應該已經會出問題了
而不會進入
管理面版 » Allen's Blog » 內容管理 » 發表新文章
但是我每次試都可以進到這邊所以不知道是哪裡錯

另外
當點選 XXX Blog後http://127.0.0.1/plog1/admin.php?op=blogSelect&blogId=1會有blogId=1的參數
但是在往下選其它的功能的時候blogId=1就不會往下帶了...
這不知道是什麼問題

還有
當從admin.php登入後直接在網址列打
http://127.0.0.1/plog1/admin.php?op=blogSelect&blogId=1
這樣就可以直接進入
管理面版 » Allen's Blog » 內容管理 » 發表新文章
這代表此時已經抓的到session
然後選任何功能後會被踢出來請我輸入id/password
但此時在網址列直接輸入
http://127.0.0.1/plog1/admin.php?op=blogSelect&blogId=1

又可以直接進到
管理面版 » Allen's Blog » 內容管理 » 發表新文章
這代表session應該還在

所以這個問題怪怪的

ps我有試過新開一個browser後直接在網址列輸入
http://127.0.0.1/plog1/admin.php?op=blogSelect&blogId=1
結果是會出現請我輸入id/password的畫面
所以可以確認要進入
管理面版 » Allen's Blog » 內容管理 » 發表新文章
是有session的check
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #7 於: 四月 16, 2005, 01:13:39 上午 »

你的 PHP 是哪一版的?裝在 windows 2003,2000 還是 XP? Apache 呢? Mysql 呢?

另外,你參考一下這一篇 http://forum.lifetype.org.tw/index.php?topic=99.msg612#msg612 ,依照 minstrel 寫的試試看!


Mark
« 最後編輯時間: 八月 29, 2005, 01:48:01 上午 由 markwu » 已記錄

guest
訪客
« 回覆文章 #8 於: 四月 17, 2005, 11:59:53 下午 »

Hello Mark

        我試過了還是沒解..... 嚎啕大哭

        我的環境是  
           win2000+apache2.0.53+php5.0.4+mysql2.23.39+plog1.0
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #9 於: 四月 18, 2005, 09:45:25 上午 »

引用自: guest
Hello Mark

        我試過了還是沒解..... 嚎啕大哭

        我的環境是  
           win2000+apache2.0.53+php5.0.4+mysql2.23.39+plog1.0


你早說是 PHP 5 嘛! 疑惑 看樣子是PHP 的問題,在論壇中有人回報 5.0.3 後會造成 session data 無法讀取。我比過他的 release notes,根本看不出來為什麼會造成這樣。

而我自己測試在 5.04 時也會發生要我重複 login 的情形。所以建議你先改用 PHP4。

Mark
已記錄

markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #10 於: 四月 20, 2005, 04:14:55 下午 »

引用自: markwu
引用自: guest
Hello Mark

        我試過了還是沒解..... 嚎啕大哭

        我的環境是  
           win2000+apache2.0.53+php5.0.4+mysql2.23.39+plog1.0


你早說是 PHP 5 嘛! 疑惑 看樣子是PHP 的問題,在論壇中有人回報 5.0.3 後會造成 session data 無法讀取。我比過他的 release notes,根本看不出來為什麼會造成這樣。

而我自己測試在 5.04 時也會發生要我重複 login 的情形。所以建議你先改用 PHP4。

Mark


當當看到一個解法,有人在php.ini 中設定

程式碼:
register_long_arrays = On


就解了這個問題了!你能試試看嗎? 微笑

Mark
已記錄

SummerSun
新手見習
*
文章: 3


檢視個人資料
« 回覆文章 #11 於: 五月 08, 2005, 11:57:19 下午 »

我是新手..我也是使用php5..
在localhost上使用的確會有沒有權限的問題..
不過在家中另外一台電腦上網就可以進入..
不知道是不是mysql的權限有差別..
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #12 於: 五月 09, 2005, 12:26:49 上午 »

引用自: SummerSun
我是新手..我也是使用php5..
在localhost上使用的確會有沒有權限的問題..
不過在家中另外一台電腦上網就可以進入..
不知道是不是mysql的權限有差別..


應該不是,因為如果是 mysql 權限問題會直接告訴你 "xxxx@localhost" 無法 connect。

你是用 php5 哪一版?如果是 5.04 ,你有看到我上一篇的回復嗎?能試試看嗎?

Mark
已記錄

SummerSun
新手見習
*
文章: 3


檢視個人資料
« 回覆文章 #13 於: 五月 10, 2005, 04:43:36 上午 »

引用自: markwu
應該不是,因為如果是 mysql 權限問題會直接告訴你 "xxxx@localhost" 無法 connect。
你是用 php5 哪一版?如果是 5.04 ,你有看到我上一篇的回復嗎?能試試看嗎?
Mark

我的是php 5.03
上面的方法我去查
已經有該行指令..
也沒有被標成註解..

現在我在另一台電腦上裝..
設定為localhost..(原先有權限問題的blog是固定ip)
一切就正常..
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #14 於: 五月 10, 2005, 11:07:07 上午 »

引用自: SummerSun
引用自: markwu
應該不是,因為如果是 mysql 權限問題會直接告訴你 "xxxx@localhost" 無法 connect。
你是用 php5 哪一版?如果是 5.04 ,你有看到我上一篇的回復嗎?能試試看嗎?
Mark

我的是php 5.03
上面的方法我去查
已經有該行指令..
也沒有被標成註解..

現在我在另一台電腦上裝..
設定為localhost..(原先有權限問題的blog是固定ip)
一切就正常..

Hi SummerSun:

你能先報出你的完整安裝環境跟目錄嗎?這樣比較好猜 微笑

Mark
已記錄

頁: [1] 2
LifeType 中文開發論壇  |  支援  |  安裝與設定  |  安裝與設定精華區  |  沒有權限進入管理介面的問題 « 上篇主題 下篇主題 »
    前往: