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.

 

 

 

Link to comment
Share on other sites

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...

 

 

 

 

 

Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

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?.

 

 

 

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.