Jump to content

txmedic03

Members
  • Posts

    313
  • Joined

  • Last visited

Everything posted by txmedic03

  1. Do not specify an IP address. If you put it as Listen 80 then your httpd (That's hyper text transfer protocol daemon or in other words Apache) will bind to all IP addresses related to that system on port 80. This means that it will listen on 127.0.0.1 at port 80 for incoming http requests and 192.168.254.1 at port 80. The 192.168.254.1 is your system's IP address on the local network and 127.0.0.1 is a loop back address which is only viewable from the local computer (this is aliased as "localhost"). Requests will come in across your DSL/Cable modem through your router (this may be built into your modem) which more than likely has a dhcp which assigned the 192.168.254.1 IP address to your system your router will forward traffic from the public IP address given to it by the ISPs dhcp through the modem on port 80 to your system on port 80 assuming you have configured it all correctly. It depends on the router and how it is configured as to what your IP address will be. Some routers give a 192.168.xxx.xxx by default and allow you to forward specific ports. The built in router on my modem uses 10.0.xxx.xxx and allows forwarding of ports or to simply DMZ (DeMilitarized Zone) a system on my local network which then inherits the public IP address. I would no recommend DMZing if available on your router, but that is just my humble opinion on the matter. I personally like my linksys router with port forwarding. :-) I hope that this helps you to at least understand IP addresses a little bit better and your httpd listen directive. Fix your configuration and then let's focus back on the problem at hand.
  2. Store them in a MySQL database. :-) Then you never have to reveal a path to anyone so they could download the file anytime they want. A simple database of files with your page using header for content type and returning the file by unique identifier from the database would do fine.
  3. Learn something new everyday. :-)
  4. It looks nice. Should double check all the grammar.
  5. Actually it has nothing to do with the browser, but PHP is only processed with an interpreter. Dreamweaver does not have an interpreter. You can configure your local system to execute php scripts via the php interpreter or via a httpd, which employs the php interpreter to process the script before passing it to the client that generated the request (generally a web browser).
  6. I agree with keeB, but I would suggest not revealing the actual adress of the files to your end-users. To pass the file by including the file and using a header statement to tell the browser what type. That way they can't actually see where to get the files. If they can get the address of your files then they don't have to use your page and then they bypass your download limiter. It's just a thought.
  7. Variables inside of single quotes are not processed properly as far as I am aware. "SELECT * FROM `table` WHERE `column_name` ='".$variable."'"
  8. There should be a default line in httpd.conf that says "Listen 80". If you changed it, change it back and try again.
  9. I am sorry I have not responded in so long, but I have been extremely busy the last few days. I will try to get the rest posted tomorrow morning. If not then, hopefully tomorrow evening. I have meeting with a client tomorrow afternoon.
  10. I would talk to my host about this or find a better host. They are not the sharpest oranges in the toaster.
  11. Place them in the url of the iframe if you absolutely insist on using iframes. They are a serious design faux pas.
  12. [a href=\"http://www.hotscripts.com/PHP/Scripts_and_Programs/\" target=\"_blank\"]Hotscripts.com[/a] should have everything you need.
  13. [code]<?   $username = $_POST['assoc'];   $name = $user[$username];   echo $name; ?>[/code] Over use of quotes where not needed and if I'm not mistaken the single quotes don't process variables inside of them. If you would like a more indepth explanation, let me know.
  14. Yes. You could enter it into the table as a text field instead of a date field and submit it in the format you wish it to display or you could change it once you retrieve it from the database. [code]<?php $date = "2001-01-05"; echo date('M d, Y', strtotime($date)); ?>[/code] I don't know what your variable name is that gets the date from your database, so just replace $date in the echo line with your date variable name and change the echo to whatever it is you need to do with it.
  15. If you check the date on the directory, I don't think that adding files to the directory counts...I could be mistaken as I have never worked with that function in PHP before. I never had a use for it myself. I would check the functions for last modified on files/directories to find the one that fits your need.
  16. I would suggest creating a temporary table from the "holding page" that has all of the information you want then redirecting to the list page which will simply list all the results stored in the temporary table and remove that table. This is the cleanest way I can think to do what you are asking. There are probably a lot of ways, but this is the best one I can think of at the moment. The problem with the logic behind it...people will still think that it must have malfunctioned after a certain amount of time even if it says, "Searching the database...". People don't like to wait so your best bet is to redesign the table or your search method to optimize load time. If you use AJAX or something like that to return the results in place of the "hold page" once they are ready it would be a lot better since it would not have a redirect in between showing the "hold page" and the results. I do like the idea, but load time is going to be your enemy no matter what you do. If it runs too long people generally are not going to wait.
  17. If they are getting a 404 (File Not Found) error then my first thoughts would be to check and make sure my router had port 80 (this is the default httpd port) open and directed to my server computer. Then if no one could access the server still I would check to see that my server was listening to port 80 for httpd requests on all IP addresses and not just my loopback or LAN address. This is, of course, where I start because you already stated the server works from your machine. That would be where I would start anyway. Let us know if that does not solve the problem so someone can come up with some more ideas.
  18. I would check the configuration and see how authorization is setup. I have never used Postgres, but that is just what springs to mind for that particular error. (I use MySQL.)
  19. Never ever hide errors. That is a very big mistake. Fix your errors because if all you do is hide them sure no one sees errors, but the code does not give the desired results either. Hiding notices is fine, but never hide errors. Even if your code still seems to work fine, when you post it to another server which still reports errors your users are going to see errors.
  20. txmedic03

    wierd

    Again, relative paths NOT URLs. It does not process them the same.
  21. I was just saying that instead of writing all the code as "[code=php:0] ~ [/code]", "<?php ~ ?>" becomes "&lt;php ~ ?&gt;", but if you are already using the bbcode stuff anyway no harm doing it that way either. The only thing I can think of is [code]substr($code, strpos($code, "[php]"), strpos($code, "[/php]")+6);[/code] That will work for $code where [code=php:0][/code] only occurs once, and you will need to retrieve the html before and after in a similar manner, but if [code=php:0] occurs more than once you would need a loop to run through them and retrieve all the html between them. Just a thought, let me know if you come up with something better.
  22. txmedic03

    wierd

    Now if he is looking for the server (his computer) from his computer and he uses the loopback address which points to his computer. Gee, why do you suppose that would not work? Could it be because the include statement looks at relative paths not fully qualified URLs? He wasn't trying to reference an image in any way, he was trying to do an include(). DNS has nothing to do with the server, but everything to do with the request the browser sends to the name server. If you want to be a jerk about something when someone explains something you seem to not understand, then go waste someone else's time.
  23. Not if you plan on counting the number of clicks...You must at the very least have a user id of some kind and click counter. I would suggest using sessions to disallow multiple clicks.
  24. txmedic03

    wierd

    just to clarify, hitman6003, the host name is based on the IP so 127.0.0.1 (the loop back address) references the local system and will work perfectly fine. If you check your hosts configuration "localhost" points to 127.0.0.1. Use either one they are one and the same. When you type in a domain name, such as google.com, your request is routed to a name server which in turn redirects you to the IP address of the server. Essentially, a domain name is an alias to the IP address that is easier to remember, but without a DNS you would be completely lost. Glad to hear everything is working, saiko.
  25. You don't need the bb code stuff, but you could pull out the php code highlight it and echo all the html before and after it after doing htmlentities to it. I'm sure someone else might have a better idea, but just off the top of my head...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.