Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Europe/Kyiv (GMT+02:00)

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Andrey 4 hours, 40 minutes ago.

Assisted by: Andrey.

Author Posts
January 30, 2025 at 7:58 pm #16653338

Rico Heinrich

Background of the issue:
We moved to a new server, activated the WPML plugin, and added language switchers to our site. The issue can be seen at hidden link (in logs only).

Symptoms:
PHP Warning: file_exists(): open_basedir restriction in effect. File(WP Endpoints-en_US.mo) is not within the allowed path(s) in /home/wp/disk/wordpress/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LoadTranslationFile.php on line 81. I expected to see no warnings, but instead, I got a warning on every page load.

Questions:
How can I resolve the PHP warning related to open_basedir restriction?
Why am I seeing warnings after moving to a new server and activating WPML?

January 30, 2025 at 10:54 pm #16653694

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for contacting WPML support.

The issue should be resolved with WPML String Translation 3.2.18. Have you tried to clear logs, cache, and double-check the logs?

https://wpml.org/errata/php-warning-file_exists-open_basedir-restriction-in-effect-warning-possible-with-current-string-translation/

January 31, 2025 at 7:26 am #16654018

Rico Heinrich

Thank you Andrey, this is an interesting clue.

However, we have been using WPML String Translation 3.2.18 for weeks now and this error only started to occur after moving to a new server yesterday.

Which logs do you want me to clear? I cleared the WP Rocket cache completely and double checked the logs again.

I'll attach a screenshot of the latest log entries.

I suspect WPML might somehow still have cached the absolute filepaths of the old server somewhere.

Bildschirmfoto 2025-01-31 um 08.25.56.png
January 31, 2025 at 11:03 pm #16657432

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for your feedback.

You are probably checking your server logs. Try activating debugging in WordPress to see if it reflects the same information.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

To enable the error logging to a file on the server, you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

The errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know what you see in the debug.log after enabling debug mode. But before, please try running the option "Show custom MO Files Pre-generation dialog box" in WPML → Support → Troubleshooting.