Relatively major problem..

waffull
waffull's picture

Joined: 2002-09-07
Posts: 115
Posted: Sun, 2002-09-08 00:00

Details:
Gallery v1.3.2-cvs-b4
Gallery Remote .4 with Jave VM
Win 2k Server w/SP2
Apache 1.3.24
PHP 4.2.0

The browse for files to upload... button doesn't do anything. It depresses, but nothing happens. Also, ALL of the buttons on the bottom are cut off by the white text box below it.

Thank you for maintaining this great piece of software... I can't wait to see what v1 is like

Marc

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2002-09-09 00:11

I hope to release 1.0 preview with a decent log so I can hope to support you with such problems. As it is now, I could maybe work from a stack trace if there is one, but not much more.

Just a bit more patience...

 
waffull
waffull's picture

Joined: 2002-09-07
Posts: 115
Posted: Mon, 2002-09-09 21:20

Is there anyway you could compile the v1 beta's that are available from Jesse Mullan's Gallery Download Page? I don't have a compiler and I don't have a copy of the visual suite to install on my system.

Thank you,
Marc

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Tue, 2002-09-10 03:34

I could be totally off the mark, but with Linux after the initial install of the latest release, all I do is replace the jar file with the latest CVS. Works-for-me

 
waffull
waffull's picture

Joined: 2002-09-07
Posts: 115
Posted: Tue, 2002-09-10 03:39

That might be the case for linux, but I am on a windows 2000 server machine... Any ideas on what to do for this platform?

Thank you..
Marc

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2002-09-11 22:38

Right now the builds on Jesse's page are a big step behind, because I want to keep them small, and so they're missing a bunch of stuff 1.0 beta relies upon, so they might work, but more likely than not, there would be bugs.

Once 1.0b is released, you will be able to use the (almost) daily builds to gain the latest and greatest functionality without waiting for full released builds.

If you want to experiment, you're welcome to use CVS and build yourself, but that's completely undocumented and you need to install Ant (which, btw, rocks!)

 
Half-Dead

Joined: 2002-09-16
Posts: 7
Posted: Mon, 2002-09-16 08:12

Been doin alotta debugging on the remote .php file, and it seems that on add-item gallery remote doesnt send along the user/pass so t least in embedded versions !$gallery->user->canAddToAlbum($gallery->album) will always return NULL since the user object cant be recreated.

Heres a log i built from initial login to upload:

cmd = login
protocal_version = 1
uname = xxxxxx
password = xxxxxxxx

cmd = fetch-albums
protocal_version = 1
uname = xxxxxxx
password = xxxxxxxx

cmd = login
protocal_version = 1
uname = xxxxxxx
password = xxxxxxx

set_albumName = Blogger
cmd = add-item
protocal_version = 1

->>> missing user/pass

userfile = Array
name = folder_lock.gif
type = image/gif
tmp_name = C:WINDOWSTEMPphp5213.TMP
error = 0
size = 333

->>User cannot add to album

--------
Maybe it's me that did something wrong :roll:

But if i force $gallery->user->canAddToAlbum($gallery->album) to true, files are uploaded and processed.

..anyways hope this helps, 1.0 looks very cool :wink:

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2002-09-16 15:46

Thanks for the debugging. The uname and password shouldn't be necessary after login, because the session info should be maintained in a cookie inside GR, but something may be the matter with that.

I'll look into it.

 
Half-Dead

Joined: 2002-09-16
Posts: 7
Posted: Tue, 2002-09-17 07:15

Ok tnks :smile:

For now the only way i can upload files is by doing some hacking ..

to keep it relatively safe, what i do is log the users IP to a file if a login succeeds and the person who logged in can add to albums ..if no i delete the login file. Later on add items, i crosscheck the currently logged ip against the persons IP who's trying to upload, and say ok if it's the same.

..this the only way i got it to work for now without comprising user priveledges.

note: this is in an embedded version.

