| View previous topic :: View next topic |
| Author |
Message |
marlin -
Joined: 01 Sep 2006 Posts: 14
|
Posted: Wed Nov 19, 2025 4:13 pm Post subject: Can't display php syntax errors |
|
|
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 |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1351
|
Posted: Sat Nov 22, 2025 2:38 pm Post subject: Re: Can't display php syntax errors |
|
|
It is better to enable FastCGI logging in Abyss Web Server and monitor the output there. Error 500 could be caused before even the interpreter got a chance to run.
By the way, have you verified that php-cgi can run fine?
At the command line, try running that command:
If you get an error, please post it here.
If you get a silent cursor waiting for entry, press CTRL+D keys. You should see some headers such as:
| Code: | Content-type: text/html
X-Powered-by: PHP/8.4.3
|
_________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
| Back to top |
|
 |
marlin -
Joined: 01 Sep 2006 Posts: 14
|
Posted: Tue Nov 25, 2025 11:03 pm Post subject: |
|
|
I'll try the fast cgi log suggestion
I have no problem running php-cgi.
thanks for the response. |
|
| Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1351
|
Posted: Thu Nov 27, 2025 8:47 pm Post subject: |
|
|
| marlin wrote: | I'll try the fast cgi log suggestion
I have no problem running php-cgi.
thanks for the response. |
By the way, try running from the command line :
| Code: | | /usr/bin/php-cgi -i | grep "Loaded Configuration File" |
It should return something like :
| Code: | | <tr><td class="e">Loaded Configuration File </td><td class="v">/path/to/php.ini </td></tr> |
/path/to/php.ini will point to the actual php.ini file that is being read. Check if that is the one you've updated. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
| Back to top |
|
 |
marlin -
Joined: 01 Sep 2006 Posts: 14
|
Posted: Fri Nov 28, 2025 4:33 am Post subject: |
|
|
| Yes, this is the php.ini file I changed.[img][/img] |
|
| Back to top |
|
 |
|