MySQL Connection Problem |
[eluser]Mareshal[/eluser]
I've uploaded my site on a host and I get this error: Quote:ERROR - 05-09-2009 16:39:43 --> Severity: Warning --> mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 /home/******/public_html/elite/system/database/drivers/mysql/mysql_driver.php 70 database details are 100% correct here is database.php Code: $active_group = "elite"; Knows someone what's happening? is the 2nd host with same problem.
[eluser]Mareshal[/eluser]
error fixed: $db['elite']['db_debug'] = FALSE; but now I have another problem: Fatal error: Call to a member function num_rows() on a non-object in /home/*****/public_html/elite/dev/libraries/E_db.php on line 18 e_db is my library Code: function check($table, $where){ this is the code I tried affected_rows or return $this->ci->db->count_all_results(); but nothing Fatal error: Call to a member function num_rows() on a non-object in /home/*****/public_html/elite/system/database/DB_active_rec.php on line 1080 in logs I see same error
[eluser]philpalmieri[/eluser]
I'm getting the same thing, but it only started happening on my new 10.6 install with MAMP Pro 1.8 (PHP 5.2.10)
[eluser]Phil Norton[/eluser]
[quote author="philpalmieri" date="1252396960"]I'm getting the same thing, but it only started happening on my new 10.6 install with MAMP Pro 1.8 (PHP 5.2.10)[/quote] Yup, I'm getting the same issues. I had a site running locally that used a web database, and all worked perfectly 'til I upgraded MAMP Pro. Is this a MAMP issue, or Snow Leopard?
[eluser]wabu[/eluser]
Could it be related to the CI version (1.7.1 vs. trunk)?
[eluser]Phil Norton[/eluser]
Downloaded the latest version from trunk (Rev 1736) and the same thing happens...
[eluser]wabu[/eluser]
Is everybody getting the error only with num_rows()? If it's just general problems are you able to connect with vanilla PHP (such as: http://www.php.net/manual/en/mysql.examples-basic.php)? I installed MySQL today and it seems to be working (returning a simple count with num_rows() as above), but that was from source and not as part of the MAMP package so maybe that's the problem. I'm running Snow Leopard, MySQL 5.1, PHP 5.3.0 (SL default) and CI Rev 1736. If anybody wants me to try another non-MAMP test with my configuration let me know.
[eluser]philpalmieri[/eluser]
Hey, so the problem (for me anyway) was that the new MAMP/PRO my.cnf is missing the bind declaration. Add "bind-address = 127.0.0.1" without the quotes, and reload mamp... all worked for me after. |
Welcome Guest, Not a member yet? Register Sign In |