I have this error
Warning: require_once(DB.php): failed to open stream: No such file or directory in /var/www/html/www.rosterbuster.com/inc/core.php on line 381
Fatal error: require_once(): Failed opening required 'DB.php' (include_path='/usr/share/php:/home/g3mini/pear/share/pear:/home/g3mini/pear/share/pear/') in /var/www/html/www.rosterbuster.com/inc/core.php on line 381
But when I go to ~/pear/share/pear or even /home/g3mini/pear/share/pear
DB.php is right there.
What can I possibly do?
In my case the problem was that I had encrypted my home folder.
The fix was sudo chmod 777 ~ Not the safest thing to do, but it worked.
Related
Warning: require(/home/*******/public_html/wp-includes/load.php): failed to open stream: No such file or directory in /home/******/public_html/wp-settings.php on line 21
Fatal error: require(): Failed opening required '/home/****/public_html/wp-includes/load.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/******/public_html/wp-settings.php on line 21
Can't see anything of my site and can't login to wordpress panel
but i can access cpanel
last thing i was do edit RTL.css and i undo my edits
Try uploading "load.php" in binary transfer mode.
It could be also a permission problem:
All directories should be 755 or 750.
All files should be 644 or 640. Exception: wp-config.php
should be 440 or 400 to prevent other users on the server from
reading it.
I need help solving , what says to be a permission error in the htdocs folder, because i needed to alter them to even add folders in the first place.
This is my init.php file:
<?php
//Start Session
session_start();
//Include Configuration
require_once('config/config.php');
//Helper Function Files
require_once('helpers/system_helper.php');
require_once('helpers/format_helper.php');
require_once('helpers/db_helper.php');
//Autoload Classes
function __autoload($class_name){
require_once('libraries/'.$class_name . '.php');
}
?>
I try to include it via `
When i run my index.php file i get this error:
Warning: require_once(../../htdocs/PHP-Wizard/helpers/system_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Fatal error: require_once(): Failed opening required '../../htdocs/PHP-Wizard/helpers/system_helper.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
I tried going one folder up with ../ , but it doesn't work.
I looked around for a similar error to mine, but no luck. They all say No such file or directory in (path).
Could it be that it is the same error, or do i really need to change my permissions, if so, how can i do that?
Edit: When i use include_once('helpers/system_helper.php'); i get this error:
Warning: include_once(helpers/system_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Warning: include_once(): Failed opening 'helpers/system_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Warning: include_once(helpers/format_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 10
Warning: include_once(): Failed opening 'helpers/format_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 10
Warning: include_once(helpers/db_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 11
Warning: include_once(): Failed opening 'helpers/db_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 11
The problem was indeed the permissions, i'm guessing because i copied the folder.
I fixed it by chmod 777 on all the files in that folder, and now it works fine.
Thank you for your time attempting to help me.
I tested using relative paths and it works fine.
<?php
require_once '../test.php';
echo ' you';
Where test.php just contains echo "hello"; resulted in the expected "hello you".
I would guess your problem is with file permissions. Can you check what permissions are on your system_helper.php? It should be at least executable by the user php is running as (usually www-data). I could reproduce your error message by doing a chown root test.php and chmod 600 test.php so I would guess something like
chown www-data: system_helper.php
or
chmod g+rwx system_helper.php
should give you permission to run the script.
All of a sudden one of my client's sites stopped working
Error:
Warning: require_once(/home/logosist/public_html/includes/defines.php): failed to open stream: No such file or directory in /home/logosist/public_html/index.php on line 18
Fatal error: require_once(): Failed opening required '/home/logosist/public_html/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/logosist/public_html/index.php on line 18
From the error I can see that the directory path is wrong:
Should be
/home/public_html/logosist/includes/defines.php
and not
/home/logosist/public_html/includes/defines.php
Any idea on how to solve this problem?
Check you directories and files access permissions. I don't think that it is path problem. I've had the same and setting correct permissions solved it.
I do Dropbox-API
it needs to access the Dropbox-SDK..
Here is the error shown in browser.
Warning: require_once(dropbox-sdk/Dropbox/autoload.php): failed to open stream: Permission denied in /home/albert/public_html/test/search.php on line 11
Fatal error: require_once(): Failed opening required 'dropbox-sdk/Dropbox/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/albert/public_html/test/search.php on line 11
I have been researching about it and try to chmod all the files, also chown all.. but it still show the same error..
Can anyone help? Thx
Check your include path for it may be that you have to change it or include/require the autoload file using its full path.
Is dropbox-sdk/Dropbox/autoload.php under . or /usr/share/php or /usr/share/pear, if not, that is your problem - your include path is incorrect, or your installation path for Dropbox was placed in the wrong place
i am getting the following errors when i am trying to include a file.. i have tried chmod 777 for the directory..checked twice ,the path is correct ..but still the errors persist
the errors are:
Warning: require(../lib/GoogleChart.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/project1/admin/googlechart/examples/line_chart_full.php on line 3
Fatal error: require(): Failed opening required '../lib/GoogleChart.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/project1/admin/googlechart/examples/line_chart_full.php on line 3
What might be wrong is it with the permission cause i have done chmod -R 777 on the directory
You coul try with absolute path starting from documen root (if you have no needs to run the script in command line because $_SERVER array is not provided if the script is launched by a shell)
require($_SERVER['DOCUMENT_ROOT'] . "/lib/GoogleChart.php";
Giving that the lib directory is in the root (www.example.com/lib/GoogleChart.php).
I would suggest require_once instead