Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Newby, windows & flash, can't get i...

Anonymous
2011-02-05
2012-10-06

  • Anonymous
    2011-02-05

    Hello everyone.

    First of all, I must say your software is superb. The results on the pages
    I've seen are simply amazing.

    I'm working on a class project that requires the creation of a gigapixel
    image. I'm really excited about it, and wanted to be able to share the results
    with everyone I know.
    When I came accross IIPImage I felt I'd found just what I needed. But I'm
    having a hard time getting it to work.

    I have to say that I'm not only new to IIpImage, but also to Apache, I have no
    experience with programming, and I've never used an OS other than Windows. So,
    anything that involves compiling or advanced programming will be more of
    problem than a solution for me.

    So, the idea is to get IIPImage server running within Apache, and use the
    IIPZoom flash client (its smoothess is impressive). The problem: No image is
    shown, only a black screen with the navigation controls and credits is
    visible. I've tried it on both W7 64bit and WXPSP3 32bit machines.

    This is what I've done so far, step by step:

    -I've downloaded Apache 2.2.17 and mod_fcgid 2.3.6 from http://www.apachelounge.com/download/

    -In the Windows XPSP3 machine, I've installed the Visual C++ 2008 Redistributable Package downloaded from www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en. On the W7 machine, I've skipped this step.

    -I've unzipped the apache2 zip file to c:/apache2

    -I've copied the mod_fcgid.so included in the mod_fcgid-2.3.6-win32-x86.zip into the c:/apache2/modules folder

    -I've added the following line near the beginning of the c:/Apache2/conf/httpd.conf file:

    LoadModule fcgid_module modules/mod_fcgid.so

    -I've created the c:/Apache2/fcgi-bin folder and dropped the contents of the IIPImage server zip file from http://sourceforge.net/projects/iipimage/files/IIP%20Server/iipsrv-0.9.7/IIPImageServer-0.9.7.zip/download (I've also tried the 0.9.8 version from the downloads page)

    -I've created the file c:/Apache2/conf/extra/httpd-iipimage.conf, whith the following content:

    Settings for user home directories

    Required module: mod_fcgid

    Create a directory for the iipsrv binary

    ScriptAlias /fcgi-bin/ "C:/Apache2/fcgi-bin/"

    Set the options on that directory

    <Directory "C:="" Apache2="" fcgi-bin"="">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

    Set the module handler

    AddHandler fcgid-script .fcgi
    </Directory>

    Set our environment variables for the IIP server

    DefaultInitEnv VERBOSITY "2"
    DefaultInitEnv LOGFILE "c:/Apache2/logs/IIPImageServer.log"
    DefaultInitEnv MAX_IMAGE_CACHE_SIZE "10"
    DefaultInitEnv JPEG_QUALITY "50"
    DefaultInitEnv MAX_CVT "3000"

    Define the idle timeout as unlimited and the number of processes we want

    IdleTimeout -1

    -I've added the following lines at the end of the c:/Apache2/conf/httpd.conf file:

    <IfModule fcgid_module="">

    IIPImageServer configuration directory

    Include conf/extra/httpd-iipimage.conf
    </IfModule>

    -I've installed Apache as a service by typing httpd.exe -k install in the c:/Apache2/bin directory, inside a cmd window

    -I've run the Apachemonitor.exe, and started the Apache2.2 service

    -In firefox, I've entered the http://localhost/index.html address, and the "It works!" screen comes up

    -I've downloaded the IIPZoom flash client from http://sourceforge.net/projects/iipimage/files/IIPZoom/iipzoom-0.2.zip/download, and copied the two swf files and the provided template index.html, into the c:/Apache2/htdocs, overwriting the existing index.html

    -I've downloaded the example tiled pyramidal tiff from http://merovingio.c2rmf.cnrs.fr/iipimage/PalaisDuLouvre.tif, and put it in c:/Apache/htdoc/

    -I've edited the index.html template, to provide the path to the image, leaving it looking like this:

    <html xmlns="[http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)"> <head> <script type="text/javascript" src="[http://ajax.googleapis.com/ajax/libs/swfo bject/2.2/swfobject.js](http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swf object.js)"></script> <script type="text/javascript">

    var server = "/fcgi-bin/iipsrv.fcgi";
    var image = "/htdocs/PalaisDuLouvre.tif";
    var credit = "Credits here, 2011";
    var flashvars = {
    server: server,
    image: image,
    navigation: true,
    credit: credit
    }
    var params = {
    scale: "noscale",
    bgcolor: "#000000",
    allowfullscreen: "true",
    allowscriptaccess: "always"
    }
    swfobject.embedSWF("IIPZoom.swf", "container", "100%", "100%",
    "9.0.0","expressInstall.swf", flashvars, params);
    </script>
    <style type="text/css">
    html, body { background-color: #000; height: 100%; overflow: hidden; margin:
    0; padding: 0; }
    body { font-family: Helvetica, Arial, sans-serif; font-weight: bold; color:

    ccc; }

    container { width: 100%; height: 100%; text-align: center; }

    </style>
    </head>
    <body>


    </body>
    </html>

    -In Firefox, I go to http://localhost/index.html again, and it loads up the flash viewer, but no image is shown. The Apache monitor shows the Apache/2.2.17 (Win32) mod_fcgid/2.3.6 running.

    -I think I've done everything that was to be done, but still no luck. I've copied the image everywhere I could think of (c: root, c:/Apache2, c:/Apache2/htdocs, c:/htdocs...) in case I was doing that wrong... but nothing happens.

    -The status bar in Firefox stays on "waiting for localhost..."

    -The log file c:/Apache2/logs/IIPImageServer.log doesn't get created. I've created the file manually in case it was necessary. No content is written on it after opening the index.html, so that leads me to think the server isn't running properly. Although, if I go to http://localhost/fcgi-bin/IIPImageServer.fcgi, I do get the screen with the version of the server and the link to the project home page.

    -I've also tried other clients. The jiipview 2.05 says JIIPView.class not found, and the iipmooviewer gives back a black screen. And if I try to enter something like http://127.0.0.1/fcgi-bin/IIPImageServer.fcgi?FIF=/0.tif&WID=400&CVT=JPEG for dynamic jpeg generation, it tries to return a file called "IIPisAMadGameClosedToOurUnderstanding.netfpx". This last bit just bew my mind.

    I know I must be missing something really obvious. Any idea what I could be
    doing wrong? Thanks a lot in advance.

    Juan Mugarra

     
  • Juan, are you sure the image path is right? It needs to be the full path to
    the image, not relative to the web root. Right now it says
    "/htdocs/PalaisDuLouvre.tif", but it only works if /htdocs/ is truly as
    subfolder of the partition root. Otherwise you need to specify the full Linux-
    type path (on Windows systems excluding drive letter like c:).

     

  • Anonymous
    2011-02-07

    Hello.
    Yes, I think I got that part right. The upper is just one of my attempts. Just
    to make sure, if the image is in c:\Apache\htdocs\PalaisDuLouvre.tif, the
    supllied path should be "/Apache2/htdocs/PalaisDuLouvre.tif", right? I tried
    that, too, and no luck.
    I also created a folder called htdocs and dropped the tiff in there, just in
    case (that SHOULD do the trick with the "/htdocs/PalaisDuLouvre.tif" path,
    right?)
    If I could read the log of the image server, it would be really helpful, but
    it doesn't seem to write it anywhere, despite the fact that I did set the
    bervosity value to 2.
    I'm thinking of trying a previous version of the server, and see if that
    helps.

    By the way, I meant to create this thread in the "help" forum. Sorry about
    that.

    Thanks for you time

    Juan Mugarra

     

  • Anonymous
    2011-02-07

    PROBLEM SOLVED

    Alright! I finally got it to work!
    I was right, I missing something really obvious. The code in index.html set
    the "server" variable to "/fcgi-bin/iipsrv.fcgi", but the file is actually
    called "IIPImageServer.fcgi" in the version I got.
    After making that little change, It's all working beautifully now.
    I also moved everything to my d: partition, in case windows was doing some
    blocking on the c: drive. I don't know if that contributed to the success. I
    know setting the server variable correctly definitely did it for me.
    And now to create my own images.
    Thanks again for your time.

     
  • That reminds me I had the same naming problem when I first started :-) When it
    works it is a real joy, indeed!

     


Anonymous


Cancel   Add attachments