Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: alm7100 on April 10, 2008, 05:04:43 PM
-
Hi I have problems getting PHP to connecte with the mysql database.
I Know that my script works 100%
Btw its the same when i trye to install joomla, it cat connect to the database at all.
I have install phpmyadmin and can connect with admin and password that works..
Some that can give/show the right the way to me.
Using sme 7.3
-
Hmm its looklike its Session that dosent works???????
-
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
-
Hi I have problems getting PHP to connecte with the mysql database.
I Know that my script works 100%
If they did, there would not be any posting here, would it ?
If anybody should come up with some idea why a script is not working, or connectiong to the data base, it might be a idea to post some parts of the script here, so it could be tested.
-
Hi Arne
No that right sorry
Here is the line thats fail..
$connect = @mysql_connect($_SESSION['MYSQL_SERVER'],$_SESSION['MYSQL_LOGIN'],$_SESSION['MYSQL_PASS']) or die('1000.');
Its has ben used and works on my wampserver (on windows)
The database and everything is like on the wampserver...
i have tryed to insert the date harcore (repleast $_SESSION['MYSQL_SERVER'] and the others with the data)
Sorry for my english :-)
Iam danish ss
-
alm7100,
not very useful that code snippet you've posted.
Just a thought: Are you aware that the mysql daemon on SME by default is listening on a socket and not on a port?
-
alm7100
this has always worked for me;
<?
$linkID = mysql_connect ("localhost", "user", "password");
mysql_select_db ("dbname", $linkID);
?>
Thanks for spotting the brain fart :D mweinber
-
$linkID = mysql_connect ("localhost", "dbname", "password");
I guess you have meant
$linkID = mysql_connect ("localhost", "user", "password");
-
How it works here:
$Link = mysql_connect ($Host, $User, $Password);
mysql_db_query ($DBName, $Query, $Link)