Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Solved] Some issues - wordfence-waf.php was it! #6

Open
4044ever opened this issue Apr 6, 2023 · 0 comments
Open

[Solved] Some issues - wordfence-waf.php was it! #6

4044ever opened this issue Apr 6, 2023 · 0 comments

Comments

@4044ever
Copy link

4044ever commented Apr 6, 2023

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.

@4044ever 4044ever changed the title No issue, just some comments - had to remove DB_PORT No issue, just some comments - had to remove DB_PORT - more issues added Apr 7, 2023
@4044ever 4044ever changed the title No issue, just some comments - had to remove DB_PORT - more issues added Some issues - can't figure out why it's not working Apr 7, 2023
@4044ever 4044ever changed the title Some issues - can't figure out why it's not working [Solved] Some issues - wordfence-waf.php was it! Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant