Help Needed Urgently....Regular Expression Encryption in PHP

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

Locked
parag
Forum Newbie
Posts: 6
Joined: Mon Jul 25, 2005 6:37 am
Location: Pune
Contact:

Help Needed Urgently....Regular Expression Encryption in PHP

Post by parag »

Hello Everybody,

I am working on Project which is having requirement of Encryption(because it will contain some confendential information i.e. database server's username and password and also some important information of file which should be PHP Compactible i.e. PHP compliler should understand the file and should execute it so that when user sees the code but should not understand the code Also when it is executed i.e. given request in the browser it should execute that file.

I have also tried for some encryption softwares to encrypt file it encrypts file but it will require some folder also at remote m/c. or server to decrypt the file. So it is not flexible to give user entire folder. It is also not safe from security point of view.

I have come across the file which is having some regular expression used for encryption but when it is executed i.e. given request in the browser. It executes the file.

I am also attaching the sample file with this mail. Please check file.

Regards,

Parag Bhavsar
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Why is having the database credentials hardcoded a security threat. No one will have access to the script as PHP is parsed and only html is returned. Not exactly sure on how your system is setup, but you could just include a file containing all db credentials outside of the webfolder so no one will be able to access the file unless done through php include -- therefor remain hidden from people looking at php source code if they were some how able to get their hands on.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Locked - Don't cross post!

You posted it the identical thread in regex too :evil:
Locked