Since suPHP, php error's into a HTTP-500

BlueCola

Verified User
Joined
Jan 12, 2012
Messages
75
I updated last week to suPHP. I was just making a website, when I noticed that when I make a error in php, I didnt get 'Expected T_ELSE', but instead i did get a HTTP 500 error. I really don't like this, because you need to check the /var/log/httpd/domain/domain.error.log to see what's wrong. Also, customers don't have access to that folder ofcourse, so they can't see their error's. What can I do to fix this? Is there a possibility to write logs to the home/user map instead, or just show the PHP error on the page instead of 500?
 
Probably is something now blocked in .htaccess.

Check if your user have an .htaccess file and post here.

Probably is FollowSymLink directive

Regards
 
No, that isn't the problem. My script is:

PHP:
<?php
echo "Please give me an error!<br />"
echo "Can you do that for me?;
?>

With this script, I trigger an internal 500 error. If I edit it to:

PHP:
<?php
echo "Please give me an error!<br />";
echo "Can you do that for me?;
?>

it runs fine.
 
EDIT: Sorry, needed to edit the post, this is how i ran the script:

No, that isn't the problem. My script is:

PHP:
<?php
echo "Please give me an error!<br />"
echo "Can you do that for me?";
?>

With this script, I trigger an internal 500 error. If I edit it to:

PHP:
<?php
echo "Please give me an error!<br />";
echo "Can you do that for me?";
?>

it runs fine.
 
mmmh... im not a php programmer but i think is normal that an echo must end with the ";" char

So i dont see the problem...
 
I'm sorry, but I don't think you understand me. This script:

PHP:
<?php 
echo "Please give me an error!<br />" 
echo "Can you do that for me?"; 
?>

should give me an error about the missing ; ( PHP Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in ). But instead of printing this error to the browser, it give's a 500 internal error, and I can see the error in the /var/logs/domain.error.log.

Because my customers don't have access to the /var/ folder, they can't see what they're doing wrong if they make an error.

So, the script above is only an example.
 
Is there an error in the suphp log too? /var/log/suphp.log

Do you have error display turned on in php.ini?

What error are you seeing in the error log /var/logs/domain.error.log?

Try this on the top of your script to see if it turns on errors:

ini_set('display_errors','on');
 
Back
Top