This topic is locked

MYSQL Error using PHP script

3/3/2009 7:34:39 PM
PHPRunner General questions
D
dokus author

I wrote Nice Apllication with PHPRunner.

Tested it on Local server (WAMP).
So now I have a PHP file, called: smd_codes_list.php
I put it on the site in a subdir called: phprunner
Then I Made a Article in Joomla with the text:

{jumi [phprunner/smd_codes_list.php]}
When in front end opening this, i get:


So I looked in dbconnection.php but do not know what to change.
the first 23 lines are:

<?php
function db_connect()

{

global $host,$user,$pwd,$errstr,$sys_dbname,$port,$bSubqueriesSupported;

$strhost=$host;

if($port && $port!=3306)

$strhost=$strhost.":".$port;

$conn = mysql_connect($strhost,$user,$pwd);

if (!$conn || !mysql_select_db($sys_dbname,$conn))

{

trigger_error(mysql_error(), E_USER_ERROR);

}

$mysqlversion = "4";

$res = @mysql_query("SHOW VARIABLES LIKE 'version'",$conn);

if($row=@mysql_fetch_array($res,MYSQL_ASSOC))

$mysqlversion = $row["Value"];

if(substr($mysqlversion,0,1)<="4")

$bSubqueriesSupported=false;

return $conn;

}
function db_close($conn)
How can I get this PHP-script running?

Sergey Kornilov admin 3/3/2009

It appears that username/password are incorrect.
You can change it in include/dbcommon.php file.