Page 4 of 5

Re: [1.4.0] Image File Upload Manager

Posted: Tue Jan 26, 2010 7:57 pm
by daysgonebyantiques
Still scratching my head though--I did take some of the pictures with this same camera and they worked fine with 1.34..is there a setting somewhere in 1.4 that will show pictures in the image manager if they have an upper case extension? Having to go in and change them to lower case is a real pain in the butt.

Re: [1.4.0] Image File Upload Manager

Posted: Tue Jan 26, 2010 9:49 pm
by dbstr
daysgonebyantiques wrote:Still scratching my head though--I did take some of the pictures with this same camera and they worked fine with 1.34..is there a setting somewhere in 1.4 that will show pictures in the image manager if they have an upper case extension? Having to go in and change them to lower case is a real pain in the butt.
Uhm, a quick fix would be to open and edit admin/controller/common/filemanager.php

at line ~84, find

Code: Select all

$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif}', GLOB_BRACE);  
and replace with

Code: Select all

$files = glob(rtrim($directory, '/') . '/*.{JPG,jpg,jpeg,png,gif}', GLOB_BRACE); 

Re: [1.4.0] Image File Upload Manager

Posted: Wed Jan 27, 2010 8:12 am
by daysgonebyantiques
Ohhhhhh...

That's that globby GLOB_ thing I saw in a thread somewhere. Didn't know what in the world that was so I went on past it. Now I know. :o

Re: [1.4.0] Image File Upload Manager

Posted: Wed Jan 27, 2010 10:40 am
by daysgonebyantiques
OK well now NOTHING is showing up in the image manager at all. I made sure all my images were put in /image/data and had the right file extensions, lowercase .jpg instead of uppercase .JPG. It's getting worse, not better.

Re: [1.4.0] Image File Upload Manager

Posted: Mon Feb 01, 2010 3:14 am
by soul
The .JPG to .jpg fixed it for me, thanks for finding that. I've been using OpenCart for a while but recently got a clean install and had the same prob as everyone else - all the images were appearing except for my newly uploaded images. Turns out they were all "JPG"s. When I changed the file (manually via FTP) to lowercase jpg it appeared in the image manager. Hope that helps others (and should probably be patched in the core).

Re: [1.4.0] Image File Upload Manager

Posted: Mon Feb 01, 2010 3:23 am
by soul
Argh, categories won't save now. Guess i'll search the forums for a fix. I have to say that 1.3.4 was much more stable - I'd advise people that haven't upgraded to stick with the old version for a while, 1.4 wasn't quite ready to come out of the oven. Thanks for all your work though Daniel, very much appreciated.

UPDATE: got that fixed by deleting the German language pack (found solution on another thread)

Re: [1.4.0] Image File Upload Manager

Posted: Mon Feb 01, 2010 4:54 am
by Daniel
daysgonebyantiques wrote:OK well now NOTHING is showing up in the image manager at all. I made sure all my images were put in /image/data and had the right file extensions, lowercase .jpg instead of uppercase .JPG. It's getting worse, not better.
try lowing the number of images you have in each folder.

Re: [1.4.0] Image File Upload Manager

Posted: Mon Feb 01, 2010 6:42 pm
by GameKeyCenter
Well my Image Manager is still not working. All my images are in lowercase jpg and I have no more than 10 images in the image and data folders. I've pretty much given up at this point.

Re: [1.4.0] Image File Upload Manager

Posted: Mon Feb 01, 2010 8:37 pm
by readyman
Someone PM me their FTP details so I can look directly at the problem. If you are on SolarisOS, then even better. You noobs are going round in circles & no one has posted any specific server information that would give us any idea to help your problem.

Learn this... and let's meet halfway
Put this code in a blank test.php file and run it

Code: Select all

<?php phpinfo(); ?>
Most of the time, you will get a nicely formatted layout of all your PHP settings... then "we" can look at those details to see if there is anything "wrong" with your PHP/server/paths/setup.

If you get nothing, then your host disabled the PHP information - you'll definitely need to ask a professional, or wait for a solution to be posted.

