Windows 2K and IIS5 (I Know).....

riiser

Joined: 2002-08-16
Posts: 8
Posted: Fri, 2002-08-16 07:22

...not supported....

But ->maybe<- somebody can give me an hit of what is happening here... :smile:

This is the output running in DEBUG mode:

----[CUT]---------
Fetching Urls...
d:/bilder/DCP_1171.JPG
Processing status...

- Adding DCP_1171.JPG jpegtopnm: Can't open C:wwwrootgalleryalbumsnummer1DCP_1171_001.jpg. Errno=No such file or directory(2). pnmfile: EOF / read error reading magic number
Executing:

C:wwwrootgalleryjpegtopnm C:wwwrootgalleryalbumsnummer1DCP_1171_001.jpg | C:wwwrootgallerypnmfile --allimages

Results:
stdin: Image 0:

Error messages:

Status: 1 (expected 0)
Error: Invalid image: DCP_1171_001.jpg!
Need help? Look in the Gallery FAQ

--------[CUT]-----------

It seems that the file does not get copied to the albums directory... Doing an manual copy of the file and the cmd$ gets executed correctly...

Questions:

1. Is the copy of the file done with: function fs_copy($source, $dest) ?
1.1 If so. is the php command: $results = copy(
fs_import_filename($source, 0),
fs_import_filename($dest, 0));
responsible for doing the copy ? And how does that work ?

2. It there some more EXTENSIVE debugging available for tracing this ? Added logging ?? more options in php.ini ?

Hmmm... Im sooo eager to the this rolling so Im just about to burst.. :smile:

/Christian

----------MORE--------------
Also finding out that:

/* copy file locally */
$file = $gallery->app->tmpDir . "/photo.$name";
$od = fs_fopen($file, "wb");
if ($id &amp;&amp; $od) {
while (!feof($id)) {
fwrite($od, fread($id, 65536));
set_time_limit($gallery->app->timeLimit);
}
fclose($id);
fclose($od);
}
runs like an charm.. Making an file in the gallery temp dir according photo.blabla.jpg...
(disabled the temp delete funktion and used DIE to find this out... :smile: )

The problem seems to be rellated to moving the file to the albums dir... (strange) The only files left for me is an 0-byte galF3B.tmp file...

Now where in the world does this file get it's name ??? Hmm why ??? hmm HELP !!!!

/Christian

 
theprotege
theprotege's picture

Joined: 2002-08-16
Posts: 58
Posted: Fri, 2002-08-16 22:21

i had this same problem...only i didn't quite as far into it as you did...if anyone has a fix that would be great...i'm using another photo gallery right now but would drop it in a heartbeat for gallery!

 
CarpetBagger
CarpetBagger's picture

Joined: 2002-08-09
Posts: 49
Posted: Sat, 2002-08-17 02:39

Try reading the following ...

<!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=GalleryDocs&amp;file=index&amp;req=viewarticle&amp;artid=32" TARGET="_blank">How to get Gallery working on IIS 5.0 under Win2k</A><!-- BBCode End --> from the Other Documents section of the Gallery Site.

 
riiser

Joined: 2002-08-16
Posts: 8
Posted: Sat, 2002-08-17 09:10

Yep that document is an good one. Still all that is done.

More researching has lead me to the fs_win32.php

The file gets copied to the right place... It is the fs_exec that fails..... :sad:

Infact if doesn't fail. It runs as you can see that the jpegtopnm error message.. BUT the commandline seems to be FOOBAR. Allso I believe that there is some problems with the bashslash thinngy... Hmmm... I thinking maybe there is another way of calling the exec ?? or better. If it is possble to separate the "program" from the command line options ???Then one could make some more indepth diagnostics...

So:

1. FIle access is OK
2. Execute access is ok on BOTH the cmd.exe and the netpbm package.

Hmmm.... Tried to fool around with the " things to. But That is mainly needed if path:s are 8+ chars long... SO that did not resolve anything.... Infact... The sad thing is that looking on the error message again you can see that pnmfile allso gets run :smile:

Damn... IM sooo close.. I WANT THIS TO WORK .-)

/Christian

 
Soundy

Joined: 2002-08-19
Posts: 8
Posted: Mon, 2002-08-19 08:09

Nobody's mentioned this yet that I can see, and it doesn't seem to jive with Daniel Lewis's "How to...", but one thing I came across in searching Microsoft's Knowledge Base is that IIS 4.x and 5.x don't appear to support the POST method internally. For 4.0 specifically, Microsoft claims that MS Posting Acceptor (from NT Option Pack, now discontinud and not available) or a similar third-party product is required to enable HTTP POST support. (See article http://support.microsoft.com/default.aspx?scid=kb;en-us;Q184352).

It's always possible I'm misreading this, but this does appear to be at least part of the problem, as Gallery uses the POST method exlusively (rather than PUT, which IS supported internally in IIS).

Addendum:
Tried Daniel Lewis's suggestions... got a little closer. Got rid of the "access" complaints, but I still get these:

----------------------
Processing status...
- Adding ANGELA 001_JPG.jpg
Executing:

d:cgi-bingalleryjpegtopnm d:cgi-bingalleryalbumsalbum01ANGELA_001_JPG.jpg | d:cgi-bingallerypnmfile --allimages

Results:
none

Error messages:

Status: 128 (expected 0)
Error: Invalid image: ANGELA_001_JPG.jpg!
----------------------

Same thing happens with GIFs...

Oh, and the uploaded files don't actually appear anywhere on the destination server.

 
riiser

Joined: 2002-08-16
Posts: 8
Posted: Mon, 2002-08-19 13:00

Hmmm... The thing is..

If you look closely you will see that the jpegtopnm fileis run. allso the pnmfile program is run. BUT the problems lies around the commandline (or something) Infact. It might be that there still is some problems with the exec() of php. since the jpegtopnm commandline gets run very fine in an command-line window.. even. with the " or without.

Hmm will make an small program to save the commandline and try to run that instead of jpeg and see what happens and what actually get's sent to the commandline

/Christian

 
riiser

Joined: 2002-08-16
Posts: 8
Posted: Mon, 2002-08-19 18:23

Duh.. Im such an rookie.. This is ofcourse an security issue.. Setting the user running the web site to "administrator" makes gallery run like an charm !!! DAMN IT is sexy :smile:

SO Im stuck now finding out how/what/where MORE the internet anonymous user needs to have to get this runnning.. The IRONI is that the server is so secure I _CANT_ make it run the applications i need :smile: Ifact. I'm stuck to guessing what to enable to make the IUSR_machine account run gallery....

/Christian

 
theprotege
theprotege's picture

Joined: 2002-08-16
Posts: 58
Posted: Thu, 2002-08-22 01:54

ok i suck...

i read, and edited, and tweaked and I still can't get it to work...

******************
- Adding Bliss.jpg jpegtopnm: Can't open d:phpnukesitegalleryalbumstestBliss.jpg. Errno=No such file or directory(2). pnmfile: EOF / read error reading magic number
Executing:

d:phpnukesitegallerynetpbmjpegtopnm d:phpnukesitegalleryalbumstestBliss.jpg | d:phpnukesitegallerynetpbmpnmfile --allimages

Results:
stdin: Image 0:

Error messages:

Status: 1 (expected 0)
Error: Invalid image: Bliss.jpg!
**************************

what am i missing? i have permissions set, did the virtual directory thing, i'm such a newb....