WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] failed to open stream error when switching to php5 (20 posts)

  1. neuville
    Member
    Posted 5 years ago #

    Hello Guys,
    I've just switched to php 5 from my hosting control panel, but I cannot view my blog. I can still access the wordpress admin area (in a folder under the domain) but all other things are gone and my home page gives me this error:

    Warning: require(./folder/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4
    
    Warning: require(./folder/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4
    
    Fatal error: require() [function.require]: Failed opening required './folder/wordpress/wp-blog-header.php/' (include_path='.:/php5/lib/php/') in /web/htdocs/www.adverbox.com/home/index.php on line 4

    I've tried to view the index.php and .htaccess settings, and they're correct.

    any idea on how to solve this? thanks in advance!

  2. Samuel B
    moderator
    Posted 5 years ago #

    wp-blog-header.php
    you're sure it's there?

  3. whooami
    Member
    Posted 5 years ago #

    this is fixed, based on what I see at the url thats shown in the error.

  4. neuville
    Member
    Posted 5 years ago #

    @ whooami: no, it isn't. I've just switched to php4 and it works fine.

    @sambroll: yes, the file is there (admin/wordpress/)

  5. Samuel B
    moderator
    Posted 5 years ago #

    i hope you meant it is here
    /wordpress/wp-blog-header.php

  6. whooami
    Member
    Posted 5 years ago #

    Warning: require(./folder/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4

    Warning: require(./folder/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4

    Fatal error: require() [function.require]: Failed opening required './folder/wordpress/wp-blog-header.php/' (include_path='.:/php5/lib/php/') in /web/htdocs/www.adverbox.com/home/index.php on line 4

    did you edit any of that before pasting it?

    it would be nice to see the real error message if you did. if you didnt, you can clearly see that it (PHP) is looking for things in the wrong place. that's an issue with the server's PHP configuration, not wordpress, if thats the case.

  7. whooami
    Member
    Posted 5 years ago #

    .. unless, this path:

    /web/htdocs/www.adverbox.com/home/folder/wp-blog-header

    actually exists.

    far as I can tell, it doesnt.

    this, by the way, goes to the importance of providing accurate information when pasting error messages to the forum.

  8. neuville
    Member
    Posted 5 years ago #

    forgive me, the correct path is admin/wordpress

    I was working on a test install in same server and pasted the wrong code (also, just deleted the test install and the error still exists...)

  9. whooami
    Member
    Posted 5 years ago #

    forgive me, the correct path is admin/wordpress

    how about you correct the error message in it's entirety instead of leaving us to wonder :) since even that does not correspond to where wordpress needs to be looking for that file.

    this shouldnt be like pulling teeth., were not dentists.

  10. neuville
    Member
    Posted 5 years ago #

    you're right, I'll edit the code :-)

    the prob is still there, btw...

    //edited... I cannot edit past posts, it seems.

    here you're the right code:

    Warning: require(./admin/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4
    
    Warning: require(./admin/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4
    
    Fatal error: require() [function.require]: Failed opening required './admin/wordpress/wp-blog-header.php/' (include_path='.:/php5/lib/php/') in /web/htdocs/www.adverbox.com/home/index.php on line 4
  11. whooami
    Member
    Posted 5 years ago #

    ok.

    so, we have this:

    Hello Guys,
    I've just switched to php 5 from my hosting control panel, but I cannot view my blog. I can still access the wordpress admin area (in a folder under the domain) but all other things are gone and my home page gives me this error:

    and this is the error:

    Warning: require(./admin/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4

    Warning: require(./admin/wordpress/wp-blog-header.php/) [function.require]: failed to open stream: Not a directory in /web/htdocs/www.adverbox.com/home/index.php on line 4

    Fatal error: require() [function.require]: Failed opening required './admin/wordpress/wp-blog-header.php/' (include_path='.:/php5/lib/php/') in /web/htdocs/www.adverbox.com/home/index.php on line 4

    why is PHP 5 looking in admin ? wordpress uses wp-admin.

    Interesting.

  12. neuville
    Member
    Posted 5 years ago #

    hello whooami, admin/wordpress is the folder of my install.

    the dashboard and all other admin stuff works great, just the blog is not visible with php 5

  13. whooami
    Member
    Posted 5 years ago #

    ok, but, then whats this:

    /web/htdocs/www.adverbox.com/home/index.php

    where's admin?

    Im not understanding what you have done, and no doubt that is precisely PHP 5's problem as well.

  14. whooami
    Member
    Posted 5 years ago #

    is wordpress installed into :

    /web/htdocs/www.adverbox.com/home/admin/wordpress

    ??

    if so? why???

    I dont think I have ever seen wordpress installed that way (2 directories deep) with an index.php left in the root dir.

    `

  15. neuville
    Member
    Posted 5 years ago #

    I installed it 4 years ago (I knew nothing of WP at that time) :-)

    I don't drop it into the root directory because I fear something goes wrong...

  16. whooami
    Member
    Posted 5 years ago #

    is wordpress installed into : ...

    you didnt answer my question.

    ive no doubt that your original install path is the source of your problem ..

    You can confirm it rather easily, by installing wordpress normally (no putting all the wordpress files in a directory 2 deep) in a sub-directory, and seeing if you get similar issues (im willing to bet that you dont)

    I could fix your problem my self, if youre hell-bent on switching to PHP5, but Im afraid I cant do it for free.

    If youre interested, contact me off the forum.

  17. neuville
    Member
    Posted 5 years ago #

    hello whooami,
    thanks for your help, I'll check if installing a brand new wp in the root folder causes similar issues.

    I could fix your problem my self, if youre hell-bent on switching to PHP5, but Im afraid I cant do it for free.

    on the other side, thanks for your offer, also, but I feel I won't contact you off the forum: paying you to solve the issue would be against WP nature (open source = support on public forums = people shares their knowledge for free to get advantage from other people's knowledge)

    since I run a no-profit website I've no budget for that, the only thing I can do is posting in the forums and google to find solutions.

    ciao!

  18. whooami
    Member
    Posted 5 years ago #

    thanks for your offer, also, but I feel I won't contact you off the forum: paying you to solve the issue would be against WP nature (open source = support on public forums = people shares their knowledge for free to get advantage from other people's knowledge)

    thats fine. Im not offended.

    Just so you understand though ..

    That something is opensource, doesnt mean that other people's time and work is free. Anything I do outside of this forum, is paid work, and thats not against the "nature of opensource", sorry. Thats called getting rewarded for knowledge and,in all honesty, skill. You can surf car mechanics forum all day, and get free advice, but you're probably not going to find someone on one that will come to your house and give you a new transmission for free.

    Thats not how things work.

    Secondly, while I can, just like everyone else, give you tons of advice, youve been unhelpful (at best), in explaining EXACTLY what your file structure is. Ive pretty much had to guess.

    Obviously, seeing it, since you cant or wont, explain it, would simplify things immensely.

    If a fresh install in a subdirectory works with PHP5, then fix your other install so that wordpress isnt looking in a bunch of messed up paths trying to find files.

  19. neuville
    Member
    Posted 5 years ago #

    Hey man, I didn't want to say you've to give your professional skills for free (away from me, I work in the internet and I know it's sad when people doesn't give value to knowledge). I don't mean your time is free (it's valuable), but if you're looking around this forum probably you've solved YOUR issues for free (as I've done in the past), having advice from other people.

    I don't need a new transmission for free, I'm currently in need to make my brand new transmission work...

    The subject is: you know a possible solution for this issue, or you don't. Since it looks a new one for the forums I've asked for help. Since you don't know, I'll look deeper inside. No prob.

    This told, the only error I made was giving the wrong path in the first post (corrected above, and with my excuses to the community).

    This told, the post was about a function.require issue and not about open source, forums, free or paid support. I'd like it to remain to the function.require issue.

    Thanks again for your time,
    ciao!

  20. neuville
    Member
    Posted 5 years ago #

    Just changed this thread to resolved

    After some trial and error, I found (and thanks whooami for stimulating me to search for it by myself) the issue was the following: the server tried to load the folder: wp-blog-header.php/

    wp needs to load the page wp-blog-header.php (without the slash)

    by now all things work great on my hosting, hope it will do so in the near future, and hope this will help other wordpressers ou there!

    ciao!

Topic Closed

This topic has been closed to new replies.

About this Topic