This thread is resolved. Here is a description of the problem and solution.
Problem:
You are experiencing a PHP Fatal error on your website when using the WPML plugin's language switcher, specifically when switching back to the Dutch version from a category page. Despite increasing the zend.max_allowed_stack_size, the issue persists.
Solution:
We recommend the following steps to address the issue:
1. Save and remove the existing debug.log file from your server if it's too large, as it can affect performance.
2. Temporarily deactivate all plugins except for WPML and WPML String Translation to check if the issue still occurs.
3. Attempt to reproduce the error by switching between languages multiple times. If the error does not reoccur, it might have been caused by a conflict with another plugin.
4. If the issue persists, please provide specific steps or conditions under which the error occurs to help us further diagnose the problem.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Known issue
This topic contains 6 replies, has 0 voices.
Last updated by flavioG-2 1 month, 2 weeks ago.
Assisted by: Lucas Vidal de Andrade.
| Author | Posts |
|---|---|
| October 26, 2025 at 6:35 pm #17519738 | |
|
flavioG-2 |
Background of the issue: Symptoms: Questions: |
| October 27, 2025 at 10:25 am #17521209 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Hello there, This is a known issue reported for PHP 8.3, please see https://wpml.org/errata/php-8-3-x-fatal-error-maximum-call-stack-size-reached-due-to-possible-infinite-recursion/ for details and the workaround. Our team is working to fix the issue, until then you can try the solution mentioned in the said erratum. Alternatively, you can downgrade your PHP to 8.2. Ensure to have a backup before applying any of the workarounds. |
| October 28, 2025 at 6:36 am #17524309 | |
|
flavioG-2 |
Hi Lucas, I’m still experiencing the PHP Fatal error related to an apparent infinite recursion in WPML, even after applying the PHP 8.3 errata workaround and also after downgrading PHP to 8.2 and 8.1. Symptoms (intermittent but frequent): Randomly the site slows down, some pages fail to render, and we get a PHP Fatal with stack overflow. Error excerpt (latest): PHP Fatal error: Uncaught Error: Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? What I have already tried: Applied the PHP 8.3 errata (both zend.max_allowed_stack_size = -1 and zend.reserved_stack_size = -1) at the domain’s FPM pool; verified via phpinfo(). Downgraded PHP to 8.2 and 8.1 — error still occurs (less often, but still reproducible). Purged LiteSpeed/QUIC.cloud caches; tested bypassing CDN. Reduced to a minimal plugin set (WPML core + String Translation + WooCommerce + Yoast) and tested on the default theme. Environment details: Web server: LiteSpeed (Plesk) with PHP-FPM pools The issue is production impacting (random fatals and 503s), so any interim patch would be greatly appreciated. Best, |
| October 28, 2025 at 9:57 am #17525376 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Thank you for sharing the details. I would like to look at this directly on your site. For this I would need temporary access (WP-Admin and FTP) to your site, preferably to a test/staging site where the problem has been replicated if possible. Please leave the Erratum solution applied, and PHP on 8.2. Also, is there a consistent way to reproduce the error? So I don't have to wait until it randomly occurs. The required fields can be found below the comments section. The information you enter is private, i.e. only you and I can see it and have access to it. I may need to replicate your website locally. To do this, I need to temporarily install a plugin called "Duplicator" or "All in One WP Migration" on your website. This will allow me to create a copy of your website and content. Once the issue is resolved, I will delete the local website. Let me know if this works for you. IMPORTANT Please make a backup copy of the site files and database before giving us access. - If you do not see the wp-admin/FTP fields, this means your post and site login details are being made PUBLIC. DO NOT post your website details if you do not see the required wp-admin/FTP fields. If you do not, ask me to enable the private box. The private box looks like this: hidden link |
| October 28, 2025 at 12:27 pm #17526129 | |
|
flavioG-2 |
{"ts":"2025-10-28T12:04:28+00:00","label":"get_term","url":"GET /blog/hoe-kunnen-honing-en-bijenwas-bijdragen-aan-je-gezondheid/","lang_cookie":"nl","referer":"hidden link","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36","php":"8.3.26","memory":"512M","zend.max_allowed_stack_size":"524288","zend.reserved_stack_size":"262144","wpml_versions":{"WPML Multilingual CMS":"4.8.4","WPML Multilingual & Multicurrency for WooCommerce":"5.5.2.2","WPML Media Translation":"3.0.0","WPML String Translation":"3.4.1"},"data":{"id":104,"taxonomy":"category","depth":1}} |
| October 29, 2025 at 11:45 am #17529238 | |
|
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Timezone: Europe/Vienna (GMT+01:00) |
Hello there, I thoroughly checked the staging version, but had different results than the ones you brought. Let me explain: 1. I saved the existing debug.log file locally and deleted it from the server, as it had 3.44 GB and was too big to handle; [29-Oct-2025 11:12:31 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/class-wp-term-query.php on line 308 [29-Oct-2025 11:12:31 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/plugin.php on line 205 [29-Oct-2025 11:12:45 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/class-wp-term-query.php on line 308 [29-Oct-2025 11:12:45 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/plugin.php on line 205 [29-Oct-2025 11:13:33 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/class-wp-term-query.php on line 308 [29-Oct-2025 11:13:33 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 262144 bytes) in /var/www/vhosts/dutchmicrodosing.com/staging.dutchmicrodosing.com/wp-includes/plugin.php on line 205 4. I deactivated all plugins, except WPML and WPML String Translation; To be able to escalate and further analyze the issue with this staging website, I need to be able to reproduce the issue, and get some WPML related error. Any tips on how I can achieve that? |
| October 31, 2025 at 10:00 am #17535379 | |
|
flavioG-2 |
I also noticed that the issue stopped occurring after I reverted WPML to version 4.8.2 and switched PHP back to 8.2 on the live site. It seems something went wrong after the update, but reverting those versions has resolved the problem for now. So it’s likely related to either the newer WPML version or PHP 8.3 compatibility. I’ll keep monitoring it, but for the moment everything is stable again. Thanks for your help |