problem with website code

Status
Not open for further replies.

ata.online

New Member
Messages
159
Reaction score
0
Points
0
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/blogepublish/51099_Blogging_Blogging_For_A_Living__Here_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:

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
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).
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
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.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
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.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
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.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
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.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
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.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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.

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:

ata.online

New Member
Messages
159
Reaction score
0
Points
0
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.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
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:

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
I think that we're going to need someone who knows Microsoft Frontpage 4.0 and/or PHP to sort this out.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
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.


Misson, i have to say you are correct about the adb_feeds being in the root directory!
I just tested it out and noticed most of the adb_feeds warnings are gone except a couple of errors:

Warning: file(http://jacklewis.net/links/index.php?dpr=4&direction=v1) [function.file]: failed to open stream: Connection timed out in /home/ata/public_html/index.php on line 260

Warning: implode() [function.implode]: Invalid arguments passed in /home/ata/public_html/index.php on line 260

The links are now shown on the main page: ata.x10hosting.com. I have copied the cache and index files to the root directory. Do i need to transfer all the files to the root?
The folder left to transfer are the articles. But they can be read from browser for example:

http://ata.x10hosting.com/blogepubl...For_Small_And_Medium_Sized_Businesses.html.it

Note the website is translated in different languages.
I am just uploading all the articles one by one as for some reason, i cannot extract winzip files on starka server.
The reason why i assumed it has to be in public_html is because when you try to add a subdomain it automatically puts in /public_html. Even though you want it to be in the root directory, the system puts it in public folder.

Thanks.
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
To correct the site without changing the code means you can copy the files.

But the recommended thing is to check the code and change the link where the articles are pointing to the /cache

Because all your files are in cache and some articles are in adb_feeds as dat files.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
To correct the site without changing the code means you can copy the files.

But the recommended thing is to check the code and change the link where the articles are pointing to the /cache

Because all your files are in cache and some articles are in adb_feeds as dat files.

Yes, that is what i did. i copied the files first to root directory and checked if it was working. Then deleted files the copied files from public_html as it is a security risk if i kept them there. Also, if the files are in root directory, then i don't think you need password to protect them (am i correct here?)

Also, the cache files seems to show data error when you try to access it and have informed admin about it.The files are there and i can access them from browser but not from cpanel. But the cache files do work though.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
The first of the two errors showing in your site is a failure to load a page from a separate website. jacklewis.net

Do you own jacklewis.net and/or have permission from him to use his bandwidth to publish a set of links from his site? He may have blocked anyone doing that and that's why an error occurred when your site tries to load that link.

The last error looks like it may just be a php coding error.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
The first of the two errors showing in your site is a failure to load a page from a separate website. jacklewis.net

Do you own jacklewis.net and/or have permission from him to use his bandwidth to publish a set of links from his site? He may have blocked anyone doing that and that's why an error occurred when your site tries to load that link.

The last error looks like it may just be a php coding error.


Hi calistoy,

Ok. the owner of jacklewis.net may be the same guy that sent me a backup copy. Is there a way to remove his links?
Also, althought the links are visible on main index page but when you click on any links it gives an internal error message:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, support@x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.






I copied most (if not all) of the files to root directory as misson mentioned to have adb_feeds in root directory to sort out the errors. Or does the articles and cache folders have to be in public_html?
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
Edit the index.php file and remove the code that calls that link.

As for putting files in the root as opposed to public_html, I had always thought that it was public_html directory that made it possible for your site to be viewable online. Even with that thought, after I just now viewed your site, all of the adb_feed errors are gone. But clicking any of the links on the page still result in an internal server error. This could be because the files still aren't where they are being called to load, or the php code in the index page isn't functioning according to x10hosting server configuration.

To be honest, you may want to take the time to actually learn html and php to make this site work properly and maintain it yourself, or hire someone to fix any mistakes and maintain the site for you.

Another option is that if there are indeed mistakes in the site, you might consider asking the guy who sold it to you to fix it for you.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
To be honest, you may want to take the time to actually learn html and php to make this site work properly and maintain it yourself, or hire someone to fix any mistakes and maintain the site for you.
Seconded. Also, learn about HTTP and web servers. In particular, the relationship between a URI and the files on a web server.

At its most basic, a web server maps a URI to a file by appending the path part of the URI to the document root, which is "~/public_html" in this case (e.g. "/articles/Belgium.html" becomes "~/public_html/articles/Belgium.html"). This means anything under ~/public_html is accessible via the web server; anything else, including what you put in ~ (which is your home directory, not the root) isn't accessible. A web designer has to consider what should be publicly accessible and what should be inaccessible. Since you're using someone else's site implementation, you don't get to make that choice. Additionally, when more than one file is involved in a web page, some of the files must refer either to other files (if processed on the server, such as in PHP scripts) or other URIs (if processed on the client, such as JS, CSS and HTML).

The actual process of mapping a URI to file is more involved because various server components (e.g. mod_rewrite, mod_alias and mod_negotiation on Apache) get involved.

In short, put the folders and files wherever the developer designed them to be placed. We already know adb_feeds should be in ~. I'd expect "articles" to go in the document root, but I can't say for certain, since I didn't design the site. As for "cache", I have no guess, since I don't know enough about how it's used.

As for the links (and image URIs), they have the wrong server name. Looks like there's a setting for the server name somewhere, and (with it unset) the links are improperly generated; "/blogepublishing" becomes "http://blogepublishing.com".

Note that auto-translated pages no longer count as one of the big-3 required site languages (French, Spanish and English). You're fine on this count since your site is in two of the languages, but you still might get into trouble since the translation links either use Google or aren't actually links. The latter refers to the (e.g.) "Traduzioni disponibili" section at the top of each article; fix that section and you shouldn't have any hassles.

Also, it looks like you didn't write many (any?) of the articles. Make sure the articles are public domain, creative commons or you otherwise have permission to host them. Copyright infringement is against the ToS, and you don't want to get banned. To be safe, you'll need to display a notice for each article stating its status and (in a perfect world) a link to the original to prove it.
 

ata.online

New Member
Messages
159
Reaction score
0
Points
0
Edit the index.php file and remove the code that calls that link.

As for putting files in the root as opposed to public_html, I had always thought that it was public_html directory that made it possible for your site to be viewable online. Even with that thought, after I just now viewed your site, all of the adb_feed errors are gone. But clicking any of the links on the page still result in an internal server error. This could be because the files still aren't where they are being called to load, or the php code in the index page isn't functioning according to x10hosting server configuration.

To be honest, you may want to take the time to actually learn html and php to make this site work properly and maintain it yourself, or hire someone to fix any mistakes and maintain the site for you.

Another option is that if there are indeed mistakes in the site, you might consider asking the guy who sold it to you to fix it for you.


The guy charges $50 an hour! I don't think i can pay that much for site which i bought for a few hundred. Now the value of site is much less now due to inactivity. When i bought the backup from him, i assumed it wouldn't take long to setup. Also, most (if not all) of the articles was borrowed from Article dashboard. But it has a good feature on different languages.

I also thought all the files should be in public_html after reading forum posts. But it seems adb_feeds has to be in root folder.
 

calistoy

Free Support Volunteer
Community Support
Messages
5,602
Reaction score
87
Points
48
I also thought all the files should be in public_html after reading forum posts. But it seems adb_feeds has to be in root folder.

Still none of your inside links work, which means that something is still wrong with the structure of the site.

The guy charges $50 an hour! I don't think i can pay that much for site which i bought for a few hundred.

Wait a second, you told me you paid 34 dollars for that site, not a few hundred.
 
Last edited:
Status
Not open for further replies.
Top