seamusmacspud Posted August 31, 2009 Share Posted August 31, 2009 Folks, need a bit of help/guidance ! i have created a php script that allows me to display concurrent requests running in an ORacle 11i environment. Within script I create a variable called 'appspassword' and use a system call to grep password from an OS file. I then pass this variable to a OCI logon and it executes my sql fine. My issue is that the $appspassword is displayed on the webpage which is not want I want. how can I set avariable like appspassword and not have it showning on page ? here is my code snippet <?php $appspassword = system("grep -m 1 password /u01/PROD1/prod1ora/iAS/Apache/modplsql/cfg/wdbsvr.app |awk '{ print $3 }'"); $connection = OCILogon("apps", "$appspassword" , "PROD"); help greatly appreciated Quote Link to comment https://forums.phpfreaks.com/topic/172550-grep-password-from-os-file-showing-up-in-php-script/ Share on other sites More sharing options...
trq Posted August 31, 2009 Share Posted August 31, 2009 Use exec() instead of system. Quote Link to comment https://forums.phpfreaks.com/topic/172550-grep-password-from-os-file-showing-up-in-php-script/#findComment-909615 Share on other sites More sharing options...
seamusmacspud Posted August 31, 2009 Author Share Posted August 31, 2009 Use exec() instead of system. Legend, thanks thorpe.I dont know php very well but that did what i was looking for...thansk again Quote Link to comment https://forums.phpfreaks.com/topic/172550-grep-password-from-os-file-showing-up-in-php-script/#findComment-909676 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.