[Phpwm] Switch off errors to screen - apache

Alex Mace alex at hollytree.co.uk
Tue Nov 11 11:29:27 UTC 2008


If I had to guess I'd say that you've probably got a bit of code that  
is printing the error if the query fails. Obviously that wouldn't be  
affected by the error settings because it's the PHP code printing it  
rather than PHP itself.

Like I said though, that's merely a guess...

Alex

On 11 Nov 2008, at 11:23, gary denham wrote:

> We seem to be switching the php error reporting on and off ok, but  
> still
> get the error for the sql on the page, is this another setting?
>
> Gary
>
> Here's what we are seeing
>
> Error reporting on
>
> Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation
> "tbcompany" does not exist in
> /srv/www/vhosts/dunnstest/lib/classes/class.pgdb_handler.php on line  
> 47
> Query failed : SELECT tblohead.oh_id, tblohead.ad_id,
> tblohead.oh_status, tblohead.oh_despatchdate, tblohead.oh_cusref,
> tblohead.oh_orddate, tblohead.neg_id, tbldepartment.ad_id,
> tbldepartment.cu_id, tblcompany.cu_name FROM tblohead, tbldepartment
> LEFT OUTER JOIN tbcompany ON tblcompany.cu_id = tbldepartment.cu_id
> WHERE tblohead.ad_id = tbldepartment.ad_id AND oh_orddate > now() -
> interval '30 days' AND neg_id = '7' AND oh_status <> 'X' ORDER BY  
> oh_id
> DESC : ERROR: relation "tbcompany" does not exist
>
> Error reporting off
>
> Query failed : SELECT tblohead.oh_id, tblohead.ad_id,
> tblohead.oh_status, tblohead.oh_despatchdate, tblohead.oh_cusref,
> tblohead.oh_orddate, tblohead.neg_id, tbldepartment.ad_id,
> tbldepartment.cu_id, tblcompany.cu_name FROM tblohead, tbldepartment
> LEFT OUTER JOIN tbcompany ON tblcompany.cu_id = tbldepartment.cu_id
> WHERE tblohead.ad_id = tbldepartment.ad_id AND oh_orddate > now() -
> interval '30 days' AND neg_id = '7' AND oh_status <> 'X' ORDER BY  
> oh_id
> DESC : ERROR: relation "tbcompany" does not exist
>
>
>
>
>
>
>
> Alex Mace wrote:
>> You can turn it on or off with this code
>>
>> // On
>> ini_set( 'display_errors', 1 );
>> // Off
>> ini_set( 'display_errors', 0 );
>>
>> You might find it better log errors through the apache error log
>> though. That should have the page that they appear on...
>>
>> On 11 Nov 2008, at 10:55, gary denham wrote:
>>
>>
>>> Thanks, I tracked down the php settings in the php.ini file and
>>> switched
>>> them off, most our work is internal where its useful for us to see  
>>> the
>>> errors, is there a way of switching error reporting back on at page
>>> level?
>>>
>>>
>>> Gary
>>>
>>>
>>> Dave Holmes wrote:
>>>
>>>> Are you talking about PHP errors or HTTP errors and the apache  
>>>> error
>>>> pages?
>>>>
>>>> If it's PHP look for these settings in your ini file
>>>>
>>>> error_reporting
>>>> display_errors
>>>>
>>>> You will need to restart apache
>>>>
>>>>
>>>> gary denham wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> We need to switch off error reporting to screen on our apache web
>>>>> server
>>>>> can anyone know how to do this.
>>>>>
>>>>> Regards
>>>>>
>>>>> Gary
>>>>>
>>>>>
>>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Phpwm mailing list
>>>> Phpwm at mailman.lug.org.uk
>>>> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>>>>
>>>>
>>> -- 
>>>
>>> DISCLAIMER:
>>>
>>> This document originates from within Dunns Imaging Group Limited.
>>> This message, together with any associated files, is intended only  
>>> for
>>> the use of the individual or entity to which it is addressed and may
>>> contain information that is confidential, subject to copyright or
>>> constitutes a trade secret. If you are not the intended recipient of
>>> this communication you are hereby notified that any dissemination,
>>> copying or distribution of this message, or of any files associated
>>> with
>>> this message, is strictly prohibited.
>>> If you have received this message in error, please notify us at  
>>> once.
>>>
>>> Dunns Imaging Group Ltd.
>>> Registered Office: Chester Road Cradley Heath West Midlands B64 6AA.
>>> Tel: 01384 564770
>>> Registered in England 598527.
>>>
>>>
>>> _______________________________________________
>>> Phpwm mailing list
>>> Phpwm at mailman.lug.org.uk
>>> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>>>
>>
>>
>> _______________________________________________
>> Phpwm mailing list
>> Phpwm at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>>
>>
>>
>
> -- 
>
> DISCLAIMER:
>
> This document originates from within Dunns Imaging Group Limited.
> This message, together with any associated files, is intended only for
> the use of the individual or entity to which it is addressed and may
> contain information that is confidential, subject to copyright or
> constitutes a trade secret. If you are not the intended recipient of
> this communication you are hereby notified that any dissemination,
> copying or distribution of this message, or of any files associated  
> with
> this message, is strictly prohibited.
> If you have received this message in error, please notify us at once.
>
> Dunns Imaging Group Ltd.
> Registered Office: Chester Road Cradley Heath West Midlands B64 6AA.
> Tel: 01384 564770
> Registered in England 598527.
>
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm




More information about the Phpwm mailing list