Can't display php syntax errors

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
marlin
-


Joined: 01 Sep 2006
Posts: 12

PostPosted: Wed Nov 19, 2025 4:13 pm    Post subject: Can't display php syntax errors Reply with quote

I've taken up php programming in my old age with the Abyss web server. I use it for quite few programs that help me keep up with the modern world. But all of a sudden things are falling apart. The fact that I can't get php syntax errors to display isn't helping.

Preliminaries:
Operating system: Linux Mint 22.2 Cinnamon version 6.4.8
Php version: 8.3, FastCGI (Local - Pipes) /usr/bin/php-cgi
MYSQL version: 8.0.43-0ubuntu0.24.04.2

Execution errors, or at least some, display OK; but syntax errors yield a 500 error:

"Looks like there’s a problem with this site
http://localhost:8000/common/test.php might have a temporary problem or it could have moved.
Error code: 500 Internal Server Error
The site could be temporarily unavailable or too busy. Try again in a few moments."

which off course is BS.

I've tried adding to the beginning of each script

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

with no success. I've tried changing the /etc/php/8.3/cgi/php.ini file which I found by displaying the php.ini file itself. The php.ini file itself says there are two versions, development and production. I could only find one ini file; and it says it is the production version. It recommends the following changes, among others, presumably for development:

display_errors = on
display_startup_errors = on
error_reporting = E_ALL

I made the changes, which one can do by opening the file as ROOT. But when I load the ini file by running phpinfo(), I find

display_errors = Off
display_startup_errors = Off
error_reporting = 22527

The 22527 indicates that all errors except for deprecated and strict warnings are reported. I presume that includes syntax error, which is what I want.

I'm guessing that some other php.ini file is being used. But wouldn't know where to look.

Help!

Thank you
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group