Bật tắt Session Auto Start trong PHP 1
Webmaster

Bật tắt Session Auto Start trong PHP

Session support is enabled in PHP by default also configure manually to be set disabled or enabled.

How to Enable:

Open your PHP configuration php.ini file and find the word  “session.auto_start” and be ensure the config set to “On”

session.auto_start=On

Also can be set in .htaccess file and add below line,

php_value session.auto_start 1
session.name = session

How to Disable:

You can easily turn it off session in PHP in few lines code,

Open a php.ini file and check the below line,

session.auto_start=Off

or

session.auto_start = "0"

Another option is open a .htaccess file and add below line

php_value session.auto_start 0 
session.name = session

If you have specific user with different path in apache server also add below line,

suPHP_ConfigPath /home/username/public_html
Avatar of jamesblackvn

Tui là jamesblackvn!

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Website này sử dụng Akismet để hạn chế spam. Tìm hiểu bình luận của bạn được duyệt như thế nào.