config.php update
continuous-integration/drone/push Build is passing Details

remotes/origin/mvc-implementation
Dorian HODIN 2 years ago
parent 2d58187d20
commit 7093e059de

@ -83,10 +83,5 @@ steps:
from_secret: db_user from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_INNODB_PASSWORD: CODEFIRST_CLIENTDRONE_ENV_INNODB_PASSWORD:
from_secret: db_password from_secret: db_password
commands:
- export DAFL_HOST = "hey"
# - export DAFL_DATABASE = CODEFIRST_CLIENTDRONE_ENV_INNODB_DATABASE
# - export DAFL_USER = CODEFIRST_CLIENTDRONE_ENV_INNODB_USER
# - export DAFL_PASSWORD = CODEFIRST_CLIENTDRONE_ENV_INNODB_PASSWORD
depends_on: [ php_script ] depends_on: [ php_script ]

@ -1,12 +1,13 @@
<?php <?php
$username="dafldev"; //Get the username $username=$_ENV("INNONDB_USER"); //Get the username
$host="89.83.53.34"; //Get the address IP of the hosting machine $host=$_ENV("INNONDB_HOST"); //Get the address IP of the hosting machine
$password="wrap"; //Get the password for the user selected $password=$_ENV("INNONDB_PASSWORD"); //Get the password for the user selected
$db_name="positiondaflmusic"; //Get the name of the database $db_name=$_ENV("INNONDB_DATABASE"); //Get the name of the database
try { //Try to connect to the database try { //Try to connect to the database
$connect = mysqli_connect($host, $username, $password, $db_name); //Connecting to database $connect = mysqli_connect($host, $username, $password, $db_name); //Connecting to database
}catch (mysqli_sql_exception){ //If the connection failed }catch (mysqli_sql_exception){ //If the connection failed
print(json_encode("Failed to connect to MySQL, connection timeout")); //Return a json string, so the dart script can interpret the error print(json_encode($host,$username,$password));
// print(json_encode("Failed to connect to MySQL, connection timeout")); //Return a json string, so the dart script can interpret the error
exit(-1); //Send a return code as -1, so insert.php can know if the connection is successful exit(-1); //Send a return code as -1, so insert.php can know if the connection is successful
} }

Loading…
Cancel
Save