seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

Doesn't work directly on windows with Xampp #419

Closed davidjimenez75 closed 5 years ago

davidjimenez75 commented 5 years ago

When deploying COPS with Git on Windows Xampp visually doesn`t work OK

The bug is in the LINE:94 of the FILE: vendor\seblucas\dot-php\doT.php

An @ must be added to COPS works OK,

        return @create_function ('$it', $func);
mikrofree commented 5 years ago

Bonjour,

Merci davidjimenez75 pour l'information

Je confirme qu'en ajoutant @, il n'y a plus de problème d'affichage. Je suis hébergé chez O2Switch, php7.3 (avec php7.2, le problème d'affichage n'existait pas). J'ai également corrigé dans le fichier index.php le "deprecated" comme préconisé par seblucas Cordialement Pascal

Hello,

Thank you davidjimenez75 for the information

I confirm that by adding @, there is no more display problem. I am hosted by O2Switch, php7.3 (with php7.2 the display problem did not exist). I also corrected in the index.php file the "deprecated" as recommended by seblucas Sincerely Pascal

horus68 commented 5 years ago

Fix working fine with PHP 7.3.6 (also tested with PHP 5.5.12)

seblucas commented 5 years ago

should be fixed

davidjimenez75 commented 5 years ago

Working OK with Xampp 7.3.6 (Needs to be manually enabled "extension=intl" in php.ini)

cd \xampp\htdocs\cops\
composer global require "fxp/composer-asset-plugin:~1.1"
composer install --no-dev --optimize-autoloader
rc-ops commented 3 years ago

Hi. I'm using XAMPP 8.0.6 on Windows 10 and even though I have:

Check if PHP version is correct OK (8.0.6) Check if GD is properly installed and loaded OK Check if Sqlite is properly installed and loaded OK Check if libxml is properly installed and loaded OK Check if Json is properly installed and loaded OK Check if mbstring is properly installed and loaded OK Check if intl is properly installed and loaded OK Check if Normalizer class is properly installed and loaded OK Check if the rendering will be done on client side or server side Client side rendering Check if Calibre database path is not an URL OK Check if Calibre database file exists and is readable OK Check if Calibre database file can be opened with PHP OK Check if Calibre database file contains at least some of the needed tables OK

When I try to access the localhost/cops/ I get

Fatal error: Uncaught Error: Call to undefined function create_function() in C:\xampp\htdocs\cops\vendor\seblucas\dot-php\doT.php:94 Stack trace: #0 C:\xampp\htdocs\cops\index.php(53): doT->template('<!DOCTYPE html>...', NULL) #1 {main} thrown in C:\xampp\htdocs\cops\vendor\seblucas\dot-php\doT.php on line 94