View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Connection problems with shared hosting

Thread began 12/14/2009 11:16 am by johnnysinbox396218 | Last modified 12/14/2009 5:44 pm by johnnysinbox396218 | 516 views | 1 replies


Connection problems with shared hosting

Hello and good day!

I am having serious connection problems using a shared hosting site through
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?)

# 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:

//WA eCart Include
?><?php require_once('Connections/exoticintimacies.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);

Please help

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...