Displaying PHP errors

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
smarty_pockets
Forum Newbie
Posts: 3
Joined: Thu Nov 01, 2007 6:28 pm

Displaying PHP errors

Post by smarty_pockets »

Hi everyone!

I have a website that uses PHP+smarty, and lately my website has stopped displaying any PHP errors. Whenever there is an error (parse or runtime), I see a white page instead, and debugging becomes a hassle. I am fairly confident that the bug is either in PHP.ini or .htacess, since I changed these files a lot before this problem started happening.

Here's what my .htaccess file looks like:

Code: Select all

php_value max_execution_time 300000
php_value max_input_time 120000
php_value memory_limit 512M
php_value post_max_size 1024M
php_value upload_max_filesize 1000M 
php_value error_reporting E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_ALL
php_value display_errors On

RewriteEngine On
<IfModule mod_security.c>  
  # Turn off mod_security filtering.  
  SecFilterEngine Off  
 
  # The below probably isn't needed,  
  # but better safe than sorry.  
  SecFilterScanPOST Off  
</IfModule>

RewriteRule ^rss/new        /rss.php?type=new [L] 
RewriteRule ^rss/comments   /rss.php?type=comments [L] 
RewriteRule ^rss/views      /rss.php?type=views [L] 
RewriteRule ^staging/([0-9]*)/.*$   /staging/view_video.php?vid=$1 [L] 
RewriteRule ^([0-9]*)/.*$   /view_video.php?vid=$1 [L] 

RewriteCond %{HTTP_REFERER} !^http://www.vidopk.com [NC]

RewriteRule \.(tpl)$ - [F,NC,L]
and here's PHP.ini

Code: Select all

safe_mode = off
register_globals = on
open_basedir = 
output_buffering = on
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 6000
max_input_time = 6000
memory_limit = 32M
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR|E_ALL
display_errors = On
file_uploads = On
session.gc_maxlifetime = 14000
register_argc_argv = On
Am I doing anything wrong here?

Thanks for any pointers!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Check the configuration by running this script:

Code: Select all

<?php
phpinfo();
It should tell you what the setting really is.

You should also read the following thoroughly:

http://www.php.net/manual/en/configuration.changes.php
(#10850)
smarty_pockets
Forum Newbie
Posts: 3
Joined: Thu Nov 01, 2007 6:28 pm

Post by smarty_pockets »

Thanks for the tip. Actually after deleting both php.ini and .htacess, I still see the problem. So it seems like its not related to the two files. phpinfo() shows error_reporting as E_ALL & ~E_NOTICE.

Could anything else be the culprit?
Post Reply