I have a small script which im using to test PHP mail(), as below:
<?php
error_reporting(E_ALL);
ini_set("display_errors",1);
mail('x@x.com','test','test') or die('could not send') ;
echo "Mail Sent";
?>
When I run this script I get no output at all. I don’t get an error, I dont get anything echoed, I view the source, nothing.
Ive tried so many different variations, if I take out the mail function in the code above it will work fine.
This is a Windows hosted server so I have not access to php.ini or anything
Could it be some configuration that is causing no output when its encountering an error?
According to the PHP Runtime Configuration guide:
Your code appears to have a syntax error (
'test,is missing a closing apostrophe). Thus, your program is encountering a fatal error. The only way to get a fatal error to display (EDIT: outside the error log) is to setdisplay_errors = 1in yourphp.inifile.