Viewing PHP source code...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Hebbs
Forum Commoner
Posts: 43
Joined: Mon Apr 22, 2002 9:34 pm
Location: Perth, Western Australia

Viewing PHP source code...

Post by Hebbs »

I am keen to secure my site as much as possible and have just been told there are somes holes in PHP which allow users to view the source code.

One of my main reasons for using PHP was to prevent this.

Can anyone shed any light on what some of these methods to view PHP source code are and any actions that I can take to lock my scripts down further?

Hebbs
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If your scripts have .inc extensions or any others that won't be parsed as PHP then your source code could be vunerable if users guess the names of your files. If you have all your files with .php extensions then all the code will be parsed before it gets to the browser and unless you're echoing all your code to the screen you should be ok.

Mac
Post Reply