Topic: Uploader not working properly on local server

I have purchased SVmanager and Simpleviewer Pro.  I am very happy with both products and have them working perfectly on my web host's server.

My issue is with Uploader on my local server. I am running Apache on a windows machine with the most current JAVA download.  My server passed all the tests with SVMtest. However, in both SVMtest and SVmanager the Uploader returns an error. Images are getting  uploaded to the gallery but when I "view"  the gallery I get a directory listing. I can then select the file I want from the listing and the gallery displays exactly now I expect it to.  When I go to "sort",  the images are listed  by name  but they are not displayed as thumbnails.

My guess is that I have a setting somewhere that needs a tweak.  The error details that are displayed upon "upload" are as follows: 


Java Plug-in 1.6.0_15
Using JRE version 1.6.0-oem-b104 Java HotSpot(TM) Client VM
User home directory = C:\Users\Ken
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


MyUploader Source Code Edition version 1.12.2
© Copyright JavaAtWork B.V. 2005-2009. All rights reserved.


Reading certificates from 11 http://localhost:8080/svmanager/uploader/labels.jar | C:\Users\Ken\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\58\232690fa-3ece33e4.idx
Sep 2, 2009 10:11:57 PM - HTTPUploadTask - upload() - HTTP/1.1 200 OK

exception: No JVM to relaunch applet.
java.lang.Exception: No JVM to relaunch applet
    at sun.plugin2.main.client.PluginMain$StartAppletListener.appletSSVValidation(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.fireAppletSSVValidation(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.lang.Exception: No JVM to relaunch applet

Thanks for taking a look at this.

Re: Uploader not working properly on local server

Well I guess the clue is in "exception: No JVM to relaunch applet." which seems to point to some problem with the Java installation but that's as far as my very limited Java knowledge takes me. I've only once had problems with Java on my Windows test machine and I fixed them by cleaning out all the old installations of Java and re-installing the latest.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Uploader not working properly on local server

Hi Jack,

Thanks for your help. My error message  may have been a red herring. I cleaned out Java - no small feat to get rid of all of it. I then successfully uploaded the newest version of JAVA. Once I had JAVA behaving properly the error message disappeared.

So my problem remains that on my local server I can not see the thumbs in SVmanager.  In "images" I get the correct screen  but the thumbs are represented   by name and not as an image. In "sort" I get the correct page  but the word thumb shows up for each image.  In "view" I get a file listing of svmanager/g1. From the file listing l simply click on the file and the gallery views just fine.   

Is there a setting to display thumbs  that I need to change? As I said earlier  this problem does not exist on my web host's server.

Thanks again for your help.

Re: Uploader not working properly on local server

Well at least we are out of the murky world of Java error messages.

The second issue – file listing rather than going to the gallery – is probably caused by a configuration setting on your server. The svManager 'View' link goes to the directory not to the index.php file inside it. Most servers are set-up to serve index.html first then index.php or index.asp and maybe others. For the Apache setting see this web page.

I can't see an obvious reason why thumbnails should be ok in SimpleViewer itself but not in svManager. Try doing a View > Source on (say) the images page of svManager and looking at the line that loads one of the thumbnails. I'd expect to see something like this:

<td class="ilthumbnail"><a href="g2/images/IMG_0498.jpg" rel="external"><img src="g2/thumbs/IMG_0498.jpg" width="65" height="65" alt="" /></a></td>

In the code on your server, does the src attribute make sense? Does the corresponding thumbnail file exist?

jack

Jack Hardie
SimpleViewer Support Team.

Re: Uploader not working properly on local server

Hi Jack,

We are making great  progress. The Apache link provided the answer to solve the "view" issue. I added index.php to my directory index directive and I now go directly to the gallery - thanks.

I have more clues for the thumbnail display issue. I discovered that if I browse with IE  the thumbs display properly in "sort"  and "images". If I browse with Firefox they do not display properly. I viewed the source as you suggested and found the following:

<td class="ilthumbnail"><a href="g4/images/0005.jpg" rel="external"><img src="g4\thumbs\0005.jpg" width="65" height="65" alt="" /></a></td>

As you can see, the slashes in the src attribute are all back slashes.  I searched the net to discover that IE will accept the "\"  but FF plays by the rules and does not recognize  "\" as part of a valid path to my image.   So now all I need to know is why am I getting  "\" and how do I get the required "/" in the src path.  I  make another gallery and  once again the src contained  "\".     

Thanks again

Re: Uploader not working properly on local server

Aha – the vital clue!

I think I can see what's happening now. I need to think this one through – could be two or three days before I can find the time but I'll get back to you as soon as I can.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Uploader not working properly on local server

It's a fairly simple code change to get rid of the backslashes. I'll put it into the next release of svManager but in the meantime here's how to fix it for yourself.

Locate the following files:
svmanager/classes/sortpage.php
svmanager/plugins/autoviewer/svimagespage.php
svmanager/plugins/postcardviewer/pvimages.php
svmanager/plugins/simpleviewer/svimages.php
svmanager/plugins/tiltviewer/tvimages.php

In each of these files, look at line 60 or thereabouts and find the following line of code:

$src = $gallery->getThumbPathRelSvm().$fileName;

Change this to:

$src = str_replace('\\', '/', $gallery->getThumbPathRelSvm().$fileName);

If you don't want to do the changes yourself then let me know and I'll email you a patch.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Uploader not working properly on local server

Hi Jack,

Thank you so much for all your help.  Everything is now working properly. I am very happy with your products.