session.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. if (!defined('CF_SYSTEM')) {
  3. exit('External script access not allowed');
  4. }
  5. /**
  6. * Cygnite PHP Framework
  7. *
  8. * Session Configuration
  9. *
  10. * @author Sanjoy Dey <[email protected]>
  11. */
  12. return array(
  13. /**
  14. *----------------------------------------------------------
  15. * Session Driver
  16. *----------------------------------------------------------
  17. * Set session driver to use native session or database
  18. * based session. Just provide the driver as "native" or
  19. * "database". Cygnite will take care of next.
  20. */
  21. 'driver' => 'native', // native, database
  22. /**
  23. *----------------------------------------------------------
  24. * Session Name
  25. *----------------------------------------------------------
  26. * Set your session name, else cygnite will use default name
  27. */
  28. 'session_name' => 'cf_secure_session',
  29. /**
  30. *----------------------------------------------------------
  31. * Session Storage Path
  32. *----------------------------------------------------------
  33. * Leave it as default as it will store into the default session
  34. * directory.
  35. */
  36. 'path' => 'default',
  37. /**
  38. *----------------------------------------------------------
  39. * Database For Session Storage
  40. *----------------------------------------------------------
  41. * Set the database name if you are using database based session
  42. * in order to store session.
  43. *
  44. * Change database name below to use session database driver
  45. */
  46. 'database_name' => 'cygnite',
  47. /**
  48. *----------------------------------------------------------
  49. * Setting Table Name For Session Storage
  50. *----------------------------------------------------------
  51. * Provide table name if you are using database based session.
  52. * By default "cf_sessions" is the table to store all session
  53. * into table.
  54. */
  55. 'table' => 'cf_sessions',
  56. /**
  57. *----------------------------------------------------------
  58. * Use Session Cookie
  59. *----------------------------------------------------------
  60. * Configure to use session cookie or not
  61. */
  62. 'use_session_cookie' => false,
  63. /**
  64. *----------------------------------------------------------
  65. * Session Cookie Name
  66. *----------------------------------------------------------
  67. * If you are using session cookie then provide the name here else
  68. * leave it blank.
  69. */
  70. 'session_cookie_name' => '',
  71. /**
  72. *----------------------------------------------------------
  73. * HTTP Only
  74. *----------------------------------------------------------
  75. * Configure to set httponly for cookie params
  76. */
  77. 'httponly' => true,
  78. /**
  79. * --------------------------------------------------------
  80. * Set Session Time out
  81. * --------------------------------------------------------
  82. * Currently not implemented, you can change the session
  83. * timeout in php.ini configuration file
  84. */
  85. 'timeout' => 1440,
  86. /**
  87. *----------------------------------------------------------
  88. * Secure Session
  89. *----------------------------------------------------------
  90. * You may leave it as false or true to use secure session
  91. * By default cygnite provides most security to the session.
  92. */
  93. 'secure' => false,
  94. );