|
|
|
|
![]() ![]() |
Nov 1 2007, 03:36 PM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 6-September 07 Member No.: 49,507 |
I use a single php file for all my tag decorations and image calling so that each page is lighter and therefore isn't bogged down with the same repeated code over and over, which allows me not only to much easier change my layout and design (as I often do) but once I've finally gotten it up and working here, I realized none of the links work, I doubled, and triple checked them over and over again to make sure I wasn't making a mistake. I swore trap17 supported php, so why isn't it working? Am I missing some sorta code that i need to add, or need to take away, I'd really hate to have to switch to a much lesser host just because of this, but if the problem cannot be resolved I have no real alternative since all my pages cannot be viewed by clicking the links since all have ".php?id=" references. Any help at all would be immensely beneficial and much appreciated. If by chance somebody knows how to be able to view the same site using a php main file w/ all the tags and decorations, on them on the computer (Vista or XP if it makes a diff, i can use both) I would also be very grateful as it'd allow me an alternative to having to switch to another host and instead just looking at them on my computer, and giving it to my fiance who can look at it on hers (though her only option is XP). I know you can look at plain html files and navigate links that call to your C: locations but using the php?id= didn't work and it would show the cannot find error message in ie and firefox, and windows explorer. Anyways, again thank you very much for any help you may have to offer me, even a definitive answer would be beneficial at this point in time.
EDIT: By the way, this is the error message that shows up on the page, rather than any of the text i have for it. "Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/reith/public_html/reithonry.php on line 255" without the quotes. Is there perhaps something wrong with the layout of the folders, and would it at all be alleviated if I deleted all the folders in the ftp upload and just had the main site folder hold everything? The public_html and www folders somewhat confuse me as to why they're there, all hosts that i've had, had a very simplistic folder that you just deleted and made in place what you wanted, and i'm unsure of if placing my files in the public_html folder was right or wrong. This post has been edited by reith: Nov 1 2007, 03:40 PM |
|
|
|
Nov 1 2007, 04:31 PM
Post
#2
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Hey there, assuming this code works on either your local server or another webhost the problem is most likely one of two things.
First off you are right in putting your files into the public_html or www folders as these links lead to the only user-viewable directory, so if you have files elsewhere try moving them to a subdirectory of this folder. The other possibility is that your file/folder permissions are set up wrong. For testing purposes try setting permissions to all your files and folders to 777, this is especially true for the files you are using the "include" function on or with. Hopefully this will now work fine, but of curse its insecure so youll have to change the permissions to something like 557 or 556, a little research on google will help with that as i rarely use linux i dont often change file permissions. they are my best suggestions, if the problem persists then post some of the code, especially anywhere where the INCLUDE is used and of course if you havent already then try testing it on another server, it could simply be that the T17 servers are set up differently than the one you are testing on and so a little code modification will solve the issue. |
|
|
|
Nov 1 2007, 05:47 PM
Post
#3
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 6-September 07 Member No.: 49,507 |
Hey there, assuming this code works on either your local server or another webhost the problem is most likely one of two things. First off you are right in putting your files into the public_html or www folders as these links lead to the only user-viewable directory, so if you have files elsewhere try moving them to a subdirectory of this folder. The other possibility is that your file/folder permissions are set up wrong. For testing purposes try setting permissions to all your files and folders to 777, this is especially true for the files you are using the "include" function on or with. Hopefully this will now work fine, but of curse its insecure so youll have to change the permissions to something like 557 or 556, a little research on google will help with that as i rarely use linux i dont often change file permissions. they are my best suggestions, if the problem persists then post some of the code, especially anywhere where the INCLUDE is used and of course if you havent already then try testing it on another server, it could simply be that the T17 servers are set up differently than the one you are testing on and so a little code modification will solve the issue. I did exactly as you said for changing the file permissions to 777, still no change at all, I applied all changes to the public_html folder (where all my files for the site are) and applied the changes to all files there within so that I would be sure no file was at the default 750 code. I'll post the code I use to make this happen, all other sites have had no problems, I'm not sure why this is being such a big hassle, but thanks for the advice, I really do appreciate any help I can get. CODE <td valign="top"><?php include ("$id"); ?></td> The td is just the area I place it so that all other pages fall within that table area, the php include is where I use the tag reference so that I can just type in "reithonry.php?id=file.html" and that file can remain very small and with only the content on it, while the layout is loaded around it via the reithonry file, this has worked on all hosts that have had php enabled, so I'm confused why it's not working here, perhaps I need to use something else, if there is anything that would allow me to keep one file for layout/design and all other files for pure content that goes within a certain area I'd be more than happy to use that instead, as long as it allows pretty much the same and for my other pages to remain clean with just content on them. |
|
|
|
Nov 1 2007, 06:01 PM
Post
#4
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,874 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
I think we'll need more code than that.
The public_html Folder is the same as you would have at a 'lesser' Hosting Service as your account root folder. The www Folder is merely an alias Folder of public_html. DO NOT DELETE ANY FILES FROM WWW FOLDER, or they will be gone from the public_html Folder, too. When the php script throws that error, it cannot find the file you requested for the include. There is something wrong with your paths or permissions. You seem to have handled the permissions side, so let's focus on the path.. Post up the php source for the index.php you are using and are all the files in a single folder? public_html? Do you have anything in your .htaccess file that might be affecting the includes? mod_rewrites? Where is the script from? a CMS? Also, where does the anchor tag get created here: CODE td valign="top"><?php include ("$id"); ?></td> There is not an anchor tag here to cause the link to happen, unless the include does that. What does your source view tell you? are the anchor tags getting created or not? |
|
|
|
Nov 1 2007, 06:07 PM
Post
#5
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 6-September 07 Member No.: 49,507 |
I think we'll need more code than that. The public_html Folder is the same as you would have at a 'lesser' Hosting Service as your account root folder. The www Folder is merely an alias Folder of public_html. DO NOT DELETE ANY FILES FROM WWW FOLDER, or they will be gone from the public_html Folder, too. When the php script throws that error, it cannot find the file you requested for the include. There is something wrong with your paths or permissions. You seem to have handled the permissions side, so let's focus on the path.. Post up the php source for the index.php you are using and are all the files in a single folder? public_html? Do you have anything in your .htaccess file that might be affecting the includes? mod_rewrites? Where is the script from? a CMS? All files are in my public_html folder, within sub folders and such related to each thing the php calls for, the main problem isn't that it's just one file or one page that's missing, anything aside from the php file that i use is not working, typing it in or otherwise trying to direct to it won't let me see anything on the page, and i'm 99.999% certain all files are in the proper folders that are needed, though I'll check a few more times just to be sure. I'm not exactly sure what more coding you want, I only have one php file and that's in the main public_html directory, many of the other files are in the same directory with a few exceptions in other folders within the public_html folder, should I put public_html or www folder as extensions in the php link, or is leaving it blank sufficient? Currently a link looks exactly ilke this below. CODE http://www.eternaldiscordrpgs.trap17.com/reithonry.php?id=chapters.html Should it be id=public_html/chapters.html? |
|
|
|
Nov 1 2007, 07:39 PM
Post
#6
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,874 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
CODE http://www.eternaldiscordrpgs.trap17.com/?id=chapters.html This takes me to a Chat page Log-in screen. Should it? |
|
|
|
Nov 1 2007, 08:26 PM
Post
#7
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 6-September 07 Member No.: 49,507 |
CODE http://www.eternaldiscordrpgs.trap17.com/?id=chapters.html This takes me to a Chat page Log-in screen. Should it? CODE http://www.eternaldiscordrpgs.trap17.com/reithonry.php?id=chapters.html Should be the link, your link for some reason doesn't show the reithonry.php file which is what i use as my layout and everything, without adding the reithonry.php in there all links head to the chat, not exactly sure why, but try again with that link verbatim and it should show you exactly what I see. Thanks againf or helping jlhaslip, I really do appreciate your assistance. I rechecked the paths again and it seems everything is in order, still unsure of what's wrong, wish I knew how to fix this. |
|
|
|
Nov 1 2007, 10:14 PM
Post
#8
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 3,874 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
CODE Post the code from the reithonry.php file inside codebox bbcode tags and do you have an .htaccess file for that account? If so, post it as well. |
|
|
|