troubleshooting Question

PHP socket warnings

Avatar of axtur
axtur asked on
PHP
11 Comments1 Solution386 ViewsLast Modified:
I'm getting these warnings on my server, however it works perfectly on my local machine with no warnings :(

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 201
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 201

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 202

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 201

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 201

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php on line 202

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/functions.php:201) in /mounted-storage/home43a/sub004/sc31952-BMDX/www/perfiles/viewVote.php on line 6

*************

This is the lin 202 of my functions.php file:

function getSetting($val)
{
      $sql="select * from settings where setting='$val'";
      $res=mysql_query($sql); //line 201
      while($obj=mysql_fetch_object($res)) //line 202
      {      
            return $obj->settingvalue;
      }
}
***************
viewvote.php

include("./inc/mysql.php"); //line 2
include("functions.php"); //line 3...

$db=new mysql();
session_start(); //line 6
$id=$_POST['photosid'];
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros