Secure Password Handling, Server Side
Secure Password Handling, Server Side
Hello,
I am having trouble securely passing my database credentials to the serverside_processing.php script.
I tried to place the below into a file on my server outside the document and included it in my serverside_processing.php script:
$gaSql['user'] = "username";
$gaSql['password'] = "mypassword";
$gaSql['db'] = "db_name";
$gaSql['server'] = "server_name";*/
However I cannot get my tables to load.
I noticed this line in Alan's original script: and was wondering what mysql.php should look like. Any help would be appreciated.
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
thanks,
Marina
I am having trouble securely passing my database credentials to the serverside_processing.php script.
I tried to place the below into a file on my server outside the document and included it in my serverside_processing.php script:
$gaSql['user'] = "username";
$gaSql['password'] = "mypassword";
$gaSql['db'] = "db_name";
$gaSql['server'] = "server_name";*/
However I cannot get my tables to load.
I noticed this line in Alan's original script: and was wondering what mysql.php should look like. Any help would be appreciated.
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
thanks,
Marina
This discussion has been closed.
Replies
if ( ! $gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) )
What is the error you are receiving?
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
die( 'Could not open connection to server' );
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
die( 'Could not select database '. $gaSql['db'] );
The error I get is the typical JSON error from the interface.
Should I be connecting like you posted? What does $gaSql['link'] mean?
thanks lots !