I am building a small PHP system, and I can't open files like CSS Styles, PHP Include function and Images.
I also got some errors:
Warning: include(includes/functions.php) [function.include]: failed to open stream: No such file or directory in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Warning: include(includes/functions.php) [function.include]: failed to open stream: No such file or directory in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Warning: include() [function.include]: Failed opening 'includes/functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 2
Built by YYY.YYY
logo // Thats the Logo alt
Fatal error: Call to undefined function getlists() in /home/chezki/public_html/XXX.XXX/cp/CMS/index.php on line 28
Title Actions // Some images alt
Edit: On Windows, It is Ok, but on Linux, It is doing those errors
More edit: Solved
From your error messages, your script appears to be this:
/home/chezki/public_html/XXX.XXX/cp/CMS/index.php
Your are trying to load this file:
includes/functions.php
Since you get this error message:
No such file or directory
... the obvious conclusion is that this file does not exist:
/home/chezki/public_html/XXX.XXX/cp/CMS/includes/functions.php
Feel free to edit your question and provide more details if this is not the case.
Edit: the file must have that precise name. If it's called e.g. Functions.php, it's a different file.
You have permission problems. Your web server cannot read functions.php due to wrong permissions. Adjust permissions with chown and chmod.
Related
I'm making a website and I have to access the init file which is in the core folder. I'm currently in the includes folder detailsmodal.php file which is being triggered by an onclick event. The path I used
require_once './core/init.php';
is giving errors when i click on the modal:
Warning: require_once(./core/init.php): failed to open stream: No such file or directory in C:\xampp\htdocs\mednew\includes\detailsmodal.php on line 2
Fatal error: require_once(): Failed opening required './core/init.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\mednew\includes\detailsmodal.php on line 2
https://gyazo.com/e17324da3caa48c342255bb4bfd1344d
require_once('../../core/init.php');
I think you got two directories ahead instead of one.
I have seen different variations of this problem which I have tried to use without any success so i figured it would be best just to ask.
I recently moved my website from my wamp server over to my qnap server. Seams to be working quite well except 3 errors that popped up (did not have them on my local host and havent changed any of the code).
I get the following 3 errors.
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
I seam to understand what is going on that it cannot access the file but can anyone point out what i need to change and where/which file i need to change it. I have not done any changes to my codeigniter file structure (all original setup). If you need code dump just let me know from which file.
Thank you for your help.
Jonas
i want to draw a piechart in php using mysql. i am getting error only for below code.
<?php include "libchart/classes/libchart.php"; ?>
during run i am getting below error. anyone please help me.
Warning: include(libchart/classes/libchart.php) [function.include]:
failed to open stream: No such file or directory in
C:\xampp\htdocs\g2.php on line 2
Warning: include() [function.include]: Failed opening
'libchart/classes/libchart.php' for inclusion
(include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\g2.php on line
2
It means the file C:\xampp\htdocs\libchart\classes\libchart.php does not exist
it seems you giving wrong path for file. I think you should tell your directory path too here i.e where is the file in which you including the file and the file path which you want to include.
I am developing opencart application , i installed in on localhost ,and customize it but now i am trying to upload it to server but it get error
Warning: require_once() [function.require-once]: http:// wrapper is
disabled in the server configuration by allow_url_include=0 in
/home/content/29/9716229/html/johndhan/telhemboradz/index.php on line
17
Warning:
require_once(http://249development.us/johndhan/telhemboradz/system/startup.php)
[function.require-once]: failed to open stream: no suitable wrapper
could be found in
/home/content/29/9716229/html/johndhan/telhemboradz/index.php on line
17
Fatal error: require_once() [function.require]: Failed opening
required
'http://249development.us/johndhan/telhemboradz/system/startup.php'
(include_path='.:/usr/local/php5_3/lib/php') in
/home/content/29/9716229/html/johndhan/telhemboradz/index.php on line
17
You need to use paths for your files not HTTP url's. Open your config.php file and admin/config.php file and change
http://249development.us/
to
/home/content/29/9716229/html/
for all of the paths except for those that start HTTP_ or HTTPS_ in the define's
It seems that you are trying to include a remote file via HTTP. If this is intentionally the case, then you need to enable the http:// wrapper - as suggested by the warning you are getting. If this is not the case, then consider removing the URL http://249development.us/ from the require_once statements.
okay so as the question says: i'm including files in a file, but i keep getting "no such file or directory" errors. and it really doesn't make sense to me, because i've checked them, i've checked their permissions and they're the same as those that i can include in other scripts
just so you know: these includes are being made by a file that is being included within another
ie: login.php - includes - check_login.php (which is the file that yields these errors)
here are my current includes:
include('/home/user/public_html/taxnetwork.co.za/main/db/select_all.php');
require_once('input_cleaner.php');
include('/home/user/public_html/taxnetwork.co.za/main/db/insert.php');
require_once('/home/user/public_html/taxnetwork.co.za/main/mail/mailer.php');
and these are the errors i'm getting:
Warning: require_once(./db/insert.php) [function.require-once]: failed to open stream: No such file or directory in /home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
Fatal error: require_once() [function.require]: Failed opening required './db/insert.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
as warning say - you have the problem in
/home/user/public_html/taxnetwork.co.za/main/mail/mailer.php on line 2
then look in it and you will see there require_once(./db/insert.php)
you can change it to:
require_once('/home/user/public_html/taxnetwork.co.za/main/db/insert.php')
or to :
require_once(realpath(dirname(__FILE__).'/../../').'/db/insert.php')