WordPress.org

Ready to get started?Download WordPress

Forums

Incorrectly displaying themes and plugins hanging site (9 posts)

  1. Tformosus
    Member
    Posted 6 years ago #

    Hello,
    I've set up a wordpress blog in the subfolder of the root directory of a website. In its default, freshly installed state everything appears to be fine, however Ive encountered a number of problems when attempting to customise the blog that seem to indicate that Ive either encountered a bug or more likely misconfiguration something and thus Id appreciate some advice.

    The subfolder Im using is /blog

    The symptoms of my problem:

    • After uploading the WP-OpenID plugin to the plugin directory I attempted to enable it. As WordPress attempted to reload the dashboard in response to enabling the plugin I was simply presented with a blank screen. Attempting to view any page of the blog also resulted in a completely blank page being displayed. The only way to resolve this problem was to delete WP-OpenID from the plugin directory, at which point the blog began displaying normally.
    • I wanted to enable the Register Plus plugin, however after enabling it and going to the Register Plus settings page Im only presented with the first few configuration options, the remainder of the configuration fields which should be there simply arent displayed.
    • Ive installed Neil Merton's Web2.0* theme to /blog/wp-content/themes/web2.0/
      that is all the *.php etc files are /blog/wp-content/themes/web2.0/ thus its not nesting.
      However when I enable this theme via Dashboard > Desgin > Themes and then view the blog no colours etc are applied e.g. no body background or header colour as you can see here.

      In addition to style.css this theme uses a style.php file. Other themes that dont use style.php but simply rely upon a style.css display correctly.

      In checking the Apache error logs I see the following:

      [client my_server's_ip_address] PHP Warning: main() [<a href='function.main'>function.main</a>]: Unable to access /var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0../../../../wp-[config.php in /var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0/style.php on line 2, referer: http://www.volunteerabroad.ie/blog/
      [client my_server's_ip_address] PHP Warning: main(/var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0../../../../wp-config.php) [<a href='function.main'>function.main</a>]: failed to open stream: No such file or directory in /var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0/style.php on line 2, referer: http://www.volunteerabroad.ie/blog/
      [client my_server's_ip_address] PHP Fatal error: main() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0../../../../wp-config.php' (include_path='.:') in /var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2.0/style.php on line 2, referer: http://www.volunteerabroad.ie/blog/

      I could just not use these plugins and theme, however Ive successfully used all on my personal blog (which is installed in a root directory rather than a subdirectory), but Im just worried these issues are symptomatic of some stupid configuration error Ive made and thus I'd rather identify it now rather than latter on when the blog is in active use.

      Thanks for your time and consideration.

  2. Tformosus
    Member
    Posted 6 years ago #

    The problematic blog is running on MySQL 4.1.20, while the one Im having no issues with is 5.0.37, could that explain the issues Im having?

  3. iridiax
    Member
    Posted 6 years ago #

    A period in the theme folder name is just a bad idea.

  4. Tformosus
    Member
    Posted 6 years ago #

    Thanks and a good point.

    I've renamed the directory and checked that there are no references to the old name in the php files of the theme. Unfortunately it has no effect on how the theme is incorrectly displayed.

    There's still the error such as this popping up in the error log.

    [client 195.189.181.72] PHP Fatal error: main() [<a href='function.require'>function.require</a>]: Failed opening required '/var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2../../../../wp-config.php' (include_path='.:') in /var/www/vhosts/volunteerabroad.ie/httpdocs/blog/wp-content/themes/web2/style.php on line 2, referer: http://www.volunteerabroad.ie/blog/

    Line 2 of style.php is:
    require_once(dirname(__FILE__) . '../../../../wp-config.php');

    Is it actually looking in the right directory for wp-config?

    Again thanks.

  5. whooami
    Member
    Posted 6 years ago #

    umm
    why are you calling wp-config.php from a theme file?

    thats unnecessary.

  6. Tformosus
    Member
    Posted 6 years ago #

    I have no idea, Im not the author. The theme does have an options page, would it need access to the db via the details in wp-config.php to store its preferences?

    Though I kind of like the theme (when it works), if it wasnt for the other problems (enabling OpenID resulting in a completely blank unreachable blog) and Register Plus (displaying only have of its fields on the settings page) Id just move on. But my main concern was that I'd somehow made a stupid mistake setting up the blog and all these symptoms where the result, especially as Ive used this theme and plugins on my personal blog on another host without issue.

    And thanks!

  7. whooami
    Member
    Posted 6 years ago #

    I have no idea, Im not the author.

    ..as Ive used this theme and plugins on my personal blog on another host without issue.

    hmm, oke interesting. odd. themes already have access to the wp-db class and shouldnt need to load that (wp-config.php) for anything, that I am aware of.

  8. Tformosus
    Member
    Posted 6 years ago #

    The theme is available via the Theme Viewer. Though Im using the latest version from the author, this problem effects both versions.

    And again thank you for the help. :)

  9. Tformosus
    Member
    Posted 6 years ago #

    Could php safe_mode set to ON be the source of this odd behaviour?

    Its set to OFF with my working personal blog, but it's set to ON with the one Im experiencing these odd problems with.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic