internal server error 500 - Forum

Forum Navigation
You need to log in to create posts and topics.

internal server error 500

Good morning
I have this subroutine, and when I execute the first neoPhpExecSql I have an internal error 500. My sql has no problem through phpmyadmin. Any idea ?

If [nb] == "2100"
neoPhpExecSql "dbMSG" "delMsg" "" "result"
Delay 200
Endif
neoPhpExecSql "dbMSG" "SelMsg" "[nb]" "scrollDown"

$sqlAlias[3]="delMsg";
$sqlQuerys[3]="DELETE FROM message WHERE MsgID < (select max(MsgID) - 2000 from message)";

Uploaded files:
  • You need to login to have access to uploads.

@phil78 It's quite difficult to know what's producing the server error. Time out? Memory limit?

Error 500:
https://blog.hubspot.com/marketing/http-500-internal-server-error

You should take a look at the server logs for more information.

Regards.

thanks @luishp I do not see informations on the log server which really help me :
2022/02/24 12:39:11 [error] 5437#5437: *189953 openat() "/var/www/lpg78.kappatau.fr/web/message/js/pwa-update.js.map" failed (2: No such file or directory), client: 87.231.189.245, server: lpg78.kappatau.fr, request: "GET /message/js/pwa-update.js.map HTTP/2.0", host: "lpg78.kappatau.fr"
2022/02/24 12:40:47 [error] 5437#5437: *189944 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error in /var/www/clients/client1/web3/web/message/neofunctions.php:251
Stack trace:
#0 /var/www/clients/client1/web3/web/message/neofunctions.php(251): PDOStatement->fetchAll(2)
#1 /var/www/clients/client1/web3/web/message/neofunctions.php(107): execsql('dbMSG', 'delMsg', '')
#2 {main}
thrown in /var/www/clients/client1/web3/web/message/neofunctions.php on line 251" while reading response header from upstream, client: 87.231.189.245, server: lpg78.kappatau.fr, request: "POST /message/neofunctions.php HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php7.3-fpm/web3.sock:", host: "lpg78.kappatau.fr", referrer: "https://lpg78.kappatau.fr/message/index.html"

Sorry, no idea. Does it work when you use any other SQL query?
I really don't understand your query.

@luishp it comes from PDO with the subroutine according to what I saw on the web. It's curious because the select SelMsg which is in the same subroutine is built the same way and doesn't create an error.
"SELECT Name, Time, Msg FROM message WHERE MsgID > (select max(MsgID) - ? from message) order by MsgID"

For those who would have the same error, I worked around the problem by first making a query to retrieve the max(MsgID) and then I run the delete with the variable.

luishp has reacted to this post.
luishp