Hi. I'm about to launch a site on the www.
Have wrote the intire site using ASP, VBScript and MAccessDB.
Have decided to revrite into PHP-pages and use a mySQL database because of better speed and stability.
I will have a lot of customers. And I would like to secure my code against hackers and that mean preventing hackers from beeing able to get hold of my database password and userid that I use when connecting visitors and my users.
So where should I put my connection statement. In every PHP page that connects or is there a way of setting a global variable in PHP somewhere and use this connection variable in all my PHP pages?
Whats the best solution here?
And what about security. Do I have to create a user with userid and password and grant rights to whatever table that visitors and customers use.. or maybe one userid and password for both my visitors (read only) and one userid and password for my customers (wich also allows for create, update and delete)......
Any suggestions?
And in the end...
What should I do to prevent hackers enter my mySQL database?
Is there anything I should/Could do to prevent someone to have read/look my PHP pages in general.
Okay I know that the script part of the PHP pages are not displayed in any way to the browsers... but what about hackers... Maybe there is easy for them..?? And maybe easy to prevent them.. without to much hassle.
I hosting my site on a linux platform.
Huhhh.. this was a lot ... I know...
Any comments appreciated
Tore
Have wrote the intire site using ASP, VBScript and MAccessDB.
Have decided to revrite into PHP-pages and use a mySQL database because of better speed and stability.
I will have a lot of customers. And I would like to secure my code against hackers and that mean preventing hackers from beeing able to get hold of my database password and userid that I use when connecting visitors and my users.
So where should I put my connection statement. In every PHP page that connects or is there a way of setting a global variable in PHP somewhere and use this connection variable in all my PHP pages?
Whats the best solution here?
And what about security. Do I have to create a user with userid and password and grant rights to whatever table that visitors and customers use.. or maybe one userid and password for both my visitors (read only) and one userid and password for my customers (wich also allows for create, update and delete)......
Any suggestions?
And in the end...
What should I do to prevent hackers enter my mySQL database?
Is there anything I should/Could do to prevent someone to have read/look my PHP pages in general.
Okay I know that the script part of the PHP pages are not displayed in any way to the browsers... but what about hackers... Maybe there is easy for them..?? And maybe easy to prevent them.. without to much hassle.
I hosting my site on a linux platform.
Huhhh.. this was a lot ... I know...
Any comments appreciated
Tore