Connection problems with shared hosting
Hello and good day!
I am having serious connection problems using a shared hosting site through godaddy.com.
On my local machine all my mysql pages work well through wamp server. When uploaded to the server the first time I recieved this error:
Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/e/x/o/exoticjohnny/html/Connections/exoticintimacies.php on line 9
Fatal error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/e/x/o/exoticjohnny/html/Connections/exoticintimacies.php on line 9
my connection.php page looked as follows: (this is the code that worked on my localhost perfect?)
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_exoticintimacies = "localhost";
$database_exoticintimacies = "exoticintimacies";
$username_exoticintimacies = "exoticintimacies";
$password_exoticintimacies = "mypassword";
$exoticintimacies = mysql_pconnect($hostname_exoticintimacies, $username_exoticintimacies, $password_exoticintimacies) or trigger_error(mysql_error(),E_USER_ERROR);
?>
So upon researching the php code guide I found '/var/lib/mysql/mysql.sock' and plugged it in as follows $exoticintimacies = '/var/lib/mysql/mysql.sock' ($hostname_exoticintimacies, $username_exoticintimacies, $password_exoticintimacies) or trigger_error(mysql_error(),E_USER_ERROR);
?>
Upon uploading I recieved a parse error "(" so I took off the end only leaving '/var/lib/mysql/mysql.sock' and the index page worked but when going to pages with ecart objects it displays this error:
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/content/e/x/o/exoticjohnny/html/product_6611.php on line 9
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/e/x/o/exoticjohnny/html/product_6611.php on line 11
the code on my page looks as follows:
<?php
//WA eCart Include
require_once("WA_eCart/exoticcart_PHP.php");
?><?php require_once('Connections/exoticintimacies.php'); ?>
<?php
$exoticcart->GetContent();
?>
<?php
mysql_select_db($database_exoticintimacies, $exoticintimacies);
$query_Recordset1 = "SELECT * FROM accessories_1";
$Recordset1 = mysql_query($query_Recordset1, $exoticintimacies) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><?php
Please help
Thanks