- In a scaled OpenShift Online application, the mysql database cannot be accessed through php. The following code is used:
$dbhost = getenv("OPENSHIFT_MYSQL_DB_HOST"); $dbuser = getenv("OPENSHIFT_MYSQL_DB_USERNAME"); $dbpwd = getenv("OPENSHIFT_MYSQL_DB_PASSWORD"); $connection = mysql_connect($dbhost, $dbuser, $dbpwd);
- OpenShift Online
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.