I know there's many questions like this, tried many but without solution. Maybe it's impossible, but i try to ask. I'm moving our old win 2003/apache 2.0.81/php 5.1.6 internal server to a new ubuntu 20.04 / apache 2.4.41 / php 7.4.3 server.
I'd like (in developing) have error displayed in browser, and not the HTTP ERROR 500!! Just like the old server do! Take this little script:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
echo "ciao"
echo "ciao"
echo "ciao"
echo "ciao"
?>
Running in the old server i have this response:
Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' in D:\www\progettoru_php\ciao.php on line 7
While in the new server i have the HTTP ERROR 500, of course in the server log i can see
[Fri Jun 17 13:10:16.485612 2022] [php7:error] [pid 1718] [client 172.16.0.222:14657] PHP Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ';' or ',' in /dati/intranet/helpdesk/ciao.php on line 7
But it's annoying to switch between the client and the server... any TRUE solution? Thankyou Marco
ini_setlines ...