Skip to content

Fix: Avoid session_start() warning on PHP-FPM / cPanel environments#95

Closed
El-SaMa wants to merge 7 commits intoPostiDigital:developmentfrom
El-SaMa:Fix-for-session_start()-warning-on-PHP-FPM-/-cPanel-hosting
Closed

Fix: Avoid session_start() warning on PHP-FPM / cPanel environments#95
El-SaMa wants to merge 7 commits intoPostiDigital:developmentfrom
El-SaMa:Fix-for-session_start()-warning-on-PHP-FPM-/-cPanel-hosting

Conversation

@El-SaMa
Copy link
Copy Markdown

@El-SaMa El-SaMa commented Jun 2, 2025

  • Checks if session is not already active before calling session_start()
  • Verifies that session.save_path exists, and sets a fallback path if missing
  • Prevents session_start() warnings on EA-PHP 8.x with PHP-FPM and CloudLinux
  • Improves compatibility in shared hosting environments commonly used with cPanel

Tested on EA-PHP 8.2 with WordPress + WooCommerce

POJanne and others added 7 commits October 24, 2024 11:45
Bumps [cookie](https://github.com/jshttp/cookie) to 0.7.1 and updates ancestor dependency [@wordpress/scripts](https://github.com/WordPress/gutenberg/tree/HEAD/packages/scripts). These dependencies need to be updated together.


Updates `cookie` from 0.4.2 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](jshttp/cookie@v0.4.2...v0.7.1)

Updates `@wordpress/scripts` from 26.19.0 to 30.7.0
- [Release notes](https://github.com/WordPress/gutenberg/releases)
- [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/CHANGELOG.md)
- [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/scripts@30.7.0/packages/scripts)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: "@wordpress/scripts"
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
…nd_yarn/blocks-builder/multi-9af3a60bb5

Bump cookie and @wordpress/scripts in /blocks-builder
- Checks if session is not already active before calling session_start()
- Verifies that session.save_path exists, and sets a fallback path if missing
- Prevents session_start() warnings on EA-PHP 8.x with PHP-FPM and CloudLinux
- Improves compatibility in shared hosting environments commonly used with cPanel

Tested on EA-PHP 8.2 with WordPress + WooCommerce
@POJanne POJanne force-pushed the master branch 2 times, most recently from cb18eb7 to a83600b Compare August 22, 2025 05:54
@joosev joosev changed the base branch from master to development September 8, 2025 17:36
@markakk
Copy link
Copy Markdown
Contributor

markakk commented Jan 27, 2026

I think it's better to use transient instead of session.

@markakk
Copy link
Copy Markdown
Contributor

markakk commented Mar 13, 2026

In PR #137 changed to use Wordpress "transient" instead of session, which is not affected by the hosting environment.

@POJanne
Copy link
Copy Markdown
Contributor

POJanne commented Mar 30, 2026

Fix done in PR #137. This one is closed.

@POJanne POJanne closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants