Fatal error: Failed opening required…
-
Well I didn’t get too far! Trying to hit:
https://www.naturalfoodworks.com/weblog/wp-admin/install.phpreturned:
Fatal error: Failed opening required ‘//wp-settings.php’ (include_path=’.:/usr/local/lib/php’) in //wp-config.php on line 31Anyone?
Thanx in advance
DD
PS Please be specific…I’m a moron!
-
Looks like it’s having trouble with the absolute path of your install. In wp-config.php it tries to include wp-settings.php:
define(‘ABSPATH’, dirname(__FILE__).’/’);
// Get everything else
require_once(ABSPATH.’wp-settings.php’);
?>First of all does wp-settings.php exist? a quick way to test if the path to this file is correct is to temporarily change the above to:
define(‘ABSPATH’, dirname(__FILE__).’/’);
// Get everything else
echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
exit;
?>This will print the path to the screen and then you’ll be able to verify if the path is correct.. Then change the code back to what it was. If the path is correct then change:
require_once(ABSPATH.’wp-settings.php’);
TO:
include(‘../wp-settings.php’);Hope this helps. Post back with your findings.
I also don’t want to steer you wrong.. I’ve never had a problem installing WordPress. It should work, so what I gave you was a cheap hack to possibly get you over this little hump. I have a feeling if you’re having a problem this early in the install this hack won’t help becuase you might run into other problems before it’s done.
Good luck
OK that showed the path as:
Path to wp-settings: //wp-settings.phpSo I changed the code to:
define(‘ABSPATH’, dirname(__FILE__).’/’);
// Get everything else
require_once(ABSPATH.’//wp-settings.php’);
?>But that returned:
Fatal error: Failed opening required ‘////wp-settings.php’ (include_path=”) in //wp-config.php on line 31Don’t know where all the extra slashes came from….
Thanx
DDTo hack it, I was suggesting you change:
// Get everything else
require_once(ABSPATH.’wp-settings.php’);TO:
// Get everything else
include(‘../wp-settings.php’);But try this first. Something is doubling up the forward slash. I thought the server was smart enough to ignore an extra slash but maybe not. Change:
define(‘ABSPATH’, dirname(__FILE__).’/’);TO:
define(‘ABSPATH’, dirname(__FILE__));Rats! This:
define(‘ABSPATH’, dirname(__FILE__));// Get everything else
include(‘//wp-settings.php’);Gets:
Warning: Failed opening ‘//wp-settings.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in //wp-config.php on line 31Fatal error: Call to a member function on a non-object in /wh60319/public_html/weblog/wp-admin/install.php on line 52
Is this getting worse?
DD
PS Thanx
Sorry for the bantering back and forth but leave out the forward slashes in the include:
—————–
define(‘ABSPATH’, dirname(__FILE__));// Get everything else
include(‘//wp-settings.php’);CHANGE TO:
————–
define(‘ABSPATH’, dirname(__FILE__));// Get everything else
include(‘wp-settings.php’);Personally I don’t think the absolute path is working so it can’t find the location of the file on the server. By changing to the include statement it will try to find it relative to your website directory. wp-config.php & wp-settings.php are in the same directory, so you won’t need any path information in front of it if you use include.
If you know the server path to your web directory you could put everything back the way it was and hardcode your absolute path that way any other stuff needing the absolute path will be correct. But try the above first.
———————-
define(‘ABSPATH’, ‘/DIR/PATH/TO/WEB/DIRECTORY/’;Good luck.
Well I don’t know why you should be sorry…you’re the one helping me! Anyway that didn’t work either. I keep getting one of the two errors….I’ve tried all manner of varaitions on the path but there’s just no joy…
What I cant understand is why the path is an issue since all of the files reside in the same dir…
DD
I agree.. If you’ve still got the will after all this, put everything back to normal then throw this in:
—————-
echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
exit;AFTER:
———
define(‘ABSPATH’, dirname(__FILE__).’/’);Let me know what it says.
define(‘ABSPATH’, dirname(__FILE__).’/’);
echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
exit;// Get everything else
require_once(ABSPATH.’wp-settings.php’);Gets me back to:
Path to wp-settings: //wp-settings.phpGrrrrr
DDActually that’s a good sign.. At least you know now that the ABSPATH thing isn’t working.. Are you doing this on a hosted webserver? If so, find out from them the full path to the directory where WordPress has been installed, then rewrite this:
————-
define(‘ABSPATH’, dirname(__FILE__).’/’);To be this:
————-
define(‘ABSPATH’, ‘/PATH/TO/YOUR/WORDPRESS/’);Change /PATH/TO/YOUR/WORDPRESS/ to the path they give you. Make sure to put that single forward slash at the end of the path. Also make sure to remove:
———–
echo (‘Path to wp-settings: ‘.ABSPATH.’wp-settings.php’);
exit;Before doing the above.. This will ensure that WordPress knows exactly where the files are it’s looking for. I think I’ve reached the end of my ideas.. Good luck and let me know if it works.
Well I appreciate your help. But even with the full absolute path the file fails to open. I have tried reinstalling the entire package and reconfiguring the config file but nothing seems to work. If I can’t even get past this first problem, maybe this is not the right software for me. It’s already cost me a full day and an evening. I think I am going to have to try something else unless anyone has any other ideas. Thanx again for all your kind help.
DD
Fatal error: Failed opening required "https://www.naturalfoodworks.com/public_html/weblog/
wp-settings.php"Where is the /public_html/ coming from?
EDIT: What are your server specs? Apache? IIS? PHP version? MySQL version? Visa card number?
I noticed an entry in the PHP 4 changelog which indicates that a bug in dirname() was fixed way back in PHP 4.0.3 — which is still below the minimum requirements for WordPress.
Do you know what version of PHP you have? If not, create a file called
phpinfo.php
in the root directory of your website and add the contents:<?php phpinfo() ?>
Save the file and load
https://www.naturalfoodworks.com/phpinfo.php
in your browser to view your PHP specs. Check that the version number is at least 4.1.OK
PHP 4.2.3
MySQL Version 11.15 Distribution 3.23.43
“For UNIX, we use Sun Microsystem’s Solaris 7 operating system”
I can’t find ny refrence to Apache…could this be my problem? Like I said before, I’m a moron so I am most likely in over my head anyway….DD
Addendum…
My hosting service tells me that I have Apache 1.3 running.
DD
PS They also said that I do not have access to anything above my site root (public_html)
- The topic ‘Fatal error: Failed opening required…’ is closed to new replies.