Advertisement
ujiajah1

Solved - Codeigniter Message: mkdir(): Invalid path and Sess

Jun 1st, 2016
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.95 KB | None | 0 0
  1. Bertemu lagi dengan masalah dan revisi tiada akhir :p memang sudah menjadi rezeki nya,,
  2. kesulitan dan kesusahan juga rezeki loh kalau kita mau mengambil sisi positifnya
  3. Masalah yang saya temui di Codeigniter 3.0, namun masalah ini tidak hanya di versi 3.x saja mungkin di versi sebelumnya juga ada.
  4.  
  5. Konsidi masalah :
  6. Webserver : Nginx & apache
  7. Php : PHP 5.6
  8. FrameWork : Codeigniter 3.
  9.  
  10. masalah yang muncul ada 3 tapi cara mengatasinya hanya dalam 1 baris code, sebelumnya lihat kode errornya ada dibawah ini :
  11. ============================================================================================================
  12.  
  13. A PHP Error was encountered
  14. Severity: Warning
  15. Message: mkdir(): Invalid path
  16. Filename: drivers/Session_files_driver.php
  17. Line Number: 117
  18. Backtrace:
  19. File: /usr/share/nginx/html/ci/index.php
  20. Line: 292
  21. Function: require_once
  22.  
  23. ============================================================================================================
  24.  
  25. An uncaught Exception was encountered
  26. Type: Exception
  27. Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.
  28. Filename: /usr/share/nginx/html/ci/system/libraries/Session/drivers/Session_files_driver.php
  29. Line Number: 119
  30. Backtrace:
  31. File: /usr/share/nginx/html/ci/index.php
  32. Line: 292
  33. Function: require_once
  34.  
  35. ============================================================================================================
  36. A PHP Error was encountered
  37. Severity: Warning
  38. Message: fopen(ea936f6cca00382143f867cea8043f45d9b818c2): failed to open stream: Permission denied
  39. Filename: drivers/Session_files_driver.php
  40. Line Number: 156
  41. Backtrace:
  42.  
  43. ============================================================================================================
  44.  
  45. Cara mengatasinya :
  46. 1. Buka file config.php dalam direktori Codeigniter
  47. 2. Temukan kode berikut :
  48.  
  49. $config['sess_save_path'] = NULL;
  50.  
  51. 3. Ganti menjadi :
  52.  
  53. $config['sess_save_path'] = sys_get_temp_dir();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement