Hello,
I use a PHP script to connect to a PostgreSQL data base server. This script is a really complicated app with a login system. It have a general data base with configuration values and a table for the users. But the important content is in other data base which depends on the user. This user is in fact a PostgreSQL user and the login system collect the user name and the password to establish the connection to the proper data base.
Anyway, there are two connections from two different users at the same time. One of them is predetermined in a configuration file with a password to connect to the "general" data base. The other is collected by the login form.
So each time the script is executed, it needs the user name and password for both connections. The first couple (user and password) is always the same and is stored in the config file but the second couple changes for every user and for security reasons can't be stored anywhere.
It's not feasible to ask for the password every time a user carries out some task. Right now I use the PHP global array $_SESSION to store the user and password but these values are saved in a file in the server what means a security risk.
Any idea to solve this?
Thanks,
Javier.
I use a PHP script to connect to a PostgreSQL data base server. This script is a really complicated app with a login system. It have a general data base with configuration values and a table for the users. But the important content is in other data base which depends on the user. This user is in fact a PostgreSQL user and the login system collect the user name and the password to establish the connection to the proper data base.
Anyway, there are two connections from two different users at the same time. One of them is predetermined in a configuration file with a password to connect to the "general" data base. The other is collected by the login form.
So each time the script is executed, it needs the user name and password for both connections. The first couple (user and password) is always the same and is stored in the config file but the second couple changes for every user and for security reasons can't be stored anywhere.
It's not feasible to ask for the password every time a user carries out some task. Right now I use the PHP global array $_SESSION to store the user and password but these values are saved in a file in the server what means a security risk.
Any idea to solve this?
Thanks,
Javier.