This is what is displayed in the browser when I try to open it:
Warning: require_once (/home/recoveryuganda/public_html/includes/defines.php):
failed to open stream: No such file or directory in /home/recoveryuganda/public_html/index.php on line 37
Fatal error: require_once():
Failed opening required '/home/recoveryuganda/public_html/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/recoveryuganda/public_html/index.php on line 37
NO file exist in the path that specified, check, maybe you change the name, or moved to some other place the file.
just go to this directory:
/home/recoveryuganda/public_html/includes/
and find this file: defines.php
the problem is this file is missing/
if you have a backup of that file put it in that directory.
Related
You can see the error on http://orgdevelopers.tk/api/app/Config/core.php
my php version is 7.0.33.
I am getting this error when I execute my PHP file. Please help.
{Warning: require_once(/home/orgdevelopers.tk/public_html/ok/app/Config/constant.php): failed to open stream: No such file or directory in /home/orgdevelopers.tk/public_html/ok/core.php on line 3
Fatal error: require_once(): Failed opening required '/home/orgdevelopers.tk/public_html/ok/app/Config/constant.php' (include_path='.:/usr/local/lsws/lsphp70/share/pear:/usr/local/lsws/lsphp70/share/php:/usr/share/pear:/usr/share/php') in /home/orgdevelopers.tk/public_html/ok/core.php on line 3}
core.php line 3 is== require_once('app/Config/constant.php');
If both files reside in same directory, The path of constant.php in require_once function in core.php should be constant.php or /api/app/Config/constant.php or __DIR__.'/constant.php' instead of app/Config/constant.php
I have [root]/includes/helpdesk/pipe.php with this code:
#!/opt/cpanel/ea-php55/root/usr/bin/php
<?php
require_once("pipeprocess.php");
In the same location in pipeprocess.php in first line I include another file still in the same location: helpdesk.php
then in [root]/includes/helpdesk/helpdesk.php in the first line I have:
require_once ("../../config.php");
config.php is in [root], this is why I have twice ../../, helpdesk.php works fine with direct access, but if run pipe.php via pipe command setup in cPanel I get a bounce error that config. php is not found:
PHP Warning: require_once(../../config.php): failed to open stream:
No such file or directory in
/home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line
21
Warning: require_once(../../config.php): failed to open stream: No
such file or directory in
/home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on line
21 PHP Fatal error: require_once(): Failed opening required
'../../config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on
line 21
Fatal error: require_once(): Failed opening required
'../../config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')
in /home/[user]/public_html/[root]/includes/helpdesk/helpdesk.php on
line 21
Why I am getting this pipe error as direct access to helpdesk.php works fine? does pipe not accept ../ or ../../ as parth of the path? or is there an EasyApache4 issue? I did several tests and noticed this is because of ../ as part of including path. Does pipe/EasyApache4 have problem with this?
What if you used __DIR__, based on where your currently running script file's folder?
As of PHP 5.3.0, you could use something like this:
require_once (__DIR__ . "/../../config.php");
I accidently deleted wp-admin/index.php file, but when I uploaded the file again (index.php) it's producing an error.
Warning:
require_once(/home/kiddyfan/public_html/huatsms.com/wp-admin/admin.php)
[function.require-once]: failed to open stream: No such file or
directory in /home/kiddyfan/public_html/huatsms.com/wp-admin/index.php
on line 10
Fatal error: require_once() [function.require]: Failed opening
required '/home/kiddyfan/public_html/huatsms.com/wp-admin/admin.php'
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/kiddyfan/public_html/huatsms.com/wp-admin/index.php on line 10
What should I do? Could it be a permission setting?
Since it's a core file, you can get it again from the WordPress repository.
Download the version of WordPress you're using from the Release Archive.
Then overwrite your current wp-admin folder with the contents of the zip file you've downloaded. Or just your admin.php file.
My system's path is C:\xampp\htdocs\codeigniter and my application folder is inside the system folder. I am facing the following error..
Warning: require_once(C:/xampp/htdocs/codeigniter/core/CodeIgniter.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\codeigniter\index.php on line 202
Fatal error: require_once() [function.require]: Failed opening required 'C:/xampp/htdocs/codeigniter/core/CodeIgniter.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\codeigniter\index.php on line 202
Your system path should be:
C:\xampp\htdocs\codeigniter\system
And your app path should be:
C:\xampp\htdocs\codeigniter\application
Did you change these?
Your index.php file cannot find the path you specified which means the path is probably incorrect unless you are having permission issues.
I have the following PHP script placed in the root directory of my web hosting server, and it works fine.
<?php
include(dirname(__FILE__).'/config/config.inc.php');
require_once(dirname(__FILE__).'/init.php');
When I moved the script to a new folder under my web root, i.e. public_html/myfolder, the script gives the following error:
Warning: include(/home/name/public_html/folder/config/config.inc.php) [function.include]: failed to open stream: No such file or directory in /home/name/public_html/folder/test.php on line 2
Warning: include() [function.include]: Failed opening '/home/name/public_html/folder/config/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/name/public_html/folder/test.php on line 2
Warning: require_once(/home/name/public_html/folder/init.php) [function.require-once]: failed to open stream: No such file or directory in /home/name/public_html/folder/test.php on line 3
Fatal error: require_once() [function.require]: Failed opening required '/home/name/public_html/folder/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/name/public_html/folder/test.php on line 3
Should I change the path as follows:
<?php
include(dirname(__FILE__).'/../config/config.inc.php');
require_once(dirname(__FILE__).'/../init.php');
Am I correct?
Uhm, you say you only moved your script (the one that contains the include lines) to the "public_html/folder". That way, dirname(__FILE__) contains the full path, including the "folder" directory. So, now, you need to go up one step in the directory tree, to be able to reach the "config" directory; an explanation follows:
Before you had:
/home/name/public_html/config/config.inc.php
/home/name/public_html/init.php
So your file
/home/name/public_html/test.php
Managed to access the files using the path from dirname(__FILE). But now, the test.php has been movedto the directory "folder":
/home/name/public_html/folder/test.php
Thus, dirname(__FILE__) should return the path comprehensive of the "folder" directory. But the files you need to include are in teh "old" directory, so youneed to add that ../ to the path of the include, to be abletoreach those files :)