Apache asi nepusti chyby PHP

MaReK Olšavský orsm na centrum.cz
Čtvrtek Leden 18 11:53:49 CET 2007


Kouknete se do kontiguraku (/etc/php5/apache2/php.ini  ... U me na 
Ubuntu), tam najdete sekci, ktera vypada zhruba takto:
Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; error_reporting is a bit-field.  Or each number up to get desired error
; reporting level
; E_ALL             - All errors and warnings (doesn't include E_STRICT)
; 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 compatibility 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
;
; Examples:
;
;   - Show all errors, except for notices and coding standards warnings
;
;error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
;
;   - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
;   - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
;   - Show all errors except for notices and coding standards warnings
;
error_reporting  =  E_ALL & ~E_NOTICE

; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production 
web site
; may reveal security information to end users, such as file paths on 
your Web
; server, your database schema or other information.
display_errors = On

atd...
Tam nastavite jestli se maji chyby zobrazovat, nebo logovat a jake chyby

-- MO
- --

MaReK "Penguin" Olšavský
PHP Voodoo
private mail: orsm na centrum.cz
private web: http://orsm.wz.cz
ICQ#: 160 178 925; MSN: orsm na centrum.cz; Skype: Penguin_007
tel.: +420-603-519-650; +420-775-154-689 (775-1-LINUX)

Na stránce bylo napsáno: "Optimalizováno pro Explorer 5, nebo lepší".
   Tak jsem přešel na Mozilla Firefox  --> http://firefox.czilla.cz/


Sv. Patrick napsal(a):
> Zdravim.
> 
> Nainstaloval jsem si lokalne apache 2.0.59 a php 5.2.0 a delam nejake
> stranky. Zjistil jsem ale, ze kdyz mam ve skriptu nejakou chybu (napr.
> Fatal Error), tak se mi v prohlizeci nezobrazi, ale zobrazi se tam
> prazdna stranka (kdyz dam zdrojovy kod, tak je tam i zakladni
> struktura tagu, ale obsah je prazdny). Kdyz ten stejny skript pustim
> primo v php, tak to tu chybu vraci, tak me napada, ze to nejak blbne
> apache. Nesetkal se s tim nekdo, kdo by me mohl nasmerovat?
> 
> Diky Patrick



Další informace o konferenci Linux