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/local/lib/php') in /home/sandiega/public_html/register.php on line 2

Warning: include_once(include/db.php) [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/local/lib/php') 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).
kgiitAsked:
Who is Participating?
 
tdotCommented:
Hi, kgiit

If you no longer have access to the old files and no backups you will have to recode.
0
 
Chris StanyonCommented:
You need to make sure that the public_html folder has a subfolder called 'include' and that the core.php is inside that.

If it still doesn't work, you may need to add the following line at the start of your script.

set_include_path('/include');


0
 
kgiitAuthor Commented:

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.
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
tdotCommented:
open your cpanel a click on file manager look for your include folder.
0
 
tdotCommented:
If its not there it was not transfered
0
 
kgiitAuthor Commented:

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
0
 
tdotCommented:
Hi, kgiit

There is nothing more we can do can you please close the question..
0
 
kgiitAuthor Commented:

Question answered.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.