VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: android2k on April 29, 2012, 22:28:08 PM

Title: vmError: Couldnt create thumb, file not found...
Post by: android2k on April 29, 2012, 22:28:08 PM
Hi everybody...

IIS 7.5 with FastCGI over Win2008 Server STD R2
PHP 5.2.17
MySQL 5.0.51a

I'm trying to install a fresh new copy of VirtueMart 2.0.6 over a Joom 2.5.4.
Started with VM and added sample data, than I installed the AIO package, everything ended without errors.
When I get into the backend of my shop I can't find any image, nor the simple icons of the market nor the images and the thumbnails of the sample products.

If I try to open the media link into the menu I receive a lot of reds:
vmError: Couldnt create thumb, file not found [my url]\images\stories\virtuemart\category\fc2f001413876a374484df36ed9cf775.jpg
but for real, into the above folder I can only find the file fc2f001413876a374484d, the rightest portion of the file name is missing, and so on for all the jpg files in these folders.
I checked obviously my GD engine, but it's working correctly, as reported by a phpinfo(). In any case I use it in many other sites with image galleries.
I checked permissions and other system problems, but after three days of brain storming, and having found nothing here in the forum or in google, here I am asking fou your support.

I tried to delete everything and reinstall multiple times, double checking any possible mistake, with no success.

If I manually change the truncated file name, simply adding the .jpg extension, it coul be correctly opened as an image, than I presume the problem is only with the file name lenght.
I tried with and without seo and sef, I tried installing via different browsers (chrome, IE 9 and firefox) with the same results.

I'm working on a develop server at my office, it is an accurate cloned situation of my farm servers, in order to be able to move all my new sites in a production environment after heavy local debug. Local sites are addressed via UNC, not IP, registering their names with hosts file and DNS entries on the server itself.

Tried also disabling antivirus or other potencial external causes.

Please help. Many thanks for your time...
Roberto from italy
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Milbo on May 01, 2012, 12:59:55 PM
Really an interesting thing. I think it has something todo with your server. For example:
[my url]\images\stories\virtuemart\category\fc2f001413876a374484df36ed9cf775.jpg

should never happen. Backslashes are used on windows machines for a path. But with an URL it should use slashes. Maybe your whole path is just too long.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: android2k on May 03, 2012, 16:03:43 PM
first of all, many thanks for your replay
about path... my mistake, obviously the slash IS a slash, not a backslash. I miswritten them while writing the thread.
I went over further investigation...
I tried to install VM 2.x over Joomla 1.5, same results
I tried to install VM 1.x over joomla 2.5, same results
If I only add manually the .jpg extension to any of these file, when I try to reach it directly within the browser, it opens, and I see the image
If I install VM 2 over J2.5 without adding the sample data everithing goes right, when I add manually categories and products, and related images, everyting goes right.

The usual installation process, while adding VM sample data, writes the correct values inside the database (complete path, name and extensions) but the related filenames result all truncated within the destination folders... some at 19th char, some at 20th and some att 22nd... no jpg extension at all.

I was looking for an error into the installation script of VM, but I'm proned to think that the problem resides alesewhere, becouse noone but me reported the problem (at least for what I could find out googlin' around).

No log errors, no clues to investigate on... it's driving me crazy :)

At the moment I'm installing a brand new 2008 server R2 into a virtualbox, in order to work on a fresh and clean situation, even if I cannot figure out what to look for
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: android2k on May 03, 2012, 16:12:18 PM
sorry, I was so happy to read about you that I forgot to reply adeguately to your suggestion.
I checked the path/filename lenght, it's far form being too long, if I add manually let's say 30 more chars to the jpg filename and than I try to show it by browser, writing down the whole string, it opens with no problem.
If I copy the filename written into the database, and I use it to correct the truncated filename, it comes back to show correctly into VM.

PS: be patient with my poor english :)
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: aiksoon on May 14, 2012, 17:02:32 PM
Hi, may I know is this issue solve?? I also face the same situation like this.
All the testing I also have done as here (ie uninstall and re-install, test on various browser)

