Forum Moderators: coopster
I have a task and have struggled with many hours of google browsing to find something I could use, but to no avail.
Here is my 'problem'.
I have sql configuration (username, password, host, prefix, etc.) in file1.php, and this file is included by file2.php... NOW, if someone managed to get a shell script or hacked into the website (Im using a cms) and they use a custom page - they could inlcude file1.php as well and grab my database configuration.
How can I avoid this?
I would like it for file1.php to be included only by file2.php because file2.php later on unsets these variables, making them inaccessible because their function has already been completed. So if they include file2.php they will not see the vars in which i have the database access configured... ;)
Is there something i can do!?
Thanks for your reply haamro, it helped me a lot!
My account files were mostly unharmed, and no edits were registered on the server. The times were all old... so they did not touch my files. However I would like to stay on the safe side because no one can assure if they grabbed my data, or if they infected other accounts on the server and could try that game again. This is where I am coming from with this question on this thread. Probably there could be other things i could do to stay safer... but if file1 is meant to be included ONLY by file2... I think there should be a way for it to STAY that way... wouldn't you guys agree!?