The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error_log Issue

Discussion in 'General Discussion' started by khanbaba, Dec 9, 2012.

  1. khanbaba

    khanbaba Member

    Joined:
    Oct 12, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I can see the following errors logged in the error_log file, I can't really understand why they are generating, support insisting that its related to code.

    Below please find the error_log file content

    Code:
    [09-Dec-2012 15:49:12 Asia/Karachi] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/site/public_html/apps/includes/db_mysql.php on line 120
    [09-Dec-2012 15:49:12 Asia/Karachi] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/ads/ads.php on line 3
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/apps/jso-apps.php on line 2
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/apps/jso-apps.php on line 3
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: A link to the server could not be established in /home/site/public_html/apps/jso-apps.php on line 3
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/site/public_html/apps/jso-apps.php on line 9
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in /home/site/public_html/apps/jso-apps.php on line 9
    [09-Dec-2012 04:49:17 America/Chicago] PHP Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/site/public_html/apps/jso-apps.php on line 10
    
    
    
    In /home/site/public_html/ads/ads.php on line 3 we have the following coding

    PHP:
    $connection mysql_connect("localhost","dbuser","db");
    Please suggest why this is happening further more on my server /et/my.cnf has the following content in it:

    Code:
    [mysqld]
    connect_timeout=30
    query_cache_min_res_unit=2K
    query_cache_size=360M
    query_cache_limit = 8M
    max_allowed_packet=100M
    log-slow-queries="/var/log/slow.log"
    wait_timeout=40
    ;wait_timeout=9999
    ;connect_timeout=9999
    ;interactive-timeout=9999
    
    skip-external-locking
    ;interactive-timeout=15
    thread_cache_size=8
    thread_stack=8M
    max_user_connections=400
    ft_min_word_len=3
    datadir="/var/lib/mysql"
    long_query_time=2
    
    tmp_table_size=256M
    max_heap_table_size=256M
    innodb_buffer_pool_size=32M
    
    max_connections=600
    
    key_buffer_size=96M
    join_buffer_size=6M
    sort_buffer_size=4M
    read_rnd_buffer_size=4M
    read_buffer_size=4M
    
    socket="/var/lib/mysql/mysql.sock"
    thread_cache_size=16K
    table_cache=13K
    table_definition_cache=2048
    myisam_sort_buffer_size=16M
    innodb_file_per_table=1
    default-storage-engine=MyISAM
    open_files_limit=8192
    
    tmpdir=/var/lib/mysql/tmp/
    innodb_use_native_aio=0
    
    
    [isamchk]
    read_buffer=8M
    key_buffer=16M
    write_buffer=8M
    sort_buffer=16M
    
    [mysqlhotcopy]
    interactive-timeout=20
    local-infile=0
    
    [mysql]
    no-auto-rehash
    
    [myisamchk]
    read_buffer=8M
    key_buffer=16M
    write_buffer=8M
    sort_buffer=16M
    
    [safe_mysqld]
    ;err-log="/var/log/mysqld.log"
    open_files_limit=8192
    pid-file="/var/lib/mysql/mysql.pid"
    max_allowed_packet=32M
    [client]
    socket="/var/lib/mysql/mysql.sock"
    
    Please suggest :)
     
Loading...

Share This Page