So I tried to export our working joomla site to my localhost(WAMP). The php version that wamp(localhost/my pc) uses is php 5.5.12. Our joomla website uses joomla 1.5.26 and php 5.2.9. I created localhost database and import the sql files there. My database name at my localhost is the same with our database name of our website.
I change the configuration to this:
Code: Select all
var $host = 'localhost';
var $user = 'root';
var $db = 'db_name';
Code: Select all
$db_host="localhost";
$db_name="db_name";
$username="root";
$pw="";
$db_con=mysql_connect($db_host,$username);
$connection_string=mysql_select_db($db_name);
mysql_connect($db_host,$username) or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db($db_name);
$sql2="SELECT * FROM jos_fabrik_groups ";
$result2=mysql_query($sql2);
while($row2=mysql_fetch_array($result2))
{
echo "a";
}
My export process is I use ftp to transfer my website files to localhost.Using phpmyadmin on my cpanel, I export the sql files. I then import the sql files to my localhost mysql using mysql command.