Displaying folder contents

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
AndyF
Posts: 10
Joined: Thu Jun 07, 2012 3:55 pm

Displaying folder contents

Post by AndyF »

Script URL: www.thefletchers.co.uk/guestbook
Version of script: 1.7
Hosting company: 1and1
URL of phpinfo.php: www.thefletchers.co.uk/guestbook/phpinfo.php
URL of session_test.php: www.thefletchers.co.uk/guestbook/session_test.php
What terms did you try when SEARCHING for a solution: Read through each post and trawled Google

Write your message below:
The guestbook works fine, but I have noticed that users could directly type in the address of the (for example) banned_ip.txt, or entries.txt

Is there a way within the program that I can prevent the listing of these ?
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: Displaying folder contents

Post by Henrie »

For the file entries.txt you can edit the settings.php file. Change the entries.txt entry in the following part

Code: Select all

/* Name of the file where guestbook entries will be stored */
$settings['logfile']='entries.txt';
Also change the name of the file on your server to the same name.

For the banned_ip.txt file there is no such setting. But I think it is not important to hide it as it contains no possible private information.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Post Reply