----------
To me it seems that remote closes the session after the album fetching, so even if before a user session was established, now its lost. So i suppose ANY action should always be preceded by a login procedure, or at least accompanied by the user/pass like for the other cmd's. (prolly safer too) :wink:

btw, add item is the only command that fails here, and it's also the only one not accompanied by the user/pass ..that's why i came to this conclusion.

----------
Ah almost forgot ..the old echo commands for sending errors back to remote don't seem to work in 1.0. Haven't searched the whole forum yet ..so maybe the way to send errors back to remote simply changed. Just thought i'd mention it :smile:

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Wed, 2002-09-18 06:18

I have updated the upload code. The main change is that I have even more logging in, so I can help you debug this. Hacking Gallery itself is ok as a temp workaround, but I don't think you want to support that indefinitely and I want to get this fixed :smile:

The semi-daily builds at Jesse's are up and should work fine as patches to your installation.

<!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&amp;name=phpWiki&amp;file=index&amp;pagename=Gallery%20Remote" TARGET="_blank">GR download page</A><!-- BBCode End -->
<!-- BBCode Start --><A HREF="http://jpmullan.com/galleryupdates/" TARGET="_blank">http://jpmullan.com/galleryupdates/</A><!-- BBCode End -->

You can download and patch up to GR 1.0b5, set debugLevel=3 in remote.properties and send me the log...

----

I don't know what the old echo command is or was... Can you describe this so I can try to support it?

Thanks

 
Half-Dead

Joined: 2002-09-16
Posts: 7
Posted: Wed, 2002-09-18 17:30

ok will get back to ya.

btw i saw in the GR docs ya said imagemagick support is horrible on non win32 platforms .... why not just stick with netpmb, i'm can make any images i like with .bat files here with netpbm on winME.

The only reason netpbm doesnt work properly on win32 with gallery is because the way commands are passed by gal are horrible for win32, and the binaries on the SF page for win32 are pretty broken :grin:

You can grab <!-- BBCode Start --><A HREF="http://prdownloads.sourceforge.net/exoops/netPBM_v10.6_win32.zip?download" TARGET="_blank">this pack</A><!-- BBCode End --> i put together for win32 if ya wanna play with it. And maybe pass <!-- BBCode Start --><A HREF="http://www.xoops.org/modules/news/article.php?storyid=385" TARGET="_blank">this thread</A><!-- BBCode End --> on to the gal devs .. i mailed em, but never got a response.

The above thread works ..but has some errors. The main thing to remember, is always specify file names with full paths for origine/final files, pass each command on its own line and not with |, make sure to push conversion output to another file like echo hello > somefile ..otherwise the conversion simply gets echoed to stdout, and don't overwrite intermediate files ..delete them later. (neither cmd.exe nor command.exe is needed in the exec() command)

I converted a few images localy (winME/Apache) with php &amp; netpbm, and i must say netpbm has best image quality :smile:

 
Half-Dead

Joined: 2002-09-16
Posts: 7
Posted: Wed, 2002-09-18 18:00

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
$file = "c:\temp\someimage.gif";
$finalname = "somethumb.gif";

exec("$gallery->app->pnmDir\jpegtopnm $file > $gallery->app->tmpDir\tmpfile");
exec("$gallery->app->pnmDir\pnmscale -width 100 $gallery->app->tmpDir\tmpfile > $gallery->app->tmpDir\$finalname");
exec("$gallery->app->pnmDir\ppmquant 256 $gallery->app->tmpDir\$finalname > $gallery->app->tmpDir\tmpfile");
exec("$gallery->app->pnmDir\ppmtogif $gallery->app->tmpDir\tmpfile > $gallery->app->tmpDir\$finalname");
unlink("$gallery->app->tmpDir/tmpfile");
</TD></TR></TABLE><!-- BBCode End -->

The above should work fine on any win32 box.

 
Half-Dead

Joined: 2002-09-16
Posts: 7
Posted: Wed, 2002-09-18 18:06

of course the above works fine from the command line n .bat files too ..minus the php specific commands.