Abrar Posted August 26, 2021 Share Posted August 26, 2021 Hi Friends, I have developed an API for a client and Could you please help me secure database connection as i don't want to hard code any credentials in the PHP script. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/313607-how-to-securely-connect-to-oracle-database/ Share on other sites More sharing options...
gw1500se Posted August 26, 2021 Share Posted August 26, 2021 Place your credentials in a file outside of DocRoot and read that file from the PHP connection script. Make sure you set permissions so only the user running httpd (usually 'apache' on Linux) can access that file. 1 Quote Link to comment https://forums.phpfreaks.com/topic/313607-how-to-securely-connect-to-oracle-database/#findComment-1589390 Share on other sites More sharing options...
Abrar Posted September 1, 2021 Author Share Posted September 1, 2021 HI, gw1500se, Thank you so much for the reply! I understood but to make it little more clear, can you help me with some examples since i am newbie to PHP. Thank you so much Quote Link to comment https://forums.phpfreaks.com/topic/313607-how-to-securely-connect-to-oracle-database/#findComment-1589546 Share on other sites More sharing options...
gw1500se Posted September 1, 2021 Share Posted September 1, 2021 readfile Quote Link to comment https://forums.phpfreaks.com/topic/313607-how-to-securely-connect-to-oracle-database/#findComment-1589552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.