Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1318451

    johnwoodman
    Participant

    Hi,

    In working with themes (multisite installation, I’ve seen these both on loading the themes page and attempting to upload/activate child theme), I’m getting:

    Open_basedir restriction in effect. File(/home/xxxxxxxxxx/public_html/wp-content/themes/index.php/style.css) is not within the allowed path(s): (/home/xxxxxxxxxxusr/lib/php:/usr/local/lib/php:/tmp) in /home/xxxxxxxxxx/public_html/wp-includes/class-wp-theme.php on line 241

    Is this a bug? index.php is a file, not a directory.

    Thanks,

    John

    #1318488

    Rupok
    Member

    Hi John,

    Thanks for posting.

    It’s hosting configuration related, please check it here https://www.templatemonster.com/help/open_basedir-restriction-in-effect-filex-is-not-within-the-allowed-paths-y.html#gref

    It can’t be fixed by coding or customization.

    Thanks!

    #1318843

    johnwoodman
    Participant

    I already read the page referenced, and already consulted with my hosting company. Here’s what the tech there said:

    “I think the open_basedir error is a bit of a red herring. The path mentioned in the error message should already be allowed by the open_basedir setting.”

    “It’s actually an invalid path because it’s referencing a nonexistent file under a directory with the name of an existing file. In other words, /home/xxxxxxxxxx/public_html/wp-content/themes/index.php/style.css cannot be opened because /home/xxxxxxxxxx/public_html/wp-content/themes/index.php is a file, and not a directory.”

    #1319610

    Rad
    Moderator

    Hi there,

    But the error is not about the file that can’t be opened. It says it’s not within the allowed path. Which means, the folder where index.php or style.css is located is not accessible, hence, which makes the files unreachable. Please check this http://stackoverflow.com/questions/223800/how-can-i-relax-phps-open-basedir-restriction

    Thanks!

    #1319619

    johnwoodman
    Participant

    The only other reference to “public_html/wp-content/themes/index.php/style.css” on the entire internet also has to do with the X Theme. So something about your theme is breaking WordPress, or at least causing an error.

    “index.php/style.css” doesn’t even make sense. Index.php is a file, not a directory.

    “public_html/wp-content/themes/index.php/style.css” does not exist. Why is the X Theme causing WordPress to try and do something with a file that doesn’t exist?

    The common thread here is that in both cases, it’s a multisite installation with X Theme network installed.

    I’ve tried activating 3 other themes besides the X Theme. Every single time, the errors go away. They completely vanish. It actually throws an error when I activate another theme FROM the X theme, but once I leave that page, the errors disappear completely.

    And every time I reactivate the X Theme, the errors reappear. They occur on loading the Dashboard, and on loading the Themes page. And a few other places as well.

    It’s crystal clear that the X Theme is somehow causing WordPress to attempt to access a file that doesn’t exist. And it appears to be the only theme on the market that is causing this error in WordPress.

    Again, the common thread with the other customer who experienced these errors is that both cases are multisite installations with X Theme network activated.

    #1319868

    johnwoodman
    Participant

    Okay, I think I’ve pretty well solved my own problem.

    The problem appears to have been caused by some type of interaction between a WordPress multisite installation, the X Theme, and (apparently) W3 Total Cache.

    Whenever I would disable the X Theme, it would go away.

    While waiting for support, I eventually decided to deactivate all plugins (while keeping the X Theme) and see whether that changed anything. When I did, the error went away.

    I reenabled plugins one by one, and when I reenabled W3 Total Cache, the error returned.

    Which might be a bit odd, as it seemed to me that maybe I was getting the error before I installed W3 Total Cache. But I could possibly be wrong about that.

    I also made a couple of different choices by reenabling a couple of plugins on my root site only, rather than network-wide. I don’t think that makes any difference, but again it’s at least possible I could be wrong.

    In any event, I uninstalled W3 Total Cache and substituted WP Super Cache, made slightly different choices in the divide between network activating and local activating plugins, and the site now seems to be working without the errors.

    I leave this as a helpful hint for anyone who many face the same issue.

    #1319916

    Christopher
    Moderator

    Thanks for sharing.