Re: [1.4.0] Image File Upload Manager

Posted: Thu Feb 11, 2010 10:15 pm
by newyorker
I had two problems:
1. No images were being displayed
2. Couldn't upload upload any images
I traced both problems to the following:
By default the images are sored in the following directory/path
\image\cache\data
(note the missing s in image this is correct not a typo it is image)
on my install this folder needed the permissions changed, I couldn't be bothered experimenting so I changed it to 777, just to be safe I changed all directories inthis path to 777

This folder isn't mentioned in the install instructions

Now everything is working OK for me, I hope this helps

Alan

Re: [1.4.0] Image File Upload Manager

Posted: Sun Feb 14, 2010 8:03 am
by mikej
Readyman (and anyone else who can help),

Below are my php details from the test.php file I created. I have tried EVERY "solution" in this forum and can still not get anything to work. In IE7 it won't even let me click on any of the buttons in the image manager. Firefox and chrome it tells me the photo was uploaded, but the image does not appear in the image manager. I can create a folder in image manager and find the folder using Filezilla, but can't find the image. My permission settings are all set to 0777 for the folders for image manager. Any help would greatly greatly be appreciated. I am using 1and1 as my host. Thanks.

PHP Version 5.2.12

System Linux infong 2.4 #1 SMP Wed Nov 4 21:12:12 UTC 2009 i686 GNU/Linux
Build Date Dec 28 2009 09:10:43
Configure Command '../configure' '--program-suffix=5' '--with-pear=/usr/lib/php5' '--with-config-file-path=/usr/lib/php5' '--with-mysqli' '--with-kerberos' '--with-imap-ssl' '--enable-soap' '--with-xsl' '--enable-mbstring=all' '--with-curl' '--with-mcrypt' '--with-gd' '--with-pdo-mysql' '--with-freetype-dir' '--with-libxml-dir' '--with-mysql' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-png-dir' '--enable-track-vars' '--with-db' '--with-gdbm' '--enable-force-cgi-redirect' '--with-ttf' '--enable-ftp' '--enable-dbase' '--enable-memory-limit' '--enable-calendar' '--enable-wddx' '--with-jpeg-dir=/usr/src/kundenserver/jpeg-6b' '--enable-bcmath' '--enable-gd-imgstrttf' '--enable-shmop' '--enable-mhash' '--with-mhash' '--with-openssl' '--enable-xslt' '--with-xslt-sablot' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--with-imap' '--with-iconv' '--with-bz2' '--with-gettext' '--enable-exif' '--with-idn' '--with-sqlite' '--enable-sqlite-utf8' '--enable-zip' '--with-tidy'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/lib/php5
Loaded Configuration File /usr/lib/php5/php.ini
Scan this dir for additional .ini files (none)
additional .ini files parsed (none)
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, data, http, ftp, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed

Re: [1.4.0] Image File Upload Manager

Posted: Tue Feb 16, 2010 9:25 am
by mikej
**UPDATE**
I can now upload images and create directories on FireFox using a FRESH INSTALL. I am still unable to get the images to upload using an opencart with an updated version from 1.3.2 to 1.4.0. So maybe it is an issue when updating opencart. However, I get the below error opening up File manager using IE7 ( in either both fresh install AND updated version). None of the buttons work. You click on any of the buttons in the file mananger it is like you are clicking on a image with no link. Any ideas on this? It happens on any computer I am using IE7 on. I have tried friends computer's, work computer's etc. So it isn't any settings in IE7

Line: 131
Char: 4
Error: Expected identifier, string or number
Code: 0
URL: onlineshop/admin/index.php?

Re: [1.4.0] Image File Upload Manager

Posted: Fri Feb 19, 2010 2:55 am
by abs
Hi there,
I've got the same problem. There are no images displayed in the File Manager...
Seems my provider got no support for glob_brace - see attached log:
2010-02-18 18:37:46 - PHP Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /mnt/web8/20/58/51864658/htdocs/shop/admin/controller/common/filemanager.php on line 84
2010-02-18 18:37:46 - PHP Warning: glob() expects parameter 2 to be long, string given in /mnt/web8/20/58/51864658/htdocs/shop/admin/controller/common/filemanager.php on line 84
2010-02-18 18:37:46 - PHP Warning: Invalid argument supplied for foreach() in /mnt/web8/20/58/51864658/htdocs/shop/admin/controller/common/filemanager.php on line 86
Is there an existing workaround for this? I've checked the latest sources but theres no filemanager.php file in /admin/controller/common/...

