I want that PHP/Drupal reads configuration settings which are stored in my CSCFG file and in my cloud service instance respectively.
How do I read configuration data (DB credentials) in a PHP web role in azure? I need them to access my database.
I have my DB credentials in two places
- my azure account
- (possibly) in my cscfg file
In my PHP script I want to get this data, so that my CSPKG files don't need to contain credentials. Example:
$db_host = azure_getconfig("DbHost");
$db_user = azure_getconfig("DbUser");
$db_password = azure_getconfig("DbPassword");
Is there a standard way how to do this?
About php_azure.dll: The approach that is usually described did not work for me. The suggested php extension php_azure.dll seems to be abandonded as it is marked as obsolete. I tried to load the extensions in all it's flavors but didn't succeed ("Unable to load dynamic library 'D:\Program Files (x86)\PHP\v5.3\ext\php_azure.dll' - The specified module could not be found.", even though the file exists for sure at the right path.).
So I assume, I shouldn't use php_azure.dll anyway.
There is a similar but unanswered question here: How can I access ConfigurationSettings using a PHP Cloud Service on Windows Azure?