If solve, kindly explain in more detail how it being solve?
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Milbo on May 14, 2012, 23:41:08 PM
One of our testers had it also, but only one day and we were not able to reproduce it. Sorry no clue atm.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: android2k on May 15, 2012, 11:50:57 AM
Forgive me for my delay in answering, I was abroad for my job.
I spent some more time investigating the problem, and I got to the conclusion that the problem resides into the sql script used to install AIO plugins.
If I install all but the samples data, everything goes right, and any further operation within VM works correctly, either with J1.5 or J2.5.
Only if I try to install sample data during the first fresh install, the problem appears. Possibly it's a curious combination of PHP/MySQL version, in conjuction with a peculiar version of Windows IIS and his subsequent updates (who really knows what mother Microsoft gave us while receiving updates?:))
I tried to install in a Sun virtualbox on my PC, with a 2003 server SPK2 with IIS 6 and everything went good, even with sample data...
I got crazy, expecially becouse I faced the problem while creating a new customer web site, with short time to put the shop online (like often happens) and I didn't want to start in a wrong way.
Anyway, finally I decided to rely on VM2 over J2.5 in any case, and everything appear to be ok at the moment.
But I don't give up, I feel the urge to clear out where the real problem hides, and I'll report to you my tests and results asap .
Many thanks for your  time, take care...
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Milbo on May 16, 2012, 00:26:38 AM
Thanks to you for your good report, too. :-)
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Margriet on June 04, 2012, 12:38:06 PM
I am having exactly the same. Joomla 2.5.4 with VM 2.0.6 on local host using xampp 1.7.3. On installing sample data filenames are shortened in folder. As I had another testsite (started with older VM version - 2.0.2 I think) I copied the images files to the folder on the new testsite and then it was just OK. So it used to work with older versions, but apparently there has be some code change later on.


[attachment cleanup by admin]
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: android2k on June 04, 2012, 15:50:04 PM
after many painful research I hadn't find any explanation.
For sure, if I install everything under a 32 bit OS I face no problem. I tried with a brand new Win7 pro 32 installed in a SUN virtuabox, with IIS 7.5 and all his updates, FastCGI, php 5.2.17 and mysql 5.1.63. My Host PC has Win 7 Ultimate, no problem at all. Than I tried on a brand new PC with a Win7 64 Pro, same set of software... No problem at all.
With my develop server Win 2008 std R2, it won't work.
I investigated the firewall, ras services, any other possible interaction, but it won't work.
Though, I made a full backup, formatted and reinstalled the server form scratch, a couple of days of wasted job... c**p, it won't work :).
I really cannot figure out what the matter could be, of course the client OS is implicitely more simple than the server one, but at the end of the story, wouldn't it run an IIS service, pure and simple?
The only possible external cause could be the database version, even if I've no other clues of differences or malfunctions between the 32 and the 64 bit versions of the release I use to manage, as a matter of fact something different HAS to be in there.
I accepted a compromise, I installed a fresh situation over a 32 bit system, than I moved it (site and DB) over the 64 one, IT WORKS, for Gates sake!
Sorry for my being useless (I feel this as a defeat), and thanks for your time and support.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Thomas Kuschel on June 11, 2012, 21:43:20 PM
Hi,
I have exact the same situation as Margriet here. The file names are cut at length 22.
root@black:/var/www/joomla/images/stories/virtuemart/category# ls -la
insgesamt 24
drwxr-xr-x 1 www-data www-data  210 Jun 11 21:12 .
drwxr-xr-x 1 www-data www-data  146 Jun 11 21:12 ..
-rw-r--r-- 1 www-data www-data 3470 Jun 11 21:12 1b0c96d67abdbea648cd0e
-rw-r--r-- 1 www-data www-data 4488 Jun 11 21:12 756ff6d140e11079caf569
-rw-r--r-- 1 www-data www-data 1930 Jun 11 21:12 fc2f001413876a374484df
-rw-r--r-- 1 www-data www-data 4903 Jun 11 21:12 fe2f63f4c46023e3b33404
-rw-r--r-- 1 www-data www-data    0 Jun 11 21:12 index.html
drwxr-xr-x 1 www-data www-data   20 Jun 11 21:12 resized
root@black:/var/www/joomla/images/stories/virtuemart/category#

System: linux debian 3.2.0-2-amd64 core
Joomla 2.5.4
VM 2.0.7.e without ext_aio package installed
php  5.3.10-2 (cli)
mysql  Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (x86_64) using readline 6.2

I'll try to debug it - or did anybody found the bug yet?

Thomas
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Thomas Kuschel on June 11, 2012, 23:14:26 PM
Hi all,  good and bad news:
I just found out, that the VM installation script is okay. The bug is within Joomla 2.5 installation procedure.
Description: Within my fresh installation of VM 2.0.7.e the whole directory (see file virtuemart.xml) <folder>assets</folder> should been copied, but I got the following subdirectory after installation process in the backend, e.g.:
root@black:/var/www/j25/administrator/components/com_virtuemart/assets/images/vmsampleimages/category# ls -la
insgesamt 24
drwxr-xr-x 1 www-data www-data  210 Jun 11 22:54 .
drwxr-xr-x 1 www-data www-data   86 Jun 11 22:54 ..
-rw-r--r-- 1 www-data www-data 3470 Jun 11 22:54 1b0c96d67abdbea648cd0e
-rw-r--r-- 1 www-data www-data 4488 Jun 11 22:54 756ff6d140e11079caf569
-rw-r--r-- 1 www-data www-data 1930 Jun 11 22:54 fc2f001413876a374484df
-rw-r--r-- 1 www-data www-data 4903 Jun 11 22:54 fe2f63f4c46023e3b33404
-rw-r--r-- 1 www-data www-data    0 Jun 11 22:54 index.html
drwxr-xr-x 1 www-data www-data   20 Jun 11 22:54 resized
root@black:/var/www/j25/administrator/components/com_virtuemart/assets/images/vmsampleimages/category#


