I'm very new to openshift and these git, ssh programming. I developed this much so far. Installed PHP 5.3, MySQL 5.5, phpMyAdmin 4.0 Cartridges
This is my dbcon file in php. Basically i need to connect my php application with openshift mysql db. Here's what i did.
<?php
// Database Connection Setting
$dbhost = "127.0.0.1"; // Host name
$dbport = "3308"; // Host port
$dbusername = "user"; // Mysql username
$dbpassword = "pass"; // Mysql password
$db_name = "mf"; // Database name
$mysqlCon = mysqli_connect($dbhost, $dbusername, $dbpassword, "", $dbport) or die("Error: " . mysqli_error($mysqlCon));
mysqli_select_db($mysqlCon, $db_name) or die("Error: " . mysqli_error($mysqlCon));
?>
This gives me an error on openshift but works for other php apps. I get nothing on error explanation only as Error: { ...blank space... }.
can you help me out guys?
Or better still, just use the environment variables in your connection string:
Thanks alot for your efforts guys. No visual error thrown before. but I've made it to work by doing this.
**
Global Use
**
**
Alternatively
**