kgiit
asked on
PHP script error Warning: include_once...: failed to open stream:
I have a friend that moved from one host to another, and basically just copied their directories over without regard to structure. I'm not saavy with the PHP/MYSQL/CPanel stuff, but I can tell the problem is that the scripts are pointing in the wrong direction:
Warning: include_once(include/core. php) [function.include-once]: failed to open stream: No such file or directory in /home/sandiega/public_html /register. php on line 2
Warning: include_once() [function.include]: Failed opening 'include/core.php' for inclusion (include_path='.:/usr/lib/ php:/usr/l ocal/lib/p hp') in /home/sandiega/public_html /register. php on line 2
Warning: include_once(include/db.ph p) [function.include-once]: failed to open stream: No such file or directory in /home/sandiega/public_html /register. php on line 3
Warning: include_once() [function.include]: Failed opening 'include/db.php' for inclusion (include_path='.:/usr/lib/ php:/usr/l ocal/lib/p hp') in /home/sandiega/public_html /register. php on line 3
I don't have admin access to the new host server, just the Cpanel admin console. Is their a way to fix this via the Cpanel? Or, do the scripts need to be recoded? I don't think the host has tech support with this type of knowledge, as my friend has not been able to get this corrected with them, and he doesn't know what PHP platform he was on before (if that makes a difference).
Warning: include_once(include/core.
Warning: include_once() [function.include]: Failed opening 'include/core.php' for inclusion (include_path='.:/usr/lib/
Warning: include_once(include/db.ph
Warning: include_once() [function.include]: Failed opening 'include/db.php' for inclusion (include_path='.:/usr/lib/
I don't have admin access to the new host server, just the Cpanel admin console. Is their a way to fix this via the Cpanel? Or, do the scripts need to be recoded? I don't think the host has tech support with this type of knowledge, as my friend has not been able to get this corrected with them, and he doesn't know what PHP platform he was on before (if that makes a difference).
ASKER
Chris,
The script has the '/include' path in it, but there is no include folder anywhere in the directory tree. I don't know if it was overwritten, deleted, or whether the server admin has to open the path to it. He may not have copied all of the files that he needed, just those he thought were relevant to the site itself. Which is what I'm afraid is the problem.
thanks for your reply.
open your cpanel a click on file manager look for your include folder.
If its not there it was not transfered
ASKER
Hi tdot,
I went through all of the directories, did a search with the CPanel, and didn't find /includes or the missing files. He doesn't have access to the old host files anymore. Is there a way to replace? Or, is it a recoding fix?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi, kgiit
There is nothing more we can do can you please close the question..
There is nothing more we can do can you please close the question..
ASKER
Question answered.
If it still doesn't work, you may need to add the following line at the start of your script.
set_include_path('/include