PHP Fatal Errors in frontend.php Causing 405 Server Errors
-
I’m experiencing an issue with GTM4WP that’s causing my hosting provider (WPEngine) to serve 405 error pages instead of the WordPress login page when your plugin is active.
The Root Cause: WPEngine’s server logs show PHP fatal errors in your plugin’s frontend.php file:
- Line 636: Undefined array key “http_user_agent”
- Line 639: Undefined variable $page
- Additional error: Trying to access array offset on value of type bool
File: /wp-content/plugins/duracelltomi-google-tag-manager/public/frontend.php
Environment:
- WordPress: 6.7.2
- GTM4WP Version: 11.16.1
- Hosting: WPEngine
- PHP Version: 8.2
Impact: These PHP errors cause the server to return 405 responses.
Steps to Reproduce:
- Activate GTM4WP on PHP 8.2
- Visit wp-login.php
- Server logs show the fatal errors above
The errors disappear when the plugin is deactivated.
Thanks for the great plugin. Hoping for a fix in the next update!
The topic ‘PHP Fatal Errors in frontend.php Causing 405 Server Errors’ is closed to new replies.