info:myphp:php_debug

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
info:myphp:php_debug [2026/03/05 09:57] – supprimée - modification externe (Date inconnue) 127.0.0.1info:myphp:php_debug [2026/03/05 09:57] (Version actuelle) – ↷ Page déplacée de info:php:php_debug à info:myphp:php_debug radeff
Ligne 1: Ligne 1:
 +===== PHP Debug =====
 +  * [[https://extendsclass.com/php-tester.html|PHP Code Checker - Online syntax check]]
 +<code php>
 +//debug begin
 +ini_set('display_startup_errors', 1);
 +ini_set('display_errors', 1);
 +error_reporting(-1); // Report all PHP errors
  
 +// Report simple running errors
 +//error_reporting(E_ERROR | E_WARNING | E_PARSE);
 +
 +// Reporting E_NOTICE can be good too (to report uninitialized
 +// variables or catch variable name misspellings ...)
 +//error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
 +
 +// Report all errors except E_NOTICE
 +//error_reporting(E_ALL & ~E_NOTICE);
 +
 +// Report no errors (no debug, prod)
 +//error_reporting(0);
 +
 +//echo "<p></p>test error</p>"; exit;
 +//debug end
 +</code>
 +
 +==== .htaccess ====
 +
 +
 +peut aussi se mettre dans un htaccess de la façon suivante:
 +
 +php_flag display_errors off
 +==== infomaniak ====
 +
 +ou encore (config de base infomaniak)
 +<code html>
 +<?php
 +ini_set('error_reporting', '');
 +ini_set('display_errors', 'off');
 +$site = getenv("HTTP_HOST");
 +?>
 +<frameset>
 +<frame src="http://start.infomaniak.ch/welcome/<?=$site?>"/>
 +</frameset>
 +</code>