sruupl / batflat

Lightweight, fast and easy CMS for free. Bootstrap ready. https://batflat.org
MIT License
135 stars 54 forks source link

Batflat license system - The return link has been deleted or modified. #48

Closed bosmanzorz closed 4 years ago

bosmanzorz commented 5 years ago

Recently I noticed that all my batflat blogs are not working. There is an info: "Batflat license system - The return link has been deleted or modified."

There were no changes in configuration (or templates) made by me for aprox. 1 year.

I tried to google the solution but with no success.

I use the Batblog template, footer contains section:

<!-- Footer -->
    <footer>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                    <p class="copyright text-muted">
                        {$settings.footer}
                        {$bat.powered}.
                    </p>
                </div>
            </div>
        </div>
    </footer>

    {loop: $bat.footer}{$value}{/loop}

</body>

</html>

Batflat: 1.3.5, License: free PHP: 5.6.39 SQLite: 3.8.10.2

My blog: www.zakrzowek.info

Any clues?

michu2k commented 5 years ago

Hi Check if your footer is included in your template files and check if any of your PHP modules don't have any errors in the code.

bosmanzorz commented 5 years ago

I use plain vanilla Batblog template. And it worked well for more than a year.

But you are right, I checked that variable $buffer in function call public static function verifyLicense($buffer) returns only blog/index/post content. Neither footer nor sidebar is included.

I'm rookie in PHP, and have no idea what to examine next.

michu2k commented 5 years ago

Try on another server (for example localhost):

bosmanzorz commented 5 years ago

Thanks for your suggestions, michu2k, I appreciate this.

I switched to another template, didn't work. I made clean instal (backuped and deleted my content before that) and it also didn't work!

I use OVH hosting, they moved recently to another data center. Maybe that's the clue?.. I tried to switch between different PHP versions (5.5, 5.6, 7.0, 7.1, 7.2) but with no result.

michu2k commented 5 years ago

Please check if you have enabled following extensions: dom, gd, mbstring, pdo, zip, cURL

You can check in the Direct Admin in your hosting

bosmanzorz commented 5 years ago

Extensions enumerated by you are enabled ( http://zakrzowek.info/info.php )

But, following your clue, I started to switch available in OVH php configs and, after disabling PHP-FPM, it started to work!

It is strange, because phpcgi engine (PHP with no FPM support) was never selected by me before. And it worked harmless...

Many thanks for your patience and for your adveces!

michu2k commented 5 years ago

No problem, nice to see that you have solved your problem.

thomascenni commented 5 years ago

I have the same problem, but I am using PHP 7.2.5 on Windows, Batflat 1.3.5 The extensions mentioned before are enabled: gd=>gd2 zip=>bz2 cURL=>curl mbstring=>mbstring pdo=>pdo_sqlite All the predefined themes works. I have {$bat.powered} inside my HTML template. I am developing a theme in my local machine with the embedded php server (php -S localhost:8000), this could be the issue ?

michu2k commented 5 years ago

Hi @thomascenni I already tested a server with PHP 7.3.3 (Thread Safe) using php and httpd commands and everything works fine. Looks like there is a problem with your server somewhere. Check with php -m if your extensions are enabled for sure and try change extension_dir path to the direct path. If its possible check also with clear php.ini file (with required extensions).

My dir path & extensions during tests:

extension_dir = "c:\php\ext"

extension=bz2
extension=curl
extension=gd2
extension=mbstring
extension=mysqli
extension=openssl
extension=pdo_mysql
extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=sqlite3
thomascenni commented 5 years ago

Hi @michu2k, I found the issue, nothing related to the extensions that were correctly loaded. The problem is that the file "blog.html" was missing in my custom theme, and this is responsible for the error. So, if you follow the guide at https://batflat.org/docs#themes, saying that you just need 3 files:

it's not correct, because the homepage loads the "blog.html" file.

michu2k commented 5 years ago

@thomascenni Well, the documentation says correct information. You only need this 3 files (even 2 files, because you don't need preview.png) to build a simple template.