Interact PHP - comment system

Code - 17-08-2018


Interact is a simple PHP open-source comment system that can be added to any website in minutes to improve interactivity and user's involvement. Client-side, it is very lightweight (<6KB CSS and JS combined) and intuitive (no logins, no cookies,...). Server-side, it is very easy to setup, manage and even customize to fit your needs.

Interact PHP with the modern interface

Similarly to its older brother HashOver, Interact does not use an SQL database but stores comments as XML files. Many third-party comment systems like Disqus, IntenseDebate, Livefyre, Facebook Comments and Google+ Comments, suffer from these problems and impose them and many restrictions onto their users, meaning you and your website's visitors.


  • Fast and convenient for your users with responsive design.
  • Very simple setup: no database to configure, just install it and add 2 lines of PHP where you want your comment section to be.
  • Customizable style and behavior to match the look & feel of your website.
  • Anti-Spam system using Google's reCAPTCHA v2 (optional).
  • Pure JS (no JQuery required).
  • Secure by design.
  • New: Inline markdown syntax support in comments (bold, italics, strikethrough and inline code)

Installation and setup

  1. Download Interact on GitHub.
  2. Extract it under your website's root.
  3. Customize Interact's behavior to your needs by editing the /lib/Interact_PHP/settings.php file.
  4. Give the directory that will contain the comments the 777 permission (chmod 777 path/to/Interact_PHP/Comments).

Hurray, Interact is ready to go! To add a comment section to a page, just insert the following PHP:


Parameters and cutomization

All of the parameters of Interact are in the settings.php file. There are a lot of comments to assist you in the configuration process.

If you want to add your own style, copy an existing CSS file to get started... and commit it on GitHub if you want to contribute to Interact's ongoing developpement!

Interact PHP with various CSS


This section describes the various problems you may encounter while installing/using Interact. If you don't find a solution here, please add a GitHub issue.

  • I can't add comments

You should check the permissions of the folder containing the comments (Interact/Comments by default). The PHP user must be able to write there. Setting 777 works (chmod -R 777 Comments). For some reason, the libxml PHP library was not enabled on PHP7 on one of my servers. Installing it fixed the issue (apt-get install php7.0-xml, reboot when completed).

  • The CSS does not load

The path of the library relative to the root of your website is probably incorrect. Make sure it matches with the value in settings.php. By default, it is /lib/Interact.

  • I am getting reCAPTCHA errors even after checking the box

You need to make sure that your reCAPTACHA public and secret keys are correct. Interact uses reCAPTCHA v2. More info at

Future features

  • A simple admin interface to manage comments (Work In Progress)
  • A tag to identify the admin (Work In Progress)

Author: Charles Grassin

What is on your mind?

  • #1 leo


    on April 11 2019, 2:39

  • #2

    Simple and useful 测试中文

    on April 11 2019, 2:44

  • #3 Charles

    Test comment:
    This is a Markdown syntax test.
    Markdown is bad.
    [MD XSS](javascript:alert("xss"))
    <script>alert("XSS test!");</script>

    on May 12 2019, 2:57

  • #4 dfaff


    on July 31 2019, 5:28

  • #5 DaAds


    on August 5 2019, 18:01

  • #6 Aaa


    on August 6 2019, 11:21

  • #7 Vlad


    on August 11 2019, 14:15

  • #8 hghgh


    on August 30 2019, 3:02

  • #9 ggggggggggggggggg


    on August 30 2019, 3:03

  • #10 ,iş,ş


    on December 10 2019, 16:16

  • #11 Wsad


    on December 14 2019, 16:33

  • #12 :kn


    on December 17 2019, 16:55

  • #13 lkj


    on December 17 2019, 16:55

  • #14 Tester

    Some random test!

    on March 5 2020, 21:38

  • #15 Rob


    on March 26 2020, 12:05

  • #16 Tester


    on April 7 2020, 10:26

  • #17 Tester


    on April 7 2020, 10:28

  • #18 NotARussianSpy

    Strike through -doesn't work-

    on October 27 2020, 16:13

  • #19 strikethrough

    - test -

    on October 27 2020, 16:15

  • #20 Charles


    on April 16 2021, 22:01

  Back to projects

Related articles