http_server_vars ???
| From: | John King | Date: | Tue, 11 Dec 2001 02:02:36 +0000 |
| Subject: | http_server_vars ??? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14915@lists.php.net to get a copy of this message | ||
Trying to run a php script that involves a MySQL DB. Script needs to
reference these variables:
$HTTP_SERVER_VARS['SQL_HOST']
$HTTP_SERVER_VARS['SQL_USER']
$HTTP_SERVER_VARS['SQL_PASS']
$HTTP_SERVER_VARS['SQL_DB']
Are the above PHP variables from the server or just variables from a
function? The script instructions state that if these are not set up for
your domain, you will need to edit lines xx, xx of the _security.php file to
fit your setup.
Here is the relevant code from the _security.php file
// create a class instance so we can use it
$sql=new mysql_class($SQL_USER,$SQL_PASS,
$SQL_HOST);
if($HTTP_SERVER_VARS['SQL_DB'])
$sql->SelectDB($HTTP_SERVER_VARS['SQL_DB']);
else
// This line may need to be edited if SQL_DB is not defined by the
server
// to point to the correct database.
$sql->SelectDB('irrrb_org');
Thanks,
John