Home>Support>fopen failed to open stream – header.php

fopen failed to open stream – header.php

Hey there,
I have recently provided an existing website with the vantage theme. At first everything seemed to work out great. But now, when trying to enter the site, the browser gives me the following error message:

________________________________

Warning: require_once(/homepages/46/d474191647/htdocs/wp-content/themes/vantage/header.php): failed to open stream: Permission denied in /homepages/46/d474191647/htdocs/wp-includes/template.php on line 501
Fatal error: require_once(): Failed opening required ‘/homepages/46/d474191647/htdocs/wp-content/themes/vantage/header.php’ (include_path=’.:/usr/lib/php5.4′) in /homepages/46/d474191647/htdocs/wp-includes/template.php on line 501

___________________________

The line 501 (second line) the error message is referring to is as follows:

[if ( $require_once )

require_once( $_template_file );]
However, I can still enter my wordpress environment. All .php files in the theme editor can still be opened except for the header.php. WP states the following error message:

____________________________

Warning: fopen(/homepages/46/d474191647/htdocs/wp-content/themes/vantage/header.php): failed to open stream: Permission denied in /homepages/46/d474191647/htdocs/wp-admin/theme-editor.php on line 107
Warning: fread() expects parameter 1 to be resource, boolean given in /homepages/46/d474191647/htdocs/wp-admin/theme-editor.php on line 108

___________________________________

The Lines 107 and 108 (Last two lines!) the error messages are referring to, are as follows:
[ require_once( ABSPATH . ‘wp-admin/admin-header.php’ );
update_recently_edited( $file );
if ( ! is_file( $file ) )

$error = true;
$content = ”;

if ( ! $error && filesize( $file ) > 0 ) {

$f = fopen($file, ‘r’);

$content = fread($f, filesize($file)); ]
I have to admit, I have no real experience with coding at all. I therefore hope to have provided sufficient information for you experts to help out with this problem. I would greatly appreciate your help!
Thanks to everyone in advance!

Cheers

Tim

URL: http://efbe-moebelart.de

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 10 months ago Tiegler Zim

    I just wanted to add: the URL is http://efbe-möbelart.de but the interface wouldn’t let me enter “Ö” :). Further more I have set the page to maintenance mode, so you won’t be able to see anything. But as I said, it will only show you the first two error messages I have described above.
    Thanks again!

  2. 9 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Hi Tiegler

    Sorry to hear about this hassle.

    Please try a theme re-install. If you’re still able to access the admin you can do this by switching to another theme, deleting Vantage and then re-installing using the ZIP file, downloadable from your original order email and the following instructions:

    https://siteorigin.com/basics/updating-theme-from-zip/

    If you need to have that original email re-sent you can do so from here: Page: Retrieve Your Theme Order Numbers.

    If that doesn’t resolve the problem please try de-activating all plugins at once and re-test.

  3. 9 years, 10 months ago Tiegler Zim

    Hello Andrew,

    Thanks a bunch for your advice. That seemed to do the trick! You really helped me out :)

    Out of curiosity I am nevertheless wondering what might have caused the site to crash… The mere thing I changed in the original style sheet was the background color of menu items when selected with the cursor.
    Could that be the reason?

    Thanks again!!

  4. 9 years, 10 months ago Andrew Misplon
    Hi, I Work Here

    Really glad to hear you made progress here. I’m afraid I don’t know the exact cause and ran you though some standard steps to resolve the problem. Please keep in mind that any changes made to theme files via Appearance > Editor will be lost during theme update. When the theme is updated everything is overwritten. For small Custom CSS modifications please see our guide here: https://siteorigin.com/basics/modifying-theme-design-with-custom-css/.

    It’s very unlikely that making a change to style.css would cause any PHP errors but another file change might have.

    Sorry that’s not a definitive answer.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More