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.
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.
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.
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. Learned that the hard way once.
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?
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. Learned that the hard way once.
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.
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.
I think that registered globals are not enabled on Trap17 servers so as you are forwarding your page id as GET mathod then you should use superglobal $_GET[]. You can put the variable ($id) within the parenthesis.
Like this
<?php include($_GET['$id']); ?>
I also prefer include_once rather than include. It's just a precausionary measure. You should also use superglobals whereever you wanna refer to data from other page which are forwarded to current scripts.
That's better programming.
I also add this. You should know your server settings from a phpinfo(); file on your trap17 server and then use them to manually configure your local PHP settings so that what runs on your PC should run similarly on your Trap17 servers, and other than your fiance the rest of the world can enjoy it.
Notice from rvalkass:
Merged double posts. Remember you can use the Edit button to add to your post if no-one else has replied.
$id = $_GET['id'].".html"; if (file_exists($id)){ include $id; } else { echo "The requested file does not exist."; }
?>
That way, you don't have to type in .html at the end of the URL, and just the name of the file instead. Plus, if you use the other code, you'll get the same effect as if you were looking into a mirror that's infront of another mirror if you were to include the same page, example: http://www.eternaldiscordrpgs.trap17.com/r...d=reithonry.php (let it load for like 7-10 seconds, and you'll see why—be sure to stop the loading!).
Thanks very much for the help, it worked perfectly. If you have a spare moment, do you know exactly why my php include didn't work and the one you used did? Is it because things work better / right with these servers and they didn't on all the other ones I've been on? I'm not entirely sure why the two different codes do the same but one works while the other doesn't. However thank you very much for making it work for me, I greatly appreciate it. And I only put that much code because he said he wanted to see all of the php file >_>
I'm not really sure why your old code would work on the other server and i don't see how it could have, but mine worked because i told the PHP script to place what it gets from the GET method into a variable—the variable you declared. Without it, the script shouldn't (although more like can't) work the way you want it to.
Thanks very much for the help, it worked perfectly. If you have a spare moment, do you know exactly why my php include didn't work and the one you used did? Is it because things work better / right with these servers and they didn't on all the other ones I've been on? I'm not entirely sure why the two different codes do the same but one works while the other doesn't. However thank you very much for making it work for me, I greatly appreciate it. And I only put that much code because he said he wanted to see all of the php file >_>
I didn't know where to post this..... this category seemed about as good a fit as there was. on
most webservers (my trap 17 one included), there is a public_html folder and a www folder, anything
uploaded into one also gets put in the other. so i am wondering what is the point of both of these
folders? can someone tell me why each one exists?....
I was just randomly accessing the cPanel today and when I tried accessing the 'CGI Centre'
It gives me this error message CODE <!-- Let's Not see the results of the install
of cgiemail ... safeunlock: Invalid arguments at /usr/local/cpanel/SafeFile.pm line 91.
SafeFile::safeunlock(undef) called at /usr/local/cpanel/Cpanel/FileUtils.pm line 331
Cpanel::FileUtils::safecopy('/usr/local/cpanel/cgi-sys/randhtml.cgi-wrap'
;, '/home/obelisk/public_html/cgi-bin/randhtml.cgi') called at /usr/local....
I have a addon domain in my account (ramansingla.info): imbibe.in All subdomains on imbibe.in work
fine but one. ike.imbibe.in isn't working. It's more than 24 hrs that I created it. Also
when I tried to change Nameservers for ramansingla.info at GoDaddy for Primary Nameserver I entered
NS.COMPUTINGHOST.COM & GoDaddy said Invalid. Kindly help as it is urgent. Thanks & resolved .......
Hi, I was wondering if any changes have been made to the PHP and/or MySQL section at trap 17. All of
a sudden a PHP script is beginneng to give errors where it never did before. I have a greeting card
system on my website, and all of a sudden, when I try to add a card I get a load of errors, while I
have not changed any code. These ar erthe errors i am getting: CODE Warning:
imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions
in /home/mrdee/public_html/kaart/admin/classes/class_images.inc.php on line 200 Warning&....
I was wondering if something has changed in the MySQL or PHPMyAdmin section of Trap 17. (Hope I am
explaining this correctly). I run a newsletter system on my website and the details of the people
who subscribed are in a MySQL database. To get those data from the database and to send the
newsletter to all subscribers I use a program called "Qios Pelican". Up to now it always worked
perfectly, but now it cannot seem to retrieve data anymore, yet I have not changed anything to my
setup. I use the MySQL OLEDB Provider driver to connect, and in case it helps, here are the ....
In my CPanel, the bandwidth counter is constantly at 0, it never changes. I can never see how much
bandwidth I've used this month. My awstats never work also, so i have no idea how much traffic
is coming through my site. Does anyone know how I can fix my bandwidth counter? Thanks.....
When I click into my Awstats, I get the following error: QUOTE Error: Couldn't open config
file "awstats.leoncreations.trap17.com.conf" nor "awstats.conf" after searching in path
".,/home/leonc/tmp/awstats/,/etc/opt/awstats,/etc/awstats,/etc,/usr/local/etc/awstats": No such file
or directory - Did you use the correct URL ? Example:
http://localhost/awstats/awstats.pl?config=mysite Example:
http://127.0.0.1/cgi-bin/awstats.pl?config=mysite - Did you create your config file
'awstats.leoncreations.trap17.com.conf' ? If not, you can run "awstats_configu....
Three times I've tried using HTML Editor to edit my index.html page and the first 2 times it
instantly deleted all the page's coding and replaced it with the word "undefined". I noticed
the 3rd time after editing a page it gives the following message: QUOTE
%2fhome%2fjoshua%2fpublic_html/index.html File Saved
-------------------------------------------------------------------------------- open index.html
failed: Permission denied at cpanel.pl line 469 Carp::croak('open index.html failed: Permission
denied') called at /usr/local/cpanel/Cpanel/Fi....
I tried to access my web/ftp stats page and the error below was what I got. Error: Couldn't
open config file "awstats.microncyber.uni.cc.conf" nor "awstats.conf" after searching in path
".,/home/odomike/tmp/awstats/,/etc/opt/awstats,/etc/awstats,/etc,/usr/local/etc/awstats": No such
file or directory - Did you use the correct URL ? Example:
http://localhost/awstats/awstats.pl?config=mysite Example:
http://127.0.0.1/cgi-bin/awstats.pl?config=mysite - Did you create your config file
'awstats.microncyber.uni.cc.conf' ? If not, you can run "awstats_config....
i have just download d-22 shoutbox for my ipb forum, i flowed the instructions exactly and it
installed. but when i type something into the field and click shout nothing happens. i have
reinstalled it, gone to the d-scripting website and no-one can fix it but it does work because it is
here can anyone help??....
See, my toolbar is made up of 8 buttons. They are: Home | Lessons | Theory | Links Videos| Extras
| Forums | Feedback To make my website, I use adobe Dreamweaver CS3. if youve ever used it, youll
know that if you want to make an image a link, you need to click it and fill in the link box at the
bottom and then make the border 0. The annoying thing is, lets say I type in in the link box for
Home "index.html". Then, I take a look at lessons. Suddenly, that box is filled with index.html
too! So, I quickly change that box to lessons.html. But then (this is where the ....
Hello, I seem to be having a problem with my Cpanel. Try as I might, I just cannot get the cpanel to
load. I keep getting a page not found error. I'm using the same thing I've been using to
access it, sitename.trap17.com/cpanel.....
yeah i'm hosting a sit on her but i'm completely lost on how this stuff works can someone
tell me where i would put the html?? or just how i would go about making the site work with stuff
acutally on it.. please i'm in desparate need of help.....
I set up the custom error pages using CPanel, but they aren't working properly. I get the
standard error code. CODE The requested URL was not found on this server. Additionally, a 404
Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Plust that little bit on the end. Am I doing something wrong or is it something that needs to be
handled by an admin?....
I set up a several email accounts on Cpanel, and am trying to forward the mail from some of them to
a gmail address. So far nothing's been forwarded. Also, when composing email, I've noticed
the "receipt" function doesn't work. Any clues, anyone? On another note, I noticed Cpanel
reverted back to it's former state after a brief upgrade. What's the latest with Cpanel?
Several days later and still no response? /huh.gif" style="vertical-align:middle" emoid=":huh:"
border="0" alt="huh.gif" /> Mmkay, guess I'll pm admin directly.........
I am posting this because I believe there is a problem with my SMTP server (at Trap17.com). I have
been trying to send mail with PHP using the mail() function. Although PHP did not return any errors,
none of the mail was actually sent... I have enclosed a copy of 2 different codes I have tried to
use. Either I'm making a mistake with these codes or there js a problem with my SMTP server. If
there is a mistake with my code, please tell me what is wrong. Otherwise, maybean admin can look at
my SMTP server configuraton to make sure it works. CODE 1 CODE $email....
i had just registed myself on trap17 in the create a forum thingy and i cant get onto my site its
not letting me get onto the site or the control panel or the ftp, it just keeps saying PROBLEM
LOADING PAGE, please help me /sad.gif" style="vertical-align:middle" emoid=":(" border="0"
alt="sad.gif" />....
can anybidy help me. I have had a forum amde and I can;t access it??????? Contribute with quality.
You could have gave more information like which forum software, URL to your forum, what error
message and the exact nature of the issue, i.e. it shows this but not that...or not showing at all. ....
I have asked many mods this, and have been told no... i have asked an admin i never got an answer
ive asked in almost every PM report ive sent.... lol so here it is again "Is the Report Feature
Working?!?!?" i was told my one mod yes it was yet a few days ago i was told my 2 no... hmm
i cant get a straight answer *sigh*....
Well i tested by tryin to send myself a feedback and i receieved nothing in the mail about my
feedback...i have no clue how to figure this out...i checked in my preferences and put down the
right email address for myself im not sure wut else to do...do i have to get into any of the php
files?? help me out ive had this problem ever since i started hosting a long time ago....
Hi people! I just noticed that none of my php pages are working, they dont have any source so
arent sending anythnig to the browser which is strange as it seems like they are working on the
server because they are detecting if someone is logged in and redirecting accordingly but theres
just no soruce code and no page showing up. My HTML pages seem to be working ok but my site is
dependant on php /sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />
Any ideas to the problem or just the server being difficult like computers do? Thanks ps ....
I need help with my webhosting. Whenever I access http://portal.trap17.com , this comes up: QUOTE
Welcome to your Hosting Account! This site is currently Hosted at trap17.com If you are
seeing this message then it means that your site is up and your account is functioning properly.
Please see to it that you do the following steps before you continue :- 1. Login to your cpanel
by typing, http://yoursite.com/cpanel . 2. Enter the userID and Password. (check your PM at the
Forums or your requested post) 3. Change the Email address in your Cpanel. (u....
Hey all, i just got my hosting yesterday and tried to access my control panel but it doesnt work...
i get this -->Error: Domain Not Configured My domain is registered with bravenet and im
thinking maybe it wont allow me to use it through another host which is a real bummer! and the
only options i have for the domain is to set it to redirect which is of no help unless i had a
subdomain and pointed it to there.... :\ I guess this also explains why i cant login to the
ftp... Although i thought u should be able to use a domain name anywhere... :\ Any h....
Angelkiss.trap17.com isn't working, I uploaded all my stuff and its still not working. =/ I
uploaded my index and stuff /ph34r.gif" style="vertical-align:middle" emoid=":ph34r:" border="0"
alt="ph34r.gif" />....
hello again guys!, i was looking my cpanel and the ssl manager is suppose to give me a
protection i need for a cart or a directory but the problem is that i can not have a real ssl
enabled protection in my site...i have heard that it can be activated via an html page... any ideas
how could i set it up for free or if you have made it run?....
Hey.I have made a simple website http://pakdir.com this is in html.But its very difficult to
update the html pages.I want to convert it to php site.But i dont know about php language ... is
there any "PHP website builder" ?? is there anyway to build a php website without knowledge of php ,
with the help of some program ? for example there is a frontpage for html etc.Please tell me any
solution?....
Is there anything wrong with the server ?? i can not access my website ??i have hosting credits for
atleast 7.55 days ?+ so i think there shouldnt be any problem with it ? http://www.pakdir.com not
even control panel.It was working well some hours ago i think.but now its not opening.if some one
knows tell me please . thanks Oh my goodness.just after some minutes now its working.I didnt mean
to bother you guys but it was really problem.anyway you can lock or delete this topic.thanks....
Does anyone have a clue as to why my outgoing email isn't working with Outlook express? I can
get incoming mail, but I'm getting an error when I try to send email. I followed the
configuration instructions, but it still isn't working correctly. I get an error everytime.....
Yesterday I finally got my hosting. So I started to upload LDU, a website engine up onto my site.
After I got a few files on, I noticed that nothing was working. Then i got to
http://www.pyro.trap17.com I get a file that is currently uploaded into the folder public_html. Is
this supposed to happen? Now when i try to call up the website engine, i get a 404 error, Page nto
found. Now whats got me really confused is that I just uploaded the files for LDU into The main
directory (No slashes or any thing) using my FTP program. So I should be able to call it up using
http:....
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.