Re: [PHP] warning message to hide

2007-04-20 Thread Richard Lynch
On Thu, April 19, 2007 6:05 pm, Roman Neuhauser wrote: >> >> Here's what happens without E_NOTICE: >> >> >> >> [EMAIL PROTECTED] ~ $ php -r 'var_dump($foo);' >> >> >> >> Notice: Undefined variable: foo in Command line code on line 1 >> >> Sorry. >> >> I meant *with* E_NOTICE > > Yeah, that's what

Re: [PHP] warning message to hide

2007-04-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-19 17:57:25 -0500: > On Thu, April 19, 2007 5:47 pm, Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-04-19 17:28:42 -0500: > >> On Thu, April 19, 2007 2:27 am, Roman Neuhauser wrote: > >> > No, I've been using php-recommended.ini for the last several > >> years.

Re: [PHP] warning message to hide

2007-04-19 Thread Richard Lynch
On Thu, April 19, 2007 5:47 pm, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-04-19 17:28:42 -0500: >> On Thu, April 19, 2007 2:27 am, Roman Neuhauser wrote: >> > No, I've been using php-recommended.ini for the last several >> years. >> > It has that error_reporting = E_ALL by default, and th

Re: [PHP] warning message to hide

2007-04-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-19 17:28:42 -0500: > On Thu, April 19, 2007 2:27 am, Roman Neuhauser wrote: > > No, I've been using php-recommended.ini for the last several years. > > It has that error_reporting = E_ALL by default, and that's one of the > > reasons I've been using it. > > I don't th

Re: [PHP] warning message to hide

2007-04-19 Thread Richard Lynch
On Thu, April 19, 2007 2:27 am, Roman Neuhauser wrote: > No, I've been using php-recommended.ini for the last several years. > It has that error_reporting = E_ALL by default, and that's one of the > reasons I've been using it. I don't think your PHP CLI is using the php.ini that you think it's usi

Re: [PHP] warning message to hide

2007-04-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-18 23:03:08 -0500: > On Wed, April 18, 2007 2:21 am, Tijnema ! wrote: > > Hmm, this is what i get: > > ~# php -r 'var_dump($foo);' > > NULL > > ~# php -r 'var_dump(@$foo);' > > NULL > > > > > > PHP6 snapshot from a month ago. > > Your php.ini doesn't have error_report

Re: [PHP] warning message to hide

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 2:21 am, Tijnema ! wrote: > Hmm, this is what i get: > ~# php -r 'var_dump($foo);' > NULL > ~# php -r 'var_dump(@$foo);' > NULL > > > PHP6 snapshot from a month ago. Your php.ini doesn't have error_reporting cranked up to include E_NOTICE. That's your first mistake. :-) :-)

Re: [PHP] warning message to hide

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 1:55 am, Tijnema ! wrote: >> @$conn = pg_connect($conn_string); > > Ok, you're right, both are valid. But i think it's better to use it > before the function name. (like all examples in the manual do ). > > Else you might end up with code like this: > my_function(@$var); > >

Re: [PHP] warning message to hide

2007-04-18 Thread Jochem Maas
Tijnema ! wrote: > On 4/18/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote: >> # [EMAIL PROTECTED] / 2007-04-18 07:55:05 +0100: >> > On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> > >On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: >> > >>> try putting an @ sign before this line. something

Re: [PHP] warning message to hide

2007-04-18 Thread Tijnema !
On 4/18/07, Roman Neuhauser <[EMAIL PROTECTED]> wrote: # [EMAIL PROTECTED] / 2007-04-18 07:55:05 +0100: > On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > >On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: > >>> try putting an @ sign before this line. something like this: > >>> @$conn = pg_

Re: [PHP] warning message to hide

2007-04-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-18 07:55:05 +0100: > On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote: > >On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: > >>> try putting an @ sign before this line. something like this: > >>> @$conn = pg_connect($conn_string); > >> > >> According to the manual:

Re: [PHP] warning message to hide

2007-04-17 Thread Tijnema !
On 4/17/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: >> try putting an @ sign before this line. something like this: >> @$conn = pg_connect($conn_string); > > According to the manual: > http://www.php.net/manual/en/language.operators.errorcontrol.

Re: [PHP] warning message to hide

2007-04-16 Thread Richard Lynch
On Sat, April 14, 2007 12:12 pm, Tijnema ! wrote: >> try putting an @ sign before this line. something like this: >> @$conn = pg_connect($conn_string); > > According to the manual: > http://www.php.net/manual/en/language.operators.errorcontrol.php > the @ should be placed before the function, so li

Re: [PHP] warning message to hide

2007-04-16 Thread Richard Lynch
Short-term, you can toss an @ in front of pg_eonnect. Long-term: http://php.net/set_error_handler Also check out ini_set for error_log and friends. After you've done it the Right Way, get rid of the @ On Sat, April 14, 2007 8:44 am, Alain Roger wrote: > Hi, > > Today i discovered that when my ho

Re: [PHP] warning message to hide

2007-04-14 Thread Tijnema !
On 4/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Quoting Alain Roger <[EMAIL PROTECTED]>: > Hi, > > Today i discovered that when my host webserver has some issue with > PostgreSQL database, my code displays the following error message : > *"Warning*: pg_connect() > [function.pg-connect

Re: [PHP] warning message to hide

2007-04-14 Thread siavash1979
Quoting Alain Roger <[EMAIL PROTECTED]>: > Hi, > > Today i discovered that when my host webserver has some issue with > PostgreSQL database, my code displays the following error message : > *"Warning*: pg_connect() > [function.pg-connect]: > Unable to co

Re: [PHP] warning message to hide

2007-04-14 Thread Tom Chubb
Look at http://devzone.zend.com/node/view/id/652 It explains it there. On 14/04/07, Alain Roger <[EMAIL PROTECTED]> wrote: Hi, Today i discovered that when my host webserver has some issue with PostgreSQL database, my code displays the following error message : *"Warning*: pg_connect() [funct

[PHP] warning message to hide

2007-04-14 Thread Alain Roger
Hi, Today i discovered that when my host webserver has some issue with PostgreSQL database, my code displays the following error message : *"Warning*: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not connect to server