This is a discussion on To many connections error message within the PHP General forums, part of the PHP Programming Forums category; I'm working with my host to resolve why I am getting these error messages, but in the meantime, I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm working with my host to resolve why I am getting these error
messages, but in the meantime, I am getting this message on the website: Warning: mysql_connect(): Too many connections in /path/number/user/ code/connect.php on line 10 Sorry: Could not connect to database. Please contact the webmaster at murphy63@wncc.edu Where my connection code is: $con = mysql_connect($host, $dbuser, $pw) or die("Sorry: Could not connect to database. Please contact the webmaster at murphy63@wncc.edu"); @mysql_select_db($db,$con); The questions is, since I don't have error reporting turned on, why am I getting an error message that includes the complete path to my connect script.... something I would like to not be telling the general public? Is there a way to suppress that? -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 |
|
|||
|
@, or ask your hoster to disable display_errors
t > > The questions is, since I don't have error reporting turned on, why am > I getting an error message that includes the complete path to my > connect script.... something I would like to not be telling the > general public? Is there a way to suppress that? |
|
|||
|
Pintér Tibor wrote:
> @, or ask your hoster to disable display_errors That can be done in the script ;) ini_set('display_errors', false); -- Postgresql & php tutorials http://www.designmagick.com/ |
|
|||
|
Chris írta:
> Pintér Tibor wrote: >> @, or ask your hoster to disable display_errors > > That can be done in the script ;) > > ini_set('display_errors', false); > Sure it can, but its a lame host that enables displaying of errors by default, thats why I advised to ask them to disable it globally :) btw: Although display_errors may be set at runtime (with *ini_set()* <http://hu.php.net/manual/hu/function.ini-set.php>), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. t |
|
|||
|
Hi Pinter:
Look at your php.ini file for the sentence error_reporting = E_ALL this mean that your server shut to your browser any error or warning that it found in your php code. You must go to your php.ini and change that sentence for any that disables all warnings. You can use for example a combination of next: E_ERROR - fatal run-time errors E_WARNING - run-time warnings (non-fatal errors) E_PARSE - compile-time parse errors E_NOTICE - run-time notices (these are warnings which often result from a bug in your code, but it's possible that it was intentional (e.g., using an uninitialized variable and relying on the fact it's automatically initialized to an empty string) E_STRICT - run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatability of your code E_CORE_ERROR - fatal errors that occur during PHP's initial startup E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's initial startup E_COMPILE_ERROR - fatal compile-time errors E_COMPILE_WARNING - compile-time warnings (non-fatal errors) E_USER_ERROR - user-generated error message E_USER_WARNING - user-generated warning message E_USER_NOTICE - user-generated notice message An example: error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR this shows only all error types. Sl2, Richard ______________________________________ Eduardo Ricardo Hernández Osorio Esp. "C" en Ciencias Informáticas Grupo Informática, U.T.B Serv. Aeronáuticos Aeropuerto Internacional "Frank País García" Tel. (53)(24)(47 4569) email: ricardo@hog.ecasa.avianet.cu Airport´s Telephones: (53) (24) 462512, 474525, 474583 Ext: 4569 -----Mensaje original----- De: Pintér Tibor [mailto:tibyke@tibyke.hu] Enviado el: Tuesday, January 23, 2007 7:56 PM Para: Chris CC: php Asunto: Re: [php] To many connections error message Chris írta: > Pintér Tibor wrote: >> @, or ask your hoster to disable display_errors > > That can be done in the script ;) > > ini_set('display_errors', false); > Sure it can, but its a lame host that enables displaying of errors by default, thats why I advised to ask them to disable it globally :) btw: Although display_errors may be set at runtime (with *ini_set()* <http://hu.php.net/manual/hu/function.ini-set.php>), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. t -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
![]() |
| Thread Tools | |
| Display Modes | |
|
|