hernantas / MangaReader

Website to read manga locally or even on your own server
MIT License
54 stars 20 forks source link

initialization issue #71

Closed forvalak closed 7 years ago

forvalak commented 7 years ago

Dear all, I tried to install the MangaReader. I open the page http://myserver/mangareader and get a error "Can't find class "config" at "core" package." What can I do to get it work???

Thank you in advance!

hernantas commented 7 years ago

Can you send me your directory tree and inside your app/config/vendor.php? http://myserver is your local server or hosted one? And PHP version?

forvalak commented 7 years ago

I tried both Apache/2.4.23 (Unix) PHP/7.0.9 and Apache/2.2.31 (Unix) PHP/5.5.38 with the same behaviour. cat app/config/Vendor.php: <?php return [ "vendors" => [ "app", "assets", "public", "system" ] ]; ?> Please find attached the zipped directory tree.

Thank you in advance! MangaReader.zip

hernantas commented 7 years ago

Hey, could you try it with version 1.1.1? It seems that I messed up class checking. This should fix it...

forvalak commented 7 years ago

Hi, I tried the new version out, but without some effect. How could I debug?

hernantas commented 7 years ago

Basically, loadClass in common.php can't found any class in your project. It's weird tough since I never counter any issue like this. Can I have your system (OS, web server) so I can try it reproduce it in my system...

Update: I suspect it was caused by filename. In Windows, the filename is case-insensitive (like Cake and cake aren't different). On another system, it's case-sensitive. I don't notice it since I only browse files on my explorer but I notice it now since I look it at github. Now all files should be in the lower case so this should fix your issue, tell me if it isn't. Try to download it again on v1.1.1.

Update: I notice that if you download it on tags it will only give you source code but asset file like image/icon is not being downloaded (not that important tough). If this is fixed, I will provide proper download file.

forvalak commented 7 years ago

It is QNAP OS (NAS) #uname -a Linux 3.12.6 #1 SMP Thu Dec 8 04:25:13 CST 2016 x86_64 GNU/Linux Apache/2.4.23 (Unix) OpenSSL/1.0.2h PHP/7.0.9

The project is in htdocs directory.

Please let me know if I can debug or you need some information.

Thank you in advance!

hernantas commented 7 years ago

Have you tried the new v1.1.1? I updated it to latest commit...

forvalak commented 7 years ago

Yes, I did. There are mismatch with upper and lower case now. I tried to correct it and the fatal error appears: Fatal error: Call to undefined function doctype() in /share/CACHEDEV1_DATA/.qpkg/mangareader/app/layout/fresh.php on line 1

I corrected many upper/lower cases.

hernantas commented 7 years ago

Hey, I installed ubuntu and it seems that there are many issues regarding case-sensitive path. I will fix it asap and comment on this issue after it fixed. It won't take a long since it only path related issue. Sorry about this.

hernantas commented 7 years ago

Update: Just to inform you, I already fix it. It runs well on my Ubuntu server. But it still hasn't been tested enough (I only test it on common functionality like login/create account/scan/etc) so maybe it can introduce you to a new issue. But if you don't mind or want to help me test it, you can fetch it on latest develop branch.

forvalak commented 7 years ago

I cloned the repo develop and tried it out. On Apache/2.4.23 (Unix) PHP/7.0.9 will be forwardet to http://localhost/mangareader/install/database: Not Found The requested URL /mangareader/install/database was not found on this server.

On Apache/2.2.31 (Unix) PHP/5.5.38 will be forwardet to http://localhost/mangareader/install: Warning: Missing argument 1 for Core\Router::redirect(), called in /share/htdocs/mangareader/app/page/install.php on line 15 and defined in /share/htdocs/mangareader/system/core/router.php on line 109 Notice: Undefined variable: page in /share/htdocs/mangareader/system/core/router.php on line 112 Warning: Cannot modify header information - headers already sent by (output started at /share/htdocs/mangareader/system/core/router.php:109) in /share/htdocs/mangareader/system/core/router.php on line 113

I hope it is helpful information

hernantas commented 7 years ago

For PHP/7.0.9 you need to allow .htaccess to override apache like this one. This will allow friendlier URL like myserver/manga/directory || myserver/manga/my_manga instead of myserver/?manga=directory || myserver/?manga=my_manga

For PHP/5.5.38 seems to be working correctly, just redirect need parameter bug that need to be fixed. If you pull again from branch develop, I already fix it.

But for the first one, I can't do anything since it is your server configuration. Except I make this site to be able using the second type of URL which I will but not now.

forvalak commented 7 years ago

I get it running on PHP5.5.38, but following issues: can't insert a Linux path, the page always appears. If I go to scan directory I get errors: Notice: Undefined index: scanMaxPerRequest in /share/htdocs/mangareader/app/library/scan.php on line 39

Notice: Undefined index: scanMaxMangaRemoved in /share/htdocs/mangareader/app/library/scan.php on line 40

Notice: Undefined index: scanMaxChapterRemoved in /share/htdocs/mangareader/app/library/scan.php on line 41 Error: Execute query 'INSERT INTO manga_scan VALUES ' with error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 [in /share/htdocs/mangareader/app/model/scan.php at line 42] Warning: Cannot modify header information - headers already sent by (output started at /share/htdocs/mangareader/app/library/scan.php:39) in /share/htdocs/mangareader/system/core/router.php on line 114

Furthermore, no one icon will be shown only placeholder for the icons in the page.

Let me know how can I debug or help you.

Update: I get it also running on PHP7

How can I modify the manga directory? No icons in the page only placeholder.

Update: The scan works properly if something is in the directory I insert (on both server)

hernantas commented 7 years ago

To modify manga directory, there is no setting inside the website yet. There will be that feature but I want to fix some issues with config reading racing first. But you can modify it manually by going inside app/info/manga.php.

return [
    "path" => "/var/www/manga",                     // This is path to you manga directory
    "scanMaxPerRequest" => "200",                   // This is max record being processed per request
    "scanMaxMangaRemoved" => "200",                 // This is max manga record being removed
    "scanMaxChapterRemoved" => "100"                // This is max chapter record being removed
];

And for the icon, you need to fetch git lfs too. If I'm not wrong using git lfs fetch or something. I will provide better download link in the future but if this issue is fixed I will upload it immediately.

forvalak commented 7 years ago

I fetched the repo: git lfs fetch Fetching develop Git LFS: (16 of 16 files) 59.64 KB / 102.01 KB but the behaviour of the icons don't changed.

hernantas commented 7 years ago

You need to pull the data, fetch will download the files, but pull updates them in the working directory. So use git lfs pull.

forvalak commented 7 years ago

It works! Thank you very much!

Last question: which formats are supported, only pictures or also the archive formats like cbz/cbr?

hernantas commented 7 years ago

Just normal image like jpeg/png. For cbz/cbr or even zip and pdf is still on development and causing performance issue which is why I'm not including those on this project. I still want to find a better way for that without complicating thing too much like installing an extension and all of that.

But that not a priority tough since I don't really use them.

Thank you tough to debugging this with me...

forvalak commented 7 years ago

Thank you for your answer!