Regards, Thomas.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Thomas Kuschel on June 12, 2012, 16:24:50 PM
Hi,
I've tested Joomla with the attached files, and only the tar.gz archive creates problems!
So I digged into the code of Joomla...
The class JArchiveTar within libraries/joomla/filesystem/archive/tar.php causes the bug!
The method protected function _getTarInfo(& $data) computes clipped file names.
The file name is hold inside the tar archive, read out into $this->_metadata[]->name, but cut off.
In this method, @unpack is called, which delivers that cut-off file name at length = 100.
The function "unpack" is a php function (here of standard v.5.3.2) of class __PHP_Incomplete_Class

Conclusion: This failure appears with
PHP 5.3.10-2 (cli) (built: Feb 20 2012 19:39:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Linux Debian 3.2.0-2-amd64 #1 SMP Sun Mar 4 22:48:17 UTC 2012 x86_64 GNU/Linux
Workaround: Either make shorter file names / paths, or use archive type zip.

Regards Thomas

If you are affected with this behavior, please tell me your php version and  operating system.

[attachment cleanup by admin]
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: majkee on July 07, 2012, 11:31:55 AM
Unfortunately it does not seems that it would be related only to tar.gz archives.
I have downloaded current version of VM (2.0.8c) in com_virtuemart.2.0.8c_extract_first.zip file.

After extraction, I get two files:
Quotecom_virtuemart.2.0.8c.zip
com_virtuemart.2.0.8c_ext_aio.zip

As you can see, they are zipped, not tared.

Both were installed properly as previous users above me described, and the result is exactly the same. Product image filenames are truncated without file suffix. In the backoffice on attempt to edit any product (installed sample e.g. "drill" ), standard error message appears stating, that it was not possible to create a thumbnail.

QuoteC:\xampp\htdocs\254\images\stories\virtuemart\product\480655b410d98a5cc3bef3927e786866.jpg

on Product images tab, there is a path to the image in correct format (means slashes instead of backslahes)
Quoteimages/stories/virtuemart/product/480655b410d98a5cc3bef3927e786866.jpg
.  - again, the filename is truncated in this folder
Quote480655b410d98a5cc3bef3.jpg

I am just wondering if the path that leads to Joomla's images is correct. If not, is there any general settings that will change it at once?

As you can see, I run Joomla 2.5.4 on XAMPP:
XAMPP v. 5.3.1 that runs on W7 and is supported by
MySQL v. 5.1.4.1 that was installed together with
Apache v. 2.2.14 by XAMPP.

I use this platform already several years for Joomla based e-shops and pages, yet until now I did not experienced such behavior.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Thomas Kuschel on July 07, 2012, 21:27:43 PM
Strange information about your system: latest version for XAMPP (windows) on SourceForge is 1.7.7, ???
It is, IMHO, the PHP, not the Virtuemart which causes that on the whole, see above.
You have to tell me your PHP version of your system, is it a 64 or 32 bit compiled php Version, windows 64/32 Version ??  - So I could analyze the bug within PHP and ZIP format. (Possibly fixed on newer PHP)
Hint: I found an online tool testing code snippets on 70+ different PHP versions! - Have a look at http://3v4l.org/ (it's really cooool!= ;-)

@ VM Team: thank you for offering zip format and trimmed file names as well. Doesn't it make more sense to shorten those painfully long file names? (already done in VM 2.0.8c) - but recurse_copy doesn't work here (soft-linked directories) - I am still debugging now! - Please wait - I'll post again soon.

I wish you a pleasant weekend,
Thomas.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: majkee on July 08, 2012, 00:51:53 AM
Now I see, my fault. I am using XAMPP 1.7.3
Also to your query about the system, yes it is W7 Professional 64b build 7601, SP1 .

An information about the version of PHP and MySQL were taken from phpinfo and phpmyadmin linked from XAMPP web administration:

the version of PHP is 5.3.1 (it was bundled with XAMPP, so I did no manual compilation or any sort of customization)
and the version of MySQL is 5.1.41

Therefore, now it should be accurate.

Still, do you think that XAMPP v. 1.7.3 can cause such behavior?
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: Milbo on July 10, 2012, 00:42:38 AM
2.0.8 has also shorter and normal filenames and should not have this issue anylonger with the sample data.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: kasteg on November 19, 2012, 19:46:38 PM
hello everyone

i`ve aslo had issue, that looked like this. my pictures wasn`t showing in product template in admin part on virtuemart.
ass for me sollution was simply renaming picture file:  123.JPG to 123.jpg. i mean that at first i had shifted extension, after down-shifting it, everything works.
Title: Re: vmError: Couldnt create thumb, file not found...
Post by: bytelord on November 19, 2012, 19:48:13 PM
@kasteg

vm version? Joomla? PHP?