1
我有,我想使用默認的會話處理程序Symfony的3.3.5應用程序:當我這樣做Symfony的會話處理程序的默認位置嘗試創建目錄
framework:
session:
handler_id: session.handler.native_file
save_path: null
然而,Symfony的嘗試創建/無功/ lib中/ PHP /會話目錄,它已經存在:
[2017-08-01 14:24:37] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Session Storage was not able to create directory "/var/lib/php/sessions"" at /home/infoodlebiz/www/site/vendor/symfony/symfony/src/
Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php line 52 {"exception":"[object] (RuntimeException(code: 0): Session Storage was not able to create directory \"/var/lib/php/sessions\" at /home/infoodlebiz/www/site/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php:52)"} []
我不明白爲什麼這會是這樣,該目錄是世界可讀,可寫:
ls -la /var/lib/php/sessions/
total 176
drwx-wx-wt 2 root root 110592 Aug 1 14:28 .
drwxr-xr-x 4 root root 4096 Oct 16 2016 ..
-rw------- 1 globalyear globalyear 305 Aug 1 14:04 sess_1u179qdaqcihhkmmi4qepj2na0
-rw------- 1 globalyear globalyear 305 Aug 1 14:15 sess_5p76n0falmf0rmogs4v2s9sss5
-rw------- 1 globalyear globalyear 304 Aug 1 13:49 sess_65i7jlca6ifhs8k1ucdkf8d091
-rw------- 1 cbc cbc 213 Aug 1 14:28 sess_9hfobt8p6lu056avq2udiq7ck0
-rw------- 1 cbc cbc 213 Aug 1 14:06 sess_b6mdvgj6v6ip1l1pi77upnc845
以上
目錄不是
ls -la /var/lib/php/
total 124
drwxr-xr-x 4 root root 4096 Oct 16 2016 .
drwxr-xr-x 49 root root 4096 Mar 29 13:39 ..
drwxr-xr-x 3 root root 4096 Oct 16 2016 modules
drwx-wx-wt 2 root root 110592 Aug 1 15:25 sessions
PHP是使用套接字
什麼是LS -la的/ var/lib中/ PHP的輸出?和Web服務器運行? –
已更新問題 – jdog
服務器如何寫入其他會話文件?這是因爲他們是否被其他用戶所擁有? [看到這個](https://stackoverflow.com/questions/23695548/php-cannot-read-sessions-from-nfs-share/28568551) –