Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: problem with website code

  1. #1
    ata.online is offline x10 Sophmore ata.online is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    England
    Posts
    159

    problem with website code

    I have managed to upload my website thanks to gsonline who helped me do this. Now the problem is getting the articles to show up on the website. There are about 1998 articles in /public_html/blogepublish. But the problem is when click on a link on main page it shows: the following message:

    http://ata.x10hosting.com/blogepublish/

    http://ata.x10hosting.com/blogepubli..._s_How___.html
    (please note the site will take some time to load up)


    Warning: file(../adb_feeds/177.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/191.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/183.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/180.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/197.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/178.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/190.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/194.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/187.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/182.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/195.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/185.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/186.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106

    Warning: file(../adb_feeds/177.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 156

    Warning: file(../articles/0/blogepublish51099.htm) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 196

    Now the adb folder is in:/public_html/adb_feeds.
    Any solutions. Maybe transfer articles to /public_html/adb_feeds but it may slow it down.
    Last edited by ata.online; 11-30-2009 at 08:01 AM.

  2. #2
    ah-blabla's Avatar
    ah-blabla is offline x10 Lieutenant ah-blabla is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    375

    Re: problem with website code

    The .. (two dots) means up folder, so basically:
    Code:
    Warning: file(../adb_feeds/177.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106
    means that /home/ata/adb_feeds/177.dat can't be opened. That is where it is looking for the file, but the adb folder is actually under /home/ata/public_html, so what you need to do is move the adb folder up a directory, i.e. to /home/ata (or the root folder as seen in ftp).

  3. #3
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: problem with website code

    Hi ah-blabla,

    adb_feeds folder is already in the required folder and the file is available to open and the permissions are also ok.

    But somehow the index.php is unable to open it. I was checking that.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  4. #4
    ata.online is offline x10 Sophmore ata.online is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    England
    Posts
    159

    Re: problem with website code

    Quote Originally Posted by ah-blabla View Post
    The .. (two dots) means up folder, so basically:
    Code:
    Warning: file(../adb_feeds/177.dat) [function.file]: failed to open stream: No such file or directory in /home/ata/public_html/index.php on line 106
    means that /home/ata/adb_feeds/177.dat can't be opened. That is where it is looking for the file, but the adb folder is actually under /home/ata/public_html, so what you need to do is move the adb folder up a directory, i.e. to /home/ata (or the root folder as seen in ftp).
    I assumed that the website will only work in public_html, not the root directory (/home/ata). If i place the adb_feeds in the root directory it will not connect. Am i right?

    Also, can i have several folders in public_html as if i place all the files in public_html it causes overload on the directory and freezes for a while?
    For example:

    public_html/adb_feeds
    public_html/cache
    public_html/articles

    This way it is easier but somehow the folders do not connect with each othe when i check website.

  5. #5
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: problem with website code

    This way it is easier but somehow the folders do not connect with each othe when i check website.
    When you change the location of your files, you'll need to change their links in the code to match those locations.

  6. #6
    ata.online is offline x10 Sophmore ata.online is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    England
    Posts
    159

    Re: problem with website code

    Quote Originally Posted by calistoy View Post
    When you change the location of your files, you'll need to change their links in the code to match those locations.
    Ok. But how can i change the links in the code? What do i need to look for?
    So to make it easier it is better to not have any extra folders in public_html to avoid changing the code.
    If i do that, it causes an overload of files in one directory.

  7. #7
    calistoy's Avatar
    calistoy is offline Free Support Volunteer calistoy is just really nice
    Join Date
    Aug 2008
    Location
    USA
    Posts
    5,598

    Re: problem with website code

    I'm sorry for giving you advice without being able to follow up on it due to not being able to see your files in the first place.

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,504

    Re: problem with website code

    Quote Originally Posted by ata.online View Post
    I assumed that the website will only work in public_html, not the root directory (/home/ata). If i place the adb_feeds in the root directory it will not connect. Am i right?
    The root directory is "/". "/home/ata" is your home directory (the path can be abbreviated "~" or "~ata" in some contexts). "~/public_html" is also called the "document root" when the web server is set up as it is on X10.

    If the script is looking for the files in ~/adb_feeds, then the site should work with the files in that directory. What won't work is accessing the files directly in a browser, which is a security feature. If you move adb_feeds to ~/public_html, you'll need to protect them in another way, such as using mod_access.

    Quote Originally Posted by ata.online View Post
    Also, can i have several folders in public_html as if i place all the files in public_html it causes overload on the directory and freezes for a while?
    For example:

    public_html/adb_feeds
    public_html/cache
    public_html/articles
    The magic of modern file systems (well, modern as of the 1970s) is you can nest folders as you see fit. Some file systems have limits to the number of entries in a directory, the maximum path length or the total number of files & directories, but you're unlikely to run into them on ext3 (the file system used on X10).
    Last edited by misson; 12-02-2009 at 02:35 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  9. #9
    ata.online is offline x10 Sophmore ata.online is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    England
    Posts
    159

    Re: problem with website code

    [QUOTE=misson;607387]The root directory is "/". "/home/ata" is your home directory (the path can be abbreviated "~" or "~ata" in some contexts). "~/public_html" is also called the "document root" when the web server is set up as it is on X10.

    If the script is looking for the files in ~/adb_feeds, then the site should work with the files in that directory. What won't work is accessing the files directly in a browser, which is a security feature. If you move adb_feeds to ~/public_html, you'll need to protect them in another way, such as using mod_access.

    To protect files in /public_html can i just chmod files? Would that not be enough? The other way i checked is password protect directory but that blocks the website from coming live and requires password.
    If that doesn't work, how can i protect files using mod access as i checked the link you gave and it just gives information not how to set it up on x10hosting.

  10. #10
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,504

    Re: problem with website code

    Quote Originally Posted by ata.online View Post
    To protect files in /public_html can i just chmod files? Would that not be enough?
    You want the scripts to be able to read the files but not a visitor. Permissions won't help because the web server runs the scripts and processes the visitor's request; both scripts and visitors are accessing the files with the same credentials.

    I still say the best (i.e. safest & easiest) solution is to put adb_feeds in ~. There's a reason the script you're using expects to find them there. I don't see why you want to put it in public_html.

    As for using mod_access, the linked document gives you the necessary information (in particular, the Order directive), but it takes a little reading and thinking. Here's the give-you-a-fish version; in adb_feeds/.htaccess, put
    Code:
    Order Allow,Deny
    Deny from all
    
    Options -Indexes
    The last line is to turn off autoindexing.

    As an alternative to mod_access, you can use the rewrite engine (see also the rewrite guide, in particular the access restriction section). In ~/public_html/.htaccess, put:
    Code:
    RewriteEngine on
    
    RewriteRule ^/?(adb_feeds|cache) - [F]
    One advantage of RewriteRule is you can use a single line to deny access to multiple directories.

    Another alternative is to use RedirectMatch. In ~/public_html/.htaccess, put:
    Code:
    RedirectMatch 404 ^/(abs_feeds|cache)
    Like RewriteRule, you can match multiple directories. Additionally, this will leak even less information, as the visitor gets a "Not Found" response rather than "Forbidden" (which lets them know that the URL exists, but is inaccessible through normal means). It's functionally equivalent from a security standpoint to having adb_feeds in ~, though I'll repeat: just sticking adb_feeds in ~ is easiest of all.
    Last edited by misson; 12-02-2009 at 10:47 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

Closed Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Hybrid's HTML Lessons
    By Hybrid in forum Tutorials
    Replies: 18
    Last Post: 11-28-2009, 02:12 PM
  2. Website Not Working // Some Problem with server
    By srggos in forum Feedback and Suggestions
    Replies: 2
    Last Post: 01-17-2008, 09:59 AM
  3. BB Code Guide
    By Jober68 in forum Tutorials
    Replies: 1
    Last Post: 01-10-2008, 05:12 PM
  4. problem code <div> ads in wl_nuke
    By serpente in forum Free Hosting
    Replies: 5
    Last Post: 12-20-2007, 06:41 AM
  5. Problem with Website
    By kajandan in forum Free Hosting
    Replies: 3
    Last Post: 12-02-2006, 05:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers