Closed mittus closed 6 years ago
Thanks for reporting. Could you please separate these issues? thx
ready :)
I have tested nginx, there are some issues here, so using ItemManager with nginx is currently not recommended. Thank you for reporting.
Problems with read index.php I was fix:
# fix index.php
location ~ ^/(plugins/imanager/upload/server/php)/ {
try_files $uri $uri/ /index.php?$uri&$args;
}
Other problems I can't fix. Hope that soon nginx will work. Than'k You for help!!
Here's what you could try: Change this line https://github.com/bigin/ItemManager_2.0/blob/master/imanager/upload/server/php/UploadHandler.php#L100 to 'delete_type' => 'POST',
that might solve the problem with deleting, but I'm afraid there are more things that are causing trouble.
I can access to DELETE method on nginx with this:
server {
...
dav_access user:rw group:rw all:rw;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
But if I change delete_type to POST, I have correct deleting Image.
Now I have problems only with uploading files. I see 500 Server Error and this Error in data/other/logs/errorlog.txt: [04-Sep-2018 17:54:02 Europe/Moscow] NoDecodeDelegateForThisImageFormat
JPEG' @ error/constitute.c/ReadImage/501`, then uploaded images haven't thumbnails.
The issue occurs only with PHP 5.6? With PHP 7> does the upload work, right?
Yes it's have problem only with PHP 5.6. With PHP 7 upload work!
Hmm, just tested with Ngnix and PHP 5.6 on MAMP and the upload works without problems for me. Did you get any error messages in your browser console on the item editor page before uploading?
I think it's a server configuration problem, because everything works for me, try to check your nginx error.log
No, it's a PHP error. I have install debug code to UploadHendler.php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
And get this response:
<br />
<b>Fatal error</b>: Uncaught exception 'ImagickException' with message 'NoDecodeDelegateForThisImageFormat `JPEG' @ error/constitute.c/ReadImage/501' in C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php:923
Stack trace:
#0 C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php(923): Imagick->readimage('C:/srv/home/www...')
#1 C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php(979): UploadHandler->imagick_get_image_object('C:/srv/home/www...', false)
#2 C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php(1137): UploadHandler->imagick_create_scaled_image('amt-gaz.jpg', '', Array)
#3 C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php(1162): UploadHandler->create_scaled_image('amt-gaz.jpg', '', Array)
#4 C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php in <b>C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php</b> on line <b>923</b><br />
On Nginx logs I have empty data. For reading index.php in getsimple now I use this config:
location ~* \/?$ {
try_files $uri $uri/ /index.php?id=$uri&$args;
}
This looks like that's an imagick error
imagick isn't installed properly?
Probably imagick is running without support for the image format that you're trying to open JPEG. Try other format - png for example
It's true. I have problem with imagick plugin. I will fix that. Thank you for answers!!
UPD For fix that, use similar installed ImageMagick version, and remove all *CORE_.dll** from php folder. Can download here: https://ftp.icm.edu.pl/packages/ImageMagick/binaries/
After fix in phpinfo you see this:
Thank you for reporting the issues ;-)
I was fix problem with imagick, but now have new problem ))) It actual for different images. Only with PHP 5.6
UPD. And this: <b>Warning</b>: Imagick::resizeimage() expects parameter 1 to be long, object given in <b>C:\srv\home\www\lpgroup.local\default.gs\html\plugins\imanager\upload\server\php\UploadHandler.php</b> on line <b>1025</b><br />
This problem actual, becouse $new_width
in 1019 line is an Object. Now I try fix that :)
Did this, and now it works 😆
Hmm OK, I need to check that, I may have to fix that, thx!
Now it works. Thank You!!
File upload field problems I use PHP 5.6 with nginx. With php 7 I not get first problem, but second problem is remains.