Forum Moderators: coopster

Message Too Old, No Replies

security in php

i need help on just a few security questions

         

guzzi

3:40 pm on May 18, 2004 (gmt 0)

10+ Year Member



I'm doing ok for a newbie in php, but i just have a few questions as far as security goes. i am actually a java programmer, so from my experience with an object oriented language i would like to use encapsulation and other methods used in java with php for example i would like to make a php page that handles my database connection and has a whole lot of functions that i can call as i need them instead of re-coding the connection each time. i know that i can use 'require('****.php')' and 'include('xxx.php')' to get access to the code in xxx.php but can i extend and override the functions in xxx.php and is it safe to connect to a database in this way?
i also wanted to know if it more secure to put a php script in the same web page or to make a page that contains the script and another html page that uses a form to goto the the php page?
and finally i just want to know if anyone knows of any good reading material on the topic of intergrating java with php (except the php manual)
thanx in advance... this forum is the greatest discovery since sliced bread for me) ;)

Timotheos

4:01 pm on May 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi guzzi,

Take a look at this thread [webmasterworld.com] on security in the library. Lot's of good info.

Tim

guzzi

3:32 pm on May 20, 2004 (gmt 0)

10+ Year Member



thanx i'll check it out, i must have missed it when i was searching the forum

jatar_k

3:51 pm on May 20, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



also there is a whole chapter in the PHP documentation about PHP Security [ca.php.net]

henry0

11:30 am on May 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the thread ref by jatar_k
Nell said:
<<<
Use .php as your file extension and not .inc for included files. Someone can easily view the source of an .inc file but not the source of an included .php file.
>>>
I would like adding that for the same reason
I use .php for my includes
but to be not mistaking my includes with other files
I make a point to always name them
****x.inc.php

Henry