2

Possible Duplicate:
PHP: How do I enable error reporting?

yesterday i had this question: nothing show's up when class is in php code

Normally i work on my own host but now i switched and i didn't realize i had error reporting off. Now i try to get it on. I don't have acces to the root so i created my own ini.php, does that matter? In ini.php i tried:

php_flag    display_errors          on
php_flag    display_startup_errors  on
php_value   error_reporting         2047

But no errors show up, and neither does the website.. Then i tried .htaccess which is alowed to be in every folder if i recall corect.

.htaccess has:

php_value error_reporting 6143

But no errors and no website again.

also tried .htacces with:

<IfModule mod_php5.c>
  display_errors 1
</IfModule>

which gives:

The script could not be executed correctly. Common causes might be that the file was uploaded in a non-ASCII format or the path to the interpreter (e.g.: #!/usr/bin/perl) is missing or set incorrectly.

I tried then just as php file:

<?php
error_reporting(64);
require('test.txt');
?>

which shows no error Also tried:

ini_set('display_errors', 1);

and still no errors and no website :(

Does anyone have a idea what i can do? :(

Community
  • 1
  • 1
clankill3r
  • 9,146
  • 20
  • 70
  • 126

2 Answers2

3

Try

error_reporting(-1);
ini_set('display_errors',1);
ini_set('display_startup_errors',1);

even though this has been asked so many times...

Zulakis
  • 7,859
  • 10
  • 42
  • 67
  • 2
    If it's been asked so many times, post the duplicate and don't answer. – Leigh Oct 05 '12 at 09:01
  • I am searching like crazy for a page (community wiki perhaps) i've seen once which was all about PHP and also mentioned the possible debugging methods.. Any ideas on that one? – Zulakis Oct 05 '12 at 09:02
  • Ah, there we go: http://stackoverflow.com/tags/php/info – Zulakis Oct 05 '12 at 09:03
1

Just take a look at the manual http://php.net/manual/en/ini.list.php

error_reporting NULL    PHP_INI_ALL
display_errors  "1" PHP_INI_ALL  

To Test it just try this:

<?php
  ini_set('error_reporting',E_ALL);
  ini_set('display_errors',1);
  echo $notExistingVar;
  phpinfo();
?>
Gordon
  • 312,688
  • 75
  • 539
  • 559
donald123
  • 5,638
  • 3
  • 26
  • 23
  • I looked in phpinfo andit says php.ini should be here: `/etc/php5.3/php.ini`. However i can't find that folder. – clankill3r Oct 05 '12 at 10:05
  • >>However i can't find that folder. when you don't have root access to the server it doesn't matter, that you can't see this folder ... but phpinfo() gives you a table (under Core) with to ini Values (Local Value Master Value) and the setting that takes actually effect is the Local Value .... so take a look at the output for the Directives error_reporting and display_errors and which Value is set ... – donald123 Oct 05 '12 at 10:10
  • ok: `error_reporting 337 30711` and `display_errors Off On` – clankill3r Oct 05 '12 at 11:41