Jump to content

borfast

Members
  • Posts

    3,271
  • Joined

  • Last visited

Everything posted by borfast

  1. Glad you got it working! Thumbs Up
  2. Well, try commenting out the whole code and add a line that outputs something. Like this: ><? error_reporting(E_ALL); // This stays here so we're sure PHP tells us about everything echo "this is inside PHP code, before everything else."; /*$connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error()); $database = @mysql_db_select($connection, database) or die(mysql_error()); $amt = @mysql_query($connection, "SELECT * FROM sites") or die(mysql_error()); $amt1 = @mysql_num_rows($amt); $banner = rand(1, $amt1); $sql = "SELECT * FROM sites LIMIT $banner,1"; $result = @mysql_query($connection, $sql) or die(mysql_error()); $row = @mysql_fetch_array($result); $link = $row[url]; $img = $row[pic]; $out_put = "<a href=\"http://lonelydreamer.com/?page=home\"><img src=\"images/banner_top.gif\" border=0></a><br>\n"; $out_put .= "<a href=\"http://$link\"><img src=\"banners/$img\" border=0></a><br>\n"; $out_put .= "<a href=\"http://lonelydreamer.com/?page=join\"><img src=\"images/banner_bottom.gif\" border=0></a><br>\n"; print $out_put;*/ echo "this is inside PHP code, after everything else."; ?> asdfds This code block should work and you can work it out from here. Uncomment one line from the top and see if it still outputs both lines. Next uncomment the next line (so you'll have the two first lines of the script uncommented) and try again. ><? error_reporting(E_ALL); // This stays here so we're sure PHP tells us about everything echo "this is inside PHP code, before everything else."; $connection = @mysql_connect("localhost", "user", "pass") or die(mysql_error()); $database = @mysql_db_select($connection, database) or die(mysql_error()); /*$amt = @mysql_query($connection, "SELECT * FROM sites") or die(mysql_error()); $amt1 = @mysql_num_rows($amt); $banner = rand(1, $amt1); $sql = "SELECT * FROM sites LIMIT $banner,1"; $result = @mysql_query($connection, $sql) or die(mysql_error()); $row = @mysql_fetch_array($result); $link = $row[url]; $img = $row[pic]; $out_put = "<a href=\"http://lonelydreamer.com/?page=home\"><img src=\"images/banner_top.gif\" border=0></a><br>\n"; $out_put .= "<a href=\"http://$link\"><img src=\"banners/$img\" border=0></a><br>\n"; $out_put .= "<a href=\"http://lonelydreamer.com/?page=join\"><img src=\"images/banner_bottom.gif\" border=0></a><br>\n"; print $out_put;*/ echo "this is inside PHP code, after everything else."; ?> asdfds When it stops outputting one (or both) of the lines, you'll know you found the line that's getting you into trouble.
  3. Try putting this as the first line of your script: error_reporting(E_ALL); Then run the script again and see if it outputs some warning or error.
  4. Glad you joined us TCH is indeed a great place, not only a web hosting company. Everybody helps each other here in the family forums, the support is outstanding, the uptime speaks for itself, the account features are great... Rock Sign
  5. What's the error you're getting?
  6. borfast

    Div Tags

    Yep, that's it
  7. Yes, I forgot to mention the fact that users are not allowed to use the compiler, thanks Mike And yes, I agree that for web development, unless you're hosting your site in a dedicated server, it's better to use those languages
  8. Humm... I had that in my post (about adding the px) but it's not there, now... Maybe I accidentally deleted it when I edited the post
  9. borfast

    Div Tags

    If you use div#blahblah, that style will only be applied to <div> tags with the id "blahblah" but if you use #blahblah, that style will be applied to any tag that has the id "blahblah" - although theoretically that wouldn't happen, because an id should be unique, meaning you shouldn't have two elements with the same id in the same page.
  10. Kasey, C and C++ can be used as web development languages Actually, any language can be used for web development, as long as there's a way to make it interact with the web server. I don't know if TCH's servers are setup to allow C/C++ to run as CGI but it's just a matter of trying it out. I don't know how to write a program to interact with the webserver though. I've used C/C++ for quite a few years but never for web development (I prefer PHP, without any doubt), so I don't know if you need to use some special functions or something like that. But this page seems to explain it well enough: http://hjs.geol.uib.no/cplusplus/ Other than that, this Google search about "C++ CGI" has some more URLs. Hope this helps
  11. Also, I suggest you add quotes to the value of the id attribute, in order to make the code standards compliant
  12. I think I prefer Photoshop but then again, the last Fireworks version I used was 4 and I know it has evolved quite a bit since then, so I'm not sure of which one I'd chose, now. Perhaps I'd still stay with Photoshop because with it I can do web graphics and photo editing and I don't think Fireworks is as good as Photoshop for photo editing. But who am I to say such things, I haven't used Photoshop or Fireworks for quite a long time, since I now use Linux as my main operating system By the way, I'm moving this to a more appropriate forum, for better organization
  13. I do not know the answer to your question, Dan but I'll move your message to the appropriate forum, for better exposure.
  14. Or try that new adaware thing version. I never used it but thomas (I think) said there's a new version out and it's pretty good. http://www.totalchoicehosting.com/forums/i...howtopic=12112& PS - It was not thomas, it was youneverknow.
  15. Yes, it is but if you can grasp the "meaning" of all that... I think it's... beautifull
  16. Typo3 will work but they recommend you set PHP memory_limit to 16 MB just in case you run a very popular website. It should work just fine with only 8MB, give it a try and let us know how it behaves
  17. Sorry I didn't see this earlier but yes, that is the solution. Since TCH only allows you to send e-mail from it's SMTP servers after you identify yourself, you'll have to use authentication. Glad you worked it out
  18. Well, let's go through your questions one at a time: 1 - E-mail traffic depends on where your files are stored and accessed. In the situation I suggested (hosting only a small file at TCH, which redirects visitors to the "real" site on your other account), the only bandwidth used will be for the transfer of that small file. All the remaining files of your site will be transfered from the other server where your site is located, so the bandwidth used will be from that server, not TCH's. With the lowest account offering 10GB of monthly transfers, you have more than enough to do that. 2 - Revealing your username is dangerous because from the moment someone knows the domain name of your TCH account, they can try to access your account control panel and brute force their way in, by guessing your password. If they don't know your username, they'd have to guess both the username and the password, which is a lot harder (I'd say impossible). This also applies to accounts outside TCH. Say you ave an account on Geocities, which provides URLs for its users in the form of "geocities.com/userid" (I'm not sure if this is the case but it serves as an example). From that URL anyone knows what your username is and they can try to brute-force the login at the geocities servers. If they'd use an identifier other than the userid for the URL, an attacker could not try to login using that code, because it wouldn't be recognized as a valid userid. The ~userid format is in fact the standard way to refer to user accounts which have no domain name associated and that's what happens here at TCH, too. But I recommend you to have a domain name instead of exposing your username like that, for the reasons I mentioned above. 3 - Usually, what happens during a domain transfer is that the "receiving" registrar will contact the "losing" registrar and ask them to release the domain to them. The releasing registrar will then proceed to ask their client if the release request is legitimate and if the client responds affirmatively, the two registrars will then proceed to transfer the domain control. So yes, TCH will contact Network Solutions and all you'll have to do is confirm that you want to transfer the domain. If you need to know anything else, just ask
  19. I'm supposing you mean the Operations tab of phpMyAdmin, am I right? That does order things permanently on the table but only the rows that are already inserted. If you insert new rows, you'll have to do that again. If that's not a problem, for example, if you won't ever need to change the data in that table, then you're OK. But I think you should try to get that ORDER statement to work, just in case. Have you changed the name of the column you want it to order the results by?
  20. Hi Wayne. HTML does not provide a way to sort those menu entries, it will always display them in the same order as they appear in the HTML code. Your only choice is to order those entries in the SQL query itself. Try something like this: SELECT * FROM table_name ORDER BY name ASC This will return the results sorted by the 'name' column, with ASCending order. If you want it to have descending order, use DESC instead of ASC Also, instead of 'name' you should use the column name that contains the menu entries' text that you want to be sorted. Hope that helps
  21. LOL @ Rob Thanks for finding that, Rob And thanks for posting it in the first place, Mike
  22. Rob, the difference between ".:" and ".;" is that the first is the Unix syntax and the second is the Windows syntax As for using the current include_path in .htaccess, I'm convinced it is not possible. It is possible to set it, as we have seen in lots of examples, but I haven't been able to find one single reference about how to refer to PHP's include_path from within a .htaccess file so that it can be appended to instead of replaced About the performance question, the quick answer is: there's no difference There may be a little tiny winy bit more processing needed by the common include method, because it's a PHP file and it needs to be processed by PHP but on the other hand, .htaccess also has to be parsed by Apache but even so, it's reallt not important. I don't even think it's noticeable, so don't worry about it
  23. Yes, ini_set will only change that configuration setting for the duration of the script. I'm not sure if you can reference PHP's include_path in a .htaccess file but I'll check it out. In the meanwhile, why don't you simply create a file called, for instance, "include_paths.php" with the following content ><?php $include_path = ini_get("include_path"); $include_path .= ".:/home/mysite/public_html/test/core:/home/mysite/public_html/test/site:/home/mysite/public_html/test/_lib/_base:/home/mysite/public_html/test/_lib/_classes"; ini_set("include_path", $include_path); ?> and include("include_paths.php") it in every PHP script that needs access to the include path?
  24. Well, if you do have the time and patience, then Typo 3 can indeed be a very rewarding system I hope you manage to get everything up and running like you want it to
  25. I just finished watching American Beauty for the second time. I think it's a really great movie! If you haven't watched it, go to the nearest video store and rent it.
×
×
  • Create New...