Re: Re: Counter problems!
| From: | J Veenhuijsen | Date: | Thu, 30 Jan 2003 14:08:40 +0000 |
| Subject: | Re: Re: Counter problems! | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-18231@lists.php.net to get a copy of this message | ||
I only set full rights on the counter.txt file (windows system)
I dont know if it works the same way on other OS'es
Full rightn the docroot means browser can open the file as Http://url/counter.txt This is prevented by placing couter.txt
outside the docroot.
Or am I wrong here?
Jochem
Jill Ramonsky wrote:
Yes, Jochem's right. One thing though, Radovan. If your script WRITES TO the file "counter.txt" then I assume that script's directory must give write permission to the whole world. That is a very dangerous thing to do. There would be nothing to stop a hacker from saving arbitrary binary (or PHP) code in that directory, and hence doing ANYTHING to your server. A more secure counter could be stored in a mysql database. Jill -----Original Message----- From: J Veenhuijsen [mailto:info@solid-digital.nl] Sent: Thursday, January 30, 2003 1:45 PM To: php-windows@lists.php.net Subject: [PHP-WIN] Re: Counter problems! I tested that and the counter does not increase when i hit the refresh button or press enter in the adressbar. It only increases when i quit the explorer and reopen the same link afterwards. Which is ofcourse a new visit because the session is distroyed when closing the browser. Jochem Radovan Radic wrote:Yes, but what if you refresh the page? Or type in the address bar index.php and press enter, i think it will be increased?