Jump to content

failed to open stream: No such file or directory in


ketchumdev

Recommended Posts

My PHP page:

http://bocce.tongie.me/add_user.php

Throws the error message:

Warning: include(/connections/ketchumdevread.php) [function.include]: failed to open stream: No such file or directory in /home/content/86/7345486/html/bocce/login.php on line 1

 

This functions flawlessly in my local testing environment (XAMPP). Somehow, the code I have refuses to locate my “connections” folder on the remote server.

I have confirmed spelling, capitalization, folder location, and attempted every conceivable combination of ../../.

 

Also, due to the fact that this is located under a subdomain, I have attempted to use the path /bocce/connections/ketchumdevread.php

 

This really feels like an elementary problem, I just can’t find the solution.

 

I’m stumped. Any suggestions?

 

Here are the first few lines of the add user page (copied from the remote server):

 

<?php include('/connections/ketchumdevwrite.php'); ?>

<?php

if (isset($_POST['password'])) {

                $_POST['password'] = sha1($_POST['password']);

}

 

Thank you all very much.

 

 

 

When you go localhost, in the browser should see the XAMPP stuff....

 

If you then goto the www directory, your see php files there, add yours then do it agin with the new file name.

 

localhost/what_ever.php

 

should see your php page...

 

 

 

 

 

PHP-Real, thank you for your response.

 

But I don't get your meaning.

In the online directory there aren't any files called localhost, and nothing in the pages attempts to point to localhost.

The page will load, it just throws the warning "failed to open stream: No such file or directory in ..."

It fails to make the link to my connection file.

The files are there, my path is just wrong somehow.

I'm overlooking something obvious.

Thanks again

Did I mention this is my first crack at PHP?

 

sorry mate thort you was dong all this at home so sorry.

 

 

This would help, but you can not find the home page.

<?php
echo $_SERVER['PHP_SELF'];
?>

 

 

Surly the web company, you got going there, can help email them?

 

Didnt you get any intuduction, papers emails?.

 

 

 

Do NOT use include('http:// ... 

 

Warning: include(/connections/ketchumdevread.php) [function.include]: failed to open stream: No such file or directory in /home/content/86/7345486/html/bocce/login.php on line 1

 

Where is the connections folder in relation to login.php. Is it in the same directory? or is it in one of the directories above it?  By putting a slash at the beginning of it, you are telling PHP to look in the root of the file system of the server. You can pretty much bet that it is NOT there. If connections is a folder in bocce (where login.php is), take the leading slash off. Otherwise, post your folder hierarchy, and we'll see what we can do.

 

 

DavidAM,

The connections folder is in the bocce folder, removing the slash at the beginning leads me to another error. I think I might have an issue in my connections file. I'm gonna try to work this out.  I seem to learn more if I work things on my own.

Thanks to everyone for the responses, I appreciate the help.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.