Title: PHP Session never gets closed
Last modified: September 21, 2026

---

# PHP Session never gets closed

 *  Resolved [airflo](https://wordpress.org/support/users/airflo/)
 * (@airflo)
 * [1 week, 3 days ago](https://wordpress.org/support/topic/php-session-never-gets-closed/)
 * Hello Adrian,
 * when set in the options, your plugin opens a PHP session within the file `frontend/
   controllers/main.class.php` in line 101 using `session_start()`. However, I don’t
   see any calls to `session_write_close()` to close this session in any plugin 
   file.
 * Leaving a PHP session open can adversely affect REST API and loopback calls due
   to session file lock.
 * Please add `session_write_close()` to your code to close the session at an appropriate
   time.
 * Kind regards,
 * Florian

Viewing 1 replies (of 1 total)

 *  Plugin Author [Adrian Emil Tudorache](https://wordpress.org/support/users/railmedia/)
 * (@railmedia)
 * [3 days, 21 hours ago](https://wordpress.org/support/topic/php-session-never-gets-closed/#post-19030587)
 * Hi there Florian,
 * Thanks for reaching out. `session_write_close()` has been added in the codebase.
   Please update to version 1.6.1 when you get a chance.
 * Please don’t hesitate to get back to me if you encounter further issues.
 * Best regards,
   Adrian

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-session-never-gets-closed%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/order-tip-woo/assets/icon-128x128.png?rev=2363829)
 * [Order Tip for WooCommerce](https://wordpress.org/plugins/order-tip-woo/)
 * [Support Threads](https://wordpress.org/support/plugin/order-tip-woo/)
 * [Active Topics](https://wordpress.org/support/plugin/order-tip-woo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/order-tip-woo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/order-tip-woo/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Adrian Emil Tudorache](https://wordpress.org/support/users/railmedia/)
 * Last activity: [3 days, 21 hours ago](https://wordpress.org/support/topic/php-session-never-gets-closed/#post-19030587)
 * Status: resolved