Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    scrivere gli errori di php in un file?

    mi servirebbe che gli errori di uno script venissero scritti in un file, è possibile?

    ho visto la funzione set_error_handler ma non ho capito molto purtroppo


  2. #2
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858
    nel php.ini trovi:

    ; Log errors into a log file (server-specific log, stderr, or error_log (below))
    ; As stated above, you're strongly advised to use error logging in place of
    ; error displaying on production web sites.
    log_errors = Off

    ; Set maximum length of log_errors. In error_log information about the source is
    ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
    log_errors_max_len = 1024

    ; Do not log repeated messages. Repeated errors must occur in same file on same
    ; line until ignore_repeated_source is set true.
    ignore_repeated_errors = Off

    ; Ignore source of message when ignoring repeated messages. When this setting
    ; is On you will not log errors with repeated messages from different files or
    ; sourcelines.
    ignore_repeated_source = Off

    ; If this parameter is set to Off, then memory leaks will not be shown (on
    ; stdout or in the log). This has only effect in a debug compile, and if
    ; error reporting includes E_WARNING in the allowed list
    report_memleaks = On

    ; Store the last error/warning message in $php_errormsg (boolean).
    track_errors = Off

    ; Disable the inclusion of HTML tags in error messages.
    ;html_errors = Off

    ; If html_errors is set On PHP produces clickable error messages that direct
    ; to a page describing the error or function causing the error in detail.
    ; You can download a copy of the PHP manual from http://www.php.net/docs.php
    ; and change docref_root to the base URL of your local copy including the
    ; leading '/'. You must also specify the file extension being used including
    ; the dot.
    ;docref_root = "/phpmanual/"
    ;docref_ext = .html

    ; String to output before an error message.
    ;error_prepend_string = "<font color=ff0000>"

    ; String to output after an error message.
    ;error_append_string = "</font>"

    ; Log errors to specified file.
    ;error_log = filename

    ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
    ;error_log = syslog
    think simple think ringo

  3. #3
    ok grazie, ho cambiato: error_log: path e ora me li scrive nel file che gli ho detto...



  4. #4

    php-ini

    php.ini io lo modifico sul mio pc per un programma che sta sul mio pc
    il php.ini di un sito che ho pubblicato come faccio a modificarlo?
    www.moscabianca.biz- riusciremo a competere con i colossi dell'annuncio? un sogno che arriva dal basso

  5. #5
    Moderatore di Server Apache L'avatar di marketto
    Registrato dal
    Sep 2001
    Messaggi
    5,858

    Re: php-ini

    [supersaibal]Originariamente inviato da sandroacchiardi
    php.ini io lo modifico sul mio pc per un programma che sta sul mio pc
    il php.ini di un sito che ho pubblicato come faccio a modificarlo? [/supersaibal]
    non puoi, al massimo puoi usare la funzione ini_set: www.php.net/ini_set



    think simple think ringo

  6. #6

    Re: Re: php-ini

    [supersaibal]Originariamente inviato da marketto
    non puoi, al massimo puoi usare la funzione ini_set: www.php.net/ini_set



    [/supersaibal]
    oppure puoi provare con un file htacces se li hai abilitati

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.