WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 8 months ago

#42067 new defect (bug)

Language Warning

Reported by: EatonZ Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8.2
Component: I18N Keywords: reporter-feedback
Focuses: Cc:

Description

When using an open_basedir PHP restriction, I am receiving a PHP warning from WordPress:

[03-Oct-2017 02:07:04 UTC] PHP Warning:  is_readable(): open_basedir restriction in effect. File(/languages//en_US.mo) is not within the allowed path(s): (C:\inetpub\wwwroot) in C:\inetpub\wwwroot\wp-includes\l10n.php on line 583

Looks like a bug. This is a Windows/IIS server, and it looks like it's trying to reference a Linux path possibly, instead of something relative.

Change History (3)

#1 @EatonZ
9 months ago

I have tried fixing this by adding various forms of that path to open_basedir:

/languages
/languages//
\languages
C:\languages

None of which have solved the issue. I'd rather not remove this security feature, so hopefully something can be done by the next maintenance release to address this.

#2 @ocean90
9 months ago

  • Keywords reporter-feedback added

Hello @EatonZ, thanks for your report. Does it still happen with all plugins disabled and a default theme (Twenty Seventeen) activated? Which locale are you using? Do you have a custom WP_LANG_DIR defined?

#3 @EatonZ
8 months ago

Sorry for the delay in responding. I couldn't reproduce it on a clean install, and I do not have a WP_LANG_DIR defined.

I found that open_basedir incurs a huge performance impact, so I got rid of it. I will try and reproduce again on a clean install when I have some free time and try to narrow it down further for you.

Note: See TracTickets for help on using tickets.