I am trying to test PHP (7.2) HTML error reporting.
I have downloaded the "Many HTML files" archive from http://php.net/download-docs.php and unpacked it to:
/home/user/public_html/php/manual/php-chunked-xhtml/
In php.ini for apache I have set:
error_reporting = E_ALL
display_errors = On
html_errors = On
docref_root = "/~user/php/manual/php-chunked-xhtml/"
docref_ext = .html
and restarted the apache service.
As a test I do:
printf();
Which yields:
Warning: printf() expects at least 1 parameter, 0 given in /home/user/public_html/test/err.php on line 10
… but it is not linked to the manual pages. Text only.
What am I doing wrong here? Should there not be a link to printf()?
Edit:
phpinfo() say settings are as in ini (above). I have also tried to move the manual to /var/www/html/phpmanual, but same result. I also added
ini_set("html_errors", true);
to the test file, but no change in result.
The manual is browseable.
As for what I expect. Per manual one have:
html_errors boolean
If enabled, error messages will include HTML tags. The format for HTML errors produces clickable messages that direct the user to a page describing the error or function in causing the error. These references are affected by docref_root and docref_ext. If disabled, error message will be solely plain text.
Thought I would get a link to printf() as per example.
ini_set("html_errors", true)should work at runtime.html_errorsitself clearly has an effect, but settingdocref_rootanddocref_extdo not result in links.$fh = fopen('/non/existent/file')gives HTML with link report … it looks kind of inconsistent, but guess there is an explanation ;)