php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "lifetime"

How can the lifetime of session IDs be defined in PHP?

To define the lifetime of session IDs in PHP, you can use the session.gc_maxlifetime directive in the php.ini file or set it dynamically using the ini...

Can cookies set during a PHP session be configured to persist beyond the session's lifetime?

Cookies set during a PHP session typically expire when the session ends. To make cookies persist beyond the session's lifetime, you can set an expirat...

Why is the session being deleted after approximately 30 minutes despite setting the session lifetime to 8 hours?

The issue may be caused by the server's session garbage collection settings, which could be configured to delete inactive sessions after a certain per...

How can the lifetime of PHP sessions be restricted to only last until the browser is closed?

To restrict the lifetime of PHP sessions to only last until the browser is closed, you can set the session cookie to be a session cookie by not settin...

What are the best practices for setting the lifetime of a cookie in PHP to ensure it remains valid for a long period?

Setting the lifetime of a cookie in PHP involves specifying the expiration time in seconds from the current time. To ensure a cookie remains valid for...

Showing 11 to 15 of 99 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 19 20 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.