Regards
Andi

Re: [1.4.0] Image File Upload Manager

Posted: Sat Feb 20, 2010 12:42 am
by Microsite Merchant
I don't know if this is valid (because these image sizes are ridiculous for a website) but I only have a problem if the images are bigger than about 500 or 600MB. I suspect that the number of images in a directory plays a part too. I uploaded an image of over 700MB and couldn't see it in Image Manager and when I reduced the size to 300MB it miraculously appeared without renaming it or changing the case of the file extension (it was already .jpg) ???

Re: [1.4.0] File Upload Manager

Posted: Sun Feb 21, 2010 10:57 pm
by eka7a
neschalk wrote:Problem still exists on this end. Seems images upload just fine. getting them to display is more the issue at this point. I've traced this back to the glob_brace flag not working on solaris.

filemanager.php (line 84)

$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif}', GLOB_BRACE);

is there a way to produce the array without glob_brace? or possibly just a replacement line to look for all files to make sure I'm not missing something else?
admin/controller/common/filemanager.php dosyasının 84.line find

Code: Select all

$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif}', GLOB_BRACE);
replace

Code: Select all

$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
quote by ahmet_helvaci: http://www.opencart-tr.com/viewtopic.ph ... 496&p=2249

Re: [1.4.0] Image File Upload Manager

Posted: Wed Feb 24, 2010 7:56 pm
by christopherdarling
I kept getting the warning please select file error but checked phpinfo and my upload_max_size was set to 2M try increasing this. This sorted the problem for me

Re: [1.4.0] Image File Upload Manager

Posted: Fri Feb 26, 2010 3:35 am
by neschalk
Re: [1.4.0] File Upload Manager

Postby eka7a » Sun Feb 21, 2010 2:57 pm

admin/controller/common/filemanager.php dosyasının 84.line find
Code: Select all
$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif}', GLOB_BRACE);
replace
Code: Select all
$files = glob(rtrim($directory, '/') . '/*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
eka7a, you missed the point entirely. 'GLOB_BRACE' does not function on Older versions of Solaris. you can't replace it with something that still uses it. This is not a case-sensitive extension problem for some of us.

UPDATE: Awesome job Daniel on the clean fix for this! Version 1.4.1 displays images in the file manager for this system. For anyone that has problems with the filemanager,(chmod or .Ext) test out the 1.4.1 version before posting your issues and patiently wait for the official update. (and those that post solutions, be sure to read what the problem is before making threads longer needlessly.)

Re: [1.4.0] Image File Upload Manager

Posted: Sat Feb 27, 2010 12:50 am
by ppol
To fix the IE filemanager problem (not show images), edit de filamanger.tpl file (admin/view/template/common/filamanger.tpl).
In line 130, change this:

Code: Select all

valid_children : 'all',
}
for this:

Code: Select all

valid_children : 'all'
}
Works for me!
(sorry for my bad english)

Re: [1.4.0] Image File Upload Manager

Posted: Thu Mar 04, 2010 6:04 am
by DaCrash
in my case I insered another function into the filemanager wich gets the files in a different way, without glob and GLOB_BRACE...

admin/controller/common/filemanager.php

see the file in the appendix

Re: [1.4.0] Image File Upload Manager

Posted: Fri Mar 05, 2010 6:05 am
by mondzo
Ok, my problem is:

I have 2 languages set up in OC 1.4.0 -> english and slovak.

For example product edit:
english tab -> I tried to add the image through editor and filemanager, I can select the image and all works OK
slovak tab -> all is working OK, I can see the dirs and images but I can not select the image from the filemanager back to editor

It seems that there is a problem when you have more than one language installed. Any solution for this?