• Resolved bobjgarrett

    (@bobjgarrett)


    I have a web site with about 15 plugins but this plugin and two other plugins are producing a particular error whenever the admin menu is displayed. The error is
    [21-Mar-2022 06:34:10 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(C:\Inetpub\vhosts\xxx\httpdocs/wp-content/plugins/https://www.monsterinsights.com/lite/) is not within the allowed path(s): (C:/Inetpub/vhosts/xxx\;C:\Windows\Temp\;C:\Inetpub\vhosts\xxx\httpdocs) in C:\Inetpub\vhosts\xxx\httpdocs\wp-admin\menu-header.php on line 256

    This line of code is
    file_exists( WP_PLUGIN_DIR . “/$sub_file” )
    and having checked this it appears “/$sub_file” contains a url rather than a file path.
    As I say this happens for MonsterInsights and two other plugins (who I am also asking about it).
    Are you able to suggest what might be causing this error which I assume must relate to how the plugins menus have been stored.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Michelle D.

    (@devmich)

    Hi @bobjgarrett,

    I’m sorry about the trouble here.

    If you haven’t resolved this yet, would you be able to reach out to us at https://www.monsterinsights.com/lite-support/?

    Thanks so much!

    Thread Starter bobjgarrett

    (@bobjgarrett)

    Sorry, uninstalled it now and using another plugin.

    Plugin Support Michelle D.

    (@devmich)

    Hi @bobjgarrett,

    I understand, no problem.

    In case it helps in the future, I consulted with our developer team and they let me know that this is a common issue with Windows server hosted WordPress sites.

    The open_basedir restriction is because Windows can’t handle submenus in the WordPress admin area whose links are URLs as opposed to a file path. Since we use an external URL for the “Upgrade to Pro” submenu link, Windows tries to interpret that as a file, assumes it’s outside the directories it’s able to access, and throws the warning.

    I hope this helps, but if you have further questions please let me know.

    Thank you!

    Thread Starter bobjgarrett

    (@bobjgarrett)

    I think other plugins handle this by not having such links within the menu system of the dashboard but on the pages of plugin. If you imagine the number of warnings this would produce on a site with multiple users with admin or similar rights you can imagine the error file becoming unmanageable.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.