PhBB Forum Help

  • LeechKilla
  • Newbie
  • Newbie
  • LeechKilla
  • Posts: 14

Post 3+ Months Ago

:cry: I don't know whats up with my forum but I would really want help in fixing it because I dont want to lose all the data and people in it. I get the following error :x

The link to my forum is http://chicanorap.uni.cc/forum


Warning: mysql_connect(): Too many connections in /home/leechun/public_html/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/leechun/public_html/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/leechun/public_html/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

your error is coming from the mysql4.php file which is in the db directory on your forum.

After set up there is never any reason to modify that file. If you recently made any changes to that file try restoring it with a backup copy
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

or go to line 48 and try to find where you tried connecting to the database more than once :D
also, looks like you're trying to call the wrong table?
haha better just do what ATNO said; make a backup before you try to put any more hacks onto your board ;)
  • LeechKilla
  • Newbie
  • Newbie
  • LeechKilla
  • Posts: 14

Post 3+ Months Ago

:o Well I haven't done any mods to the forum or anything, so I dont know what hapened, I mean if someone has a backup they can give me that would be great but I'm gonna paste the php file just in case, I dont know what went wrong here. :cry:

PHP Code: [ Select ]
<?php
 
/***************************************************************************
 
 *                                 mysql4.php
 
 *                            -------------------
 
 *   begin                : Saturday, Feb 13, 2001
 
 *   copyright            : (C) 2001 The phpBB Group
 
 *   email                : supportphpbb.com
 
 *
 
 *   $Id: mysql4.php,v 1.5 2002/04/02 21:13:47 the_systech Exp $
 
 *
 
 ***************************************************************************/
 
 
 
/***************************************************************************
 
 *
 
 *   This program is free software; you can redistribute it and/or modify
 
 *   it under the terms of the GNU General Public License as published by
 
 *   the Free Software Foundation; either version 2 of the License, or
 
 *   (at your option) any later version.
 
 *
 
 ***************************************************************************/
 
 
 
if(!defined("SQL_LAYER"))
 
