Question
PHP connections file comments ignored
I am trying to use the same connection file for local and
remote application access to MySQL db. I try to comment out the
settings I don't want to use; the server and user names are
different between the remote and local sites. But CS3 seems to
ignore the fact that some code is commented - if I look at the
settings for a db in the panel, it shows whichever group of
settings are set first. Here's an example:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
# set for localhost
#$hostname_example_conn = "localhost";
#$username_example_conn = "local user name";
#$password_example_conn = "local password";
# set for remote
$hostname_example_conn = "remoteserver.secureserver.net";
$username_example_conn = "remote user name";
$password_example_conn = "remote password";
$database_example_conn = "exampleDB";
$example_conn_dc = mysql_pconnect($hostname_example_conn_dc, $username_example_conn_dc, $password_example_conn_dc) or trigger_error(mysql_error(),E_USER_ERROR);
?>
The commented code shows up as such (i.e., orange) in code view, but if I double click the db in the CS3 panel, it will show the settings for the localhost entry, not the remote ones as I'd expect. If I upload this to the remote server, it seems to work.
Am I missing something here?
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
# set for localhost
#$hostname_example_conn = "localhost";
#$username_example_conn = "local user name";
#$password_example_conn = "local password";
# set for remote
$hostname_example_conn = "remoteserver.secureserver.net";
$username_example_conn = "remote user name";
$password_example_conn = "remote password";
$database_example_conn = "exampleDB";
$example_conn_dc = mysql_pconnect($hostname_example_conn_dc, $username_example_conn_dc, $password_example_conn_dc) or trigger_error(mysql_error(),E_USER_ERROR);
?>
The commented code shows up as such (i.e., orange) in code view, but if I double click the db in the CS3 panel, it will show the settings for the localhost entry, not the remote ones as I'd expect. If I upload this to the remote server, it seems to work.
Am I missing something here?
