[Solved] Some issues - wordfence-waf.php was it!
Tested with PHP 7.4 + PHP 8.1.4 MySQL 5.7.37 cPanel on shared hosting
Somehow in common.php this string did not for for me:
$handler = new PDO("mysql:host=".DB_HOST.":".DB_PORT.";dbname=".DB_NAME.
I had to remove the DB_PORT so the working line was:
$handler = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8",
After that posts arrived in the MySQL DB.
Note: Seems also to work fine with PHP 8.1.4
So today I tried a different domain..... and it failed
Tested with PHP 7.4 + PHP 8.1.4 MySQL 5.7.37 cPanel on shared hosting (all same as above) CMS type: Hugo Cloudflare: Yes
The whole SRC folder is in domain.com/comments. I get this errors:
Loading failed for the <script> with source “https://domain.com:3000/browser-sync/browser-sync-client.js?v=2.18.13”.
error code: 500
Another code 500:
https://domain.com/comments/comment-sidecar-js-delivery.php net::ERR_ABORTED 500
This gives errors too - but less so when I add the /comments/ path:
<script id="__bs_script__">//<![CDATA[
document.write("<script async src='https://HOST:3000/comments/browser-sync/browser-sync-client.js?v=2.18.13'><\/script>".replace("HOST", location.hostname));
//]]></script>
A bit puzzling why it works on one site but not on another on the same host.
[Solved]
I leave all of the above. The error.log gave the answer (next time I look there first). The CMS is Hugo (static) but ages ago it was Wordpress and hence the .htaccess still had some references to Wordfence. After I cleaned the .htaccess I can write to the db and go on with the installation.