{
 
 
 
define("SQL_LAYER","mysql4");
 
 
 
class sql_db
 
{
 
 
 
   var $db_connect_id;
 
   var $query_result;
 
   var $row = array();
 
   var $rowset = array();
 
   var $num_queries = 0;
 
   var $in_transaction = 0;
 
 
 
   //
 
   // Constructor
 
   //
 
   function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
 
   {
 
      $this->persistency = $persistency;
 
      $this->user = $sqluser;
 
      $this->password = $sqlpassword;
 
      $this->server = $sqlserver;
 
      $this->dbname = $database;
 
 
 
      $this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password);
 
 
 
      if( $this->db_connect_id )
 
      {
 
         if( $database != "" )
 
         {
 
            $this->dbname = $database;
 
            $dbselect = mysql_select_db($this->dbname);
 
 
 
            if( !$dbselect )
 
            {
 
               mysql_close($this->db_connect_id);
 
               $this->db_connect_id = $dbselect;
 
            }
 
         }
 
 
 
         return $this->db_connect_id;
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   //
 
   // Other base methods
 
   //
 
   function sql_close()
 
   {
 
      if( $this->db_connect_id )
 
      {
 
         //
 
         // Commit any remaining transactions
 
         //
 
         if( $this->in_transaction )
 
         {
 
            mysql_query("COMMIT", $this->db_connect_id);
 
         }
 
 
 
         return mysql_close($this->db_connect_id);
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   //
 
   // Base query method
 
   //
 
   function sql_query($query = "", $transaction = FALSE)
 
   {
 
      //
 
 
 
      // Remove any pre-existing queries
 
      //
 
      unset($this->query_result);
 
 
 
      if( $query != "" )
 
      {
 
         $this->num_queries++;
 
         if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
 
         {
 
            $result = mysql_query("BEGIN", $this->db_connect_id);
 
            if(!$result)
 
            {
 
               return false;
 
            }
 
            $this->in_transaction = TRUE;
 
         }
 
 
 
         $this->query_result = mysql_query($query, $this->db_connect_id);
 
      }
 
      else
 
      {
 
         if( $transaction == END_TRANSACTION && $this->in_transaction )
 
         {
 
            $result = mysql_query("COMMIT", $this->db_connect_id);
 
         }
 
      }
 
 
 
      if( $this->query_result )
 
      {
 
         unset($this->row[$this->query_result]);
 
         unset($this->rowset[$this->query_result]);
 
 
 
         if( $transaction == END_TRANSACTION && $this->in_transaction )
 
         {
 
            $this->in_transaction = FALSE;
 
 
 
            if ( !mysql_query("COMMIT", $this->db_connect_id) )
 
            {
 
               mysql_query("ROLLBACK", $this->db_connect_id);
 
               return false;
 
            }
 
         }
 
         
 
         return $this->query_result;
 
      }
 
      else
 
      {
 
         if( $this->in_transaction )
 
         {
 
            mysql_query("ROLLBACK", $this->db_connect_id);
 
            $this->in_transaction = FALSE;
 
         }
 
         return false;
 
      }
 
   }
 
 
 
   //
 
   // Other query methods
 
   //
 
   function sql_numrows($query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      return ( $query_id ) ? mysql_num_rows($query_id) : false;
 
   }
 
 
 
   function sql_affectedrows()
 
   {
 
      return ( $this->db_connect_id ) ? mysql_affected_rows($this->db_connect_id) : false;
 
   }
 
 
 
   function sql_numfields($query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      return ( $query_id ) ? mysql_num_fields($query_id) : false;
 
   }
 
 
 
   function sql_fieldname($offset, $query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      return ( $query_id ) ? mysql_field_name($query_id, $offset) : false;
 
   }
 
 
 
   function sql_fieldtype($offset, $query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      return ( $query_id ) ? mysql_field_type($query_id, $offset) : false;
 
   }
 
 
 
   function sql_fetchrow($query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      if( $query_id )
 
      {
 
         $this->row[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC);
 
         return $this->row[$query_id];
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   function sql_fetchrowset($query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      if( $query_id )
 
      {
 
         unset($this->rowset[$query_id]);
 
         unset($this->row[$query_id]);
 
 
 
         while($this->rowset[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC))
 
         {
 
            $result[] = $this->rowset[$query_id];
 
         }
 
 
 
         return $result;
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   function sql_fetchfield($field, $rownum = -1, $query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      if( $query_id )
 
      {
 
         if( $rownum > -1 )
 
         {
 
            $result = mysql_result($query_id, $rownum, $field);
 
         }
 
         else
 
         {
 
            if( empty($this->row[$query_id]) && empty($this->rowset[$query_id]) )
 
            {
 
               if( $this->sql_fetchrow() )
 
               {
 
                  $result = $this->row[$query_id][$field];
 
               }
 
            }
 
            else
 
            {
 
               if( $this->rowset[$query_id] )
 
               {
 
                  $result = $this->rowset[$query_id][$field];
 
               }
 
               else if( $this->row[$query_id] )
 
               {
 
                  $result = $this->row[$query_id][$field];
 
               }
 
            }
 
         }
 
 
 
         return $result;
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   function sql_rowseek($rownum, $query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      return ( $query_id ) ? mysql_data_seek($query_id, $rownum) : false;
 
   }
 
 
 
   function sql_nextid()
 
   {
 
      return ( $this->db_connect_id ) ? mysql_insert_id($this->db_connect_id) : false;
 
   }
 
 
 
   function sql_freeresult($query_id = 0)
 
   {
 
      if( !$query_id )
 
      {
 
         $query_id = $this->query_result;
 
      }
 
 
 
      if ( $query_id )
 
      {
 
         unset($this->row[$query_id]);
 
         unset($this->rowset[$query_id]);
 
 
 
         mysql_free_result($query_id);
 
 
 
         return true;
 
      }
 
      else
 
      {
 
         return false;
 
      }
 
   }
 
 
 
   function sql_error()
 
   {
 
      $result['message'] = mysql_error($this->db_connect_id);
 
      $result['code'] = mysql_errno($this->db_connect_id);
 
 
 
      return $result;
 
   }
 
 
 
} // class sql_db
 
 
 
} // if ... define
 
 
 
?>
  1. <?php
  2.  
  3. /***************************************************************************
  4.  
  5.  *                                 mysql4.php
  6.  
  7.  *                            -------------------
  8.  
  9.  *   begin                : Saturday, Feb 13, 2001
  10.  
  11.  *   copyright            : (C) 2001 The phpBB Group
  12.  
  13.  *   email                : supportphpbb.com
  14.  
  15.  *
  16.  
  17.  *   $Id: mysql4.php,v 1.5 2002/04/02 21:13:47 the_systech Exp $
  18.  
  19.  *
  20.  
  21.  ***************************************************************************/
  22.  
  23.  
  24.  
  25. /***************************************************************************
  26.  
  27.  *
  28.  
  29.  *   This program is free software; you can redistribute it and/or modify
  30.  
  31.  *   it under the terms of the GNU General Public License as published by
  32.  
  33.  *   the Free Software Foundation; either version 2 of the License, or
  34.  
  35.  *   (at your option) any later version.
  36.  
  37.  *
  38.  
  39.  ***************************************************************************/
  40.  
  41.  
  42.  
  43. if(!defined("SQL_LAYER"))
  44.  
  45. {
  46.  
  47.  
  48.  
  49. define("SQL_LAYER","mysql4");
  50.  
  51.  
  52.  
  53. class sql_db
  54.  
  55. {
  56.  
  57.  
  58.  
  59.    var $db_connect_id;
  60.  
  61.    var $query_result;
  62.  
  63.    var $row = array();
  64.  
  65.    var $rowset = array();
  66.  
  67.    var $num_queries = 0;
  68.  
  69.    var $in_transaction = 0;
  70.  
  71.  
  72.  
  73.    //
  74.  
  75.    // Constructor
  76.  
  77.    //
  78.  
  79.    function sql_db($sqlserver, $sqluser, $sqlpassword, $database, $persistency = true)
  80.  
  81.    {
  82.  
  83.       $this->persistency = $persistency;
  84.  
  85.       $this->user = $sqluser;
  86.  
  87.       $this->password = $sqlpassword;
  88.  
  89.       $this->server = $sqlserver;
  90.  
  91.       $this->dbname = $database;
  92.  
  93.  
  94.  
  95.       $this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password);
  96.  
  97.  
  98.  
  99.       if( $this->db_connect_id )
  100.  
  101.       {
  102.  
  103.          if( $database != "" )
  104.  
  105.          {
  106.  
  107.             $this->dbname = $database;
  108.  
  109.             $dbselect = mysql_select_db($this->dbname);
  110.  
  111.  
  112.  
  113.             if( !$dbselect )
  114.  
  115.             {
  116.  
  117.                mysql_close($this->db_connect_id);
  118.  
  119.                $this->db_connect_id = $dbselect;
  120.  
  121.             }
  122.  
  123.          }
  124.  
  125.  
  126.  
  127.          return $this->db_connect_id;
  128.  
  129.       }
  130.  
  131.       else
  132.  
  133.       {
  134.  
  135.          return false;
  136.  
  137.       }
  138.  
  139.    }
  140.  
  141.  
  142.  
  143.    //
  144.  
  145.    // Other base methods
  146.  
  147.    //
  148.  
  149.    function sql_close()
  150.  
  151.    {
  152.  
  153.       if( $this->db_connect_id )
  154.  
  155.       {
  156.  
  157.          //
  158.  
  159.          // Commit any remaining transactions
  160.  
  161.          //
  162.  
  163.          if( $this->in_transaction )
  164.  
  165.          {
  166.  
  167.             mysql_query("COMMIT", $this->db_connect_id);
  168.  
  169.          }
  170.  
  171.  
  172.  
  173.          return mysql_close($this->db_connect_id);
  174.  
  175.       }
  176.  
  177.       else
  178.  
  179.       {
  180.  
  181.          return false;
  182.  
  183.       }
  184.  
  185.    }
  186.  
  187.  
  188.  
  189.    //
  190.  
  191.    // Base query method
  192.  
  193.    //
  194.  
  195.    function sql_query($query = "", $transaction = FALSE)
  196.  
  197.    {
  198.  
  199.       //
  200.  
  201.  
  202.  
  203.       // Remove any pre-existing queries
  204.  
  205.       //
  206.  
  207.       unset($this->query_result);
  208.  
  209.  
  210.  
  211.       if( $query != "" )
  212.  
  213.       {
  214.  
  215.          $this->num_queries++;
  216.  
  217.          if( $transaction == BEGIN_TRANSACTION && !$this->in_transaction )
  218.  
  219.          {
  220.  
  221.             $result = mysql_query("BEGIN", $this->db_connect_id);
  222.  
  223.             if(!$result)
  224.  
  225.             {
  226.  
  227.                return false;
  228.  
  229.             }
  230.  
  231.             $this->in_transaction = TRUE;
  232.  
  233.          }
  234.  
  235.  
  236.  
  237.          $this->query_result = mysql_query($query, $this->db_connect_id);
  238.  
  239.       }
  240.  
  241.       else
  242.  
  243.       {
  244.  
  245.          if( $transaction == END_TRANSACTION && $this->in_transaction )
  246.  
  247.          {
  248.  
  249.             $result = mysql_query("COMMIT", $this->db_connect_id);
  250.  
  251.          }
  252.  
  253.       }
  254.  
  255.  
  256.  
  257.       if( $this->query_result )
  258.  
  259.       {
  260.  
  261.          unset($this->row[$this->query_result]);
  262.  
  263.          unset($this->rowset[$this->query_result]);
  264.  
  265.  
  266.  
  267.          if( $transaction == END_TRANSACTION && $this->in_transaction )
  268.  
  269.          {
  270.  
  271.             $this->in_transaction = FALSE;
  272.  
  273.  
  274.  
  275.             if ( !mysql_query("COMMIT", $this->db_connect_id) )
  276.  
  277.             {
  278.  
  279.                mysql_query("ROLLBACK", $this->db_connect_id);
  280.  
  281.                return false;
  282.  
  283.             }
  284.  
  285.          }
  286.  
  287.          
  288.  
  289.          return $this->query_result;
  290.  
  291.       }
  292.  
  293.       else
  294.  
  295.       {
  296.  
  297.          if( $this->in_transaction )
  298.  
  299.          {
  300.  
  301.             mysql_query("ROLLBACK", $this->db_connect_id);
  302.  
  303.             $this->in_transaction = FALSE;
  304.  
  305.          }
  306.  
  307.          return false;
  308.  
  309.       }
  310.  
  311.    }
  312.  
  313.  
  314.  
  315.    //
  316.  
  317.    // Other query methods
  318.  
  319.    //
  320.  
  321.    function sql_numrows($query_id = 0)
  322.  
  323.    {
  324.  
  325.       if( !$query_id )
  326.  
  327.       {
  328.  
  329.          $query_id = $this->query_result;
  330.  
  331.       }
  332.  
  333.  
  334.  
  335.       return ( $query_id ) ? mysql_num_rows($query_id) : false;
  336.  
  337.    }
  338.  
  339.  
  340.  
  341.    function sql_affectedrows()
  342.  
  343.    {
  344.  
  345.       return ( $this->db_connect_id ) ? mysql_affected_rows($this->db_connect_id) : false;
  346.  
  347.    }
  348.  
  349.  
  350.  
  351.    function sql_numfields($query_id = 0)
  352.  
  353.    {
  354.  
  355.       if( !$query_id )
  356.  
  357.       {
  358.  
  359.          $query_id = $this->query_result;
  360.  
  361.       }
  362.  
  363.  
  364.  
  365.       return ( $query_id ) ? mysql_num_fields($query_id) : false;
  366.  
  367.    }
  368.  
  369.  
  370.  
  371.    function sql_fieldname($offset, $query_id = 0)
  372.  
  373.    {
  374.  
  375.       if( !$query_id )
  376.  
  377.       {
  378.  
  379.          $query_id = $this->query_result;
  380.  
  381.       }
  382.  
  383.  
  384.  
  385.       return ( $query_id ) ? mysql_field_name($query_id, $offset) : false;
  386.  
  387.    }
  388.  
  389.  
  390.  
  391.    function sql_fieldtype($offset, $query_id = 0)
  392.  
  393.    {
  394.  
  395.       if( !$query_id )
  396.  
  397.       {
  398.  
  399.          $query_id = $this->query_result;
  400.  
  401.       }
  402.  
  403.  
  404.  
  405.       return ( $query_id ) ? mysql_field_type($query_id, $offset) : false;
  406.  
  407.    }
  408.  
  409.  
  410.  
  411.    function sql_fetchrow($query_id = 0)
  412.  
  413.    {
  414.  
  415.       if( !$query_id )
  416.  
  417.       {
  418.  
  419.          $query_id = $this->query_result;
  420.  
  421.       }
  422.  
  423.  
  424.  
  425.       if( $query_id )
  426.  
  427.       {
  428.  
  429.          $this->row[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC);
  430.  
  431.          return $this->row[$query_id];
  432.  
  433.       }
  434.  
  435.       else
  436.  
  437.       {
  438.  
  439.          return false;
  440.  
  441.       }
  442.  
  443.    }
  444.  
  445.  
  446.  
  447.    function sql_fetchrowset($query_id = 0)
  448.  
  449.    {
  450.  
  451.       if( !$query_id )
  452.  
  453.       {
  454.  
  455.          $query_id = $this->query_result;
  456.  
  457.       }
  458.  
  459.  
  460.  
  461.       if( $query_id )
  462.  
  463.       {
  464.  
  465.          unset($this->rowset[$query_id]);
  466.  
  467.          unset($this->row[$query_id]);
  468.  
  469.  
  470.  
  471.          while($this->rowset[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC))
  472.  
  473.          {
  474.  
  475.             $result[] = $this->rowset[$query_id];
  476.  
  477.          }
  478.  
  479.  
  480.  
  481.          return $result;
  482.  
  483.       }
  484.  
  485.       else
  486.  
  487.       {
  488.  
  489.          return false;
  490.  
  491.       }
  492.  
  493.    }
  494.  
  495.  
  496.  
  497.    function sql_fetchfield($field, $rownum = -1, $query_id = 0)
  498.  
  499.    {
  500.  
  501.       if( !$query_id )
  502.  
  503.       {
  504.  
  505.          $query_id = $this->query_result;
  506.  
  507.       }
  508.  
  509.  
  510.  
  511.       if( $query_id )
  512.  
  513.       {
  514.  
  515.          if( $rownum > -1 )
  516.  
  517.          {
  518.  
  519.             $result = mysql_result($query_id, $rownum, $field);
  520.  
  521.          }
  522.  
  523.          else
  524.  
  525.          {
  526.  
  527.             if( empty($this->row[$query_id]) && empty($this->rowset[$query_id]) )
  528.  
  529.             {
  530.  
  531.                if( $this->sql_fetchrow() )
  532.  
  533.                {
  534.  
  535.                   $result = $this->row[$query_id][$field];
  536.  
  537.                }
  538.  
  539.             }
  540.  
  541.             else
  542.  
  543.             {
  544.  
  545.                if( $this->rowset[$query_id] )
  546.  
  547.                {
  548.  
  549.                   $result = $this->rowset[$query_id][$field];
  550.  
  551.                }
  552.  
  553.                else if( $this->row[$query_id] )
  554.  
  555.                {
  556.  
  557.                   $result = $this->row[$query_id][$field];
  558.  
  559.                }
  560.  
  561.             }
  562.  
  563.          }
  564.  
  565.  
  566.  
  567.          return $result;
  568.  
  569.       }
  570.  
  571.       else
  572.  
  573.       {
  574.  
  575.          return false;
  576.  
  577.       }
  578.  
  579.    }
  580.  
  581.  
  582.  
  583.    function sql_rowseek($rownum, $query_id = 0)
  584.  
  585.    {
  586.  
  587.       if( !$query_id )
  588.  
  589.       {
  590.  
  591.          $query_id = $this->query_result;
  592.  
  593.       }
  594.  
  595.  
  596.  
  597.       return ( $query_id ) ? mysql_data_seek($query_id, $rownum) : false;
  598.  
  599.    }
  600.  
  601.  
  602.  
  603.    function sql_nextid()
  604.  
  605.    {
  606.  
  607.       return ( $this->db_connect_id ) ? mysql_insert_id($this->db_connect_id) : false;
  608.  
  609.    }
  610.  
  611.  
  612.  
  613.    function sql_freeresult($query_id = 0)
  614.  
  615.    {
  616.  
  617.       if( !$query_id )
  618.  
  619.       {
  620.  
  621.          $query_id = $this->query_result;
  622.  
  623.       }
  624.  
  625.  
  626.  
  627.       if ( $query_id )
  628.  
  629.       {
  630.  
  631.          unset($this->row[$query_id]);
  632.  
  633.          unset($this->rowset[$query_id]);
  634.  
  635.  
  636.  
  637.          mysql_free_result($query_id);
  638.  
  639.  
  640.  
  641.          return true;
  642.  
  643.       }
  644.  
  645.       else
  646.  
  647.       {
  648.  
  649.          return false;
  650.  
  651.       }
  652.  
  653.    }
  654.  
  655.  
  656.  
  657.    function sql_error()
  658.  
  659.    {
  660.  
  661.       $result['message'] = mysql_error($this->db_connect_id);
  662.  
  663.       $result['code'] = mysql_errno($this->db_connect_id);
  664.  
  665.  
  666.  
  667.       return $result;
  668.  
  669.    }
  670.  
  671.  
  672.  
  673. } // class sql_db
  674.  
  675.  
  676.  
  677. } // if ... define
  678.  
  679.  
  680.  
  681. ?>
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

The mysql4.php file looks identical to mine. You don't need to change it. It's something else.

Well, to make things a little easier to analyse, this is line 48:

PHP Code: [ Select ]
$this->db_connect_id = ($this->persistency) ? mysql_pconnect($this->server, $this->user, $this->password) : mysql_connect($this->server, $this->user, $this->password);


This is line 329 to 335 (to show the whole function) :


PHP Code: [ Select ]
function sql_error()
 
    {
 
        $result['message'] = mysql_error($this->db_connect_id);
 
        $result['code'] = mysql_errno($this->db_connect_id);
 
 
 
        return $result;
 
    }
  1. function sql_error()
  2.  
  3.     {
  4.  
  5.         $result['message'] = mysql_error($this->db_connect_id);
  6.  
  7.         $result['code'] = mysql_errno($this->db_connect_id);
  8.  
  9.  
  10.  
  11.         return $result;
  12.  
  13.     }




After reviewing this prior OZZU topic, it may be your server and not your problem. Read the same problem here:

http://www.ozzu.com/programming-forum/mysql-connect-too-many-connections-t24801.html

Also scroll down below the ads to read the replies to the same problem here:

http://www.experts-exchange.com/Web/Web ... 88309.html

Basically both posts indicate the same thing. The problem is probably on your hosts end and not anything you have done.

Might want to contact your host and let them know of the problem.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

And to reassure you a bit, I doubt that you'll lose any data from your database, so as long as you changed nothing recently, look to your host to fix it.
  • LeechKilla
  • Newbie
  • Newbie
  • LeechKilla
  • Posts: 14

Post 3+ Months Ago

Ok thanx, I'll try and contact my host but everytime i try they never answer back :x
  • Jess
  • Guru
  • Guru
  • User avatar
  • Posts: 1153
  • Loc: USA

Post 3+ Months Ago

lol usefull host then :P
  • LeechKilla
  • Newbie
  • Newbie
  • LeechKilla
  • Posts: 14

Post 3+ Months Ago

LoL its fixed, the reason host wasnt contacting me was because I was sending it to the wrong adress, and also the reason the forum wasn't working is because MySql was being worked on. But everything is fine now thanks for the help. :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Good to hear. Thanks for the update.

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.