phauer / comment-sidecar Goto Github PK
View Code? Open in Web Editor NEWLightweight, tracking-free, self-hosted comment service for web spaces supporting only PHP and MySQL
License: MIT License
Lightweight, tracking-free, self-hosted comment service for web spaces supporting only PHP and MySQL
License: MIT License
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.
I wanna show comment count but I cannot do it.
<button class="cs-expand-button {{BUTTON_CSS_CLASSES_ADD_COMMENT}}">Response (5)</button>
<div class="cs-form"></div>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.