I wrote a PHP web application using SQLite and sessions stored in filesystem .
It is functionally thin and attractively low maintenance. But now it should run on a shared host.
All web applications on the shared host work as the same user, so my user session data is vulnerable, like the database, code, etc.
In this situation, many recommend storing sessions in DBMS , such as MySQL . So at first I thought I would just do it, and move the SQLite data to MySQL too. But then I realized that the MySQL credentials must be read by the user of the web application, so I will go back to the square.
I think the best solution is to use PHP as CGI so that it works as a separate user for each web application. This sounds great, but my host does not, it uses mod_php . Are there any flaws from the administrator's point of view to include this? (performance, backward compatibility, etc.)? If not, I will ask them to enable this.
Otherwise, can I do something to protect my database and session data in this situation?
security php apache session shared-hosting
dexx0r
source share