Hello all,
I completed a website (it was code by php) and putted it to AWS, I install fedora instance in EC2 with the base is php and mysql.
I putted all files of my website to folder /home/webuser/helloworld/htddocs and my database (mysql) to folder /var/lib/mysql/test ("test" is my database's name).
I connect to database by a php file that is successful and its code is:
<?php # mysql_connect.php
DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', 'ab2345');
DEFINE ('DB_HOST', 'root@localhost');
DEFINE ('DB_NAME', 'test');
# Connect to MYSQL
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MYSQL:' .mysql_error());
mysql_select_db (DB_NAME) OR die ('Could not select the database:' .mysql_error());
?>
I made query commands to my database in PuTTY succesful and had data at output
But when I make query commands to database in php files (code by php) then didn't output, it is nothing. I don't know why, I searched more it in Internet but I didn't still find, I hope you can help me.
Thanks,