Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 10:59 pm EST

Geeklog Forums

Error Uploading image file Media Gallery


Status: offline

rvsuper8

Forum User
Junior
Registered: 03/23/08
Posts: 15
New install on win 2008 webserver, IIS 7. MG 1.5.0, Geeklog 1.4.1, imagemagick 6.3.9.7.

Ported images from a previous install. Images and MG are viewable, but error when html uploading an image file, I get a "502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server."

I turned on verbose. The following is the error.
03/26/08 20:19:55 - MG Upload: Entering MG_getFile()
03/26/08 20:19:55 - MG Upload: Filename to process: C:\php\temp\upload\php1ED.tmp
03/26/08 20:19:56 - MG Upload: getID3 analyzing file: C:\php\temp\upload\php1ED.tmp
03/26/08 20:19:56 - MG Upload: getID3 found mime_type: image/jpeg
03/26/08 20:19:56 - MG Upload: found mime type of jpg
03/26/08 20:19:56 - MG Upload: PHP detected mime type is : image/pjpeg
03/26/08 20:19:56 - MG Upload: Stored filename is : 9_creek.jpg
03/26/08 20:19:56 - MG Upload: Mime Type: image/jpeg
03/26/08 20:19:56 - MG Upload: About to move/copy file
03/26/08 20:19:56 - MG Upload: Calling MG_convertImage()
03/26/08 20:19:56 - MG Upload: Entering MG_convertImage()
03/26/08 20:19:56 - MG Upload: Creating thumbnail image
03/26/08 20:19:56 - MG Upload: Converting using ImageMagick src = c:/Inetpub/teamrvgeek/public_html/mediagallery/mediaobjects/orig/9/9_creek.jpg mimetype = image/jpeg
03/26/08 20:19:56 - MG Upload: Executing: "c:/imagemagick/convert" -verbose -flatten -quality 85 -size 200x200 c:/Inetpub/teamrvgeek/public_html/mediagallery/mediaobjects/orig/9/9_creek.jpg -geometry 200x200 +profile "*" c:/Inetpub/teamrvgeek/public_html/mediagallery/mediaobjects/tn/9/9_creek.jpg
03/26/08 20:19:56 - MG Upload: Error creating thumbnail
03/26/08 20:19:56 - MG Upload: Problem uploading a media object

I then put the file and ran directly from shell. That seems to work ok. Info here.

C:\scrap>convert -verbose -flatten -quality 100 -size 200x200 IMGFILE.JPG -geom
etry 200x200 +profile "*" NEWIMGFILE.JPG
IMGFILE.JPG JPEG 1024x768=>512x384 512x384+0+0 DirectClass 8-bit 258.211kb
IMGFILE.JPG=>NEWIMGFILE.JPG JPEG 1024x768=>200x150 200x150+0+0 DirectClass 16-bi
t 53.7891kb

My php memory size is http://www.mstewart.net/tools/phpinfo.php

Reinstalled imagemagick.
the test to convert the logo works.

I checked permissions. Looks good. I even tried putting everyone write to the entire drive. No joy.
Thoughts?
Mike
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Mike,

I haven't actually tested Media Gallery with Windows Server 2008, but I do run through a pretty inclusive test suite on Windows Server 2003. I'm not sure if there are any major differences in the security implementations between the two IIS versions.

Generally, the problems I see with Windows installs are:

Permissions
- Make sure IUSR_yourservername has read/write to the TEMP directories
- Make sure IUSR_yourservername has read/write permissions to all the public_html/mediagallery/mediaobjects/* directories.
- Make sure IUSR_yourservername has execute permissions to C:\WINNT\cmd.exe

Also, the latest version of Media Gallery is v1.6.0 (available at http://www.gllabs.org). It has some improvements to calling external programs on Windows based systems, so it may help too.

Usually this ends up be a permission problem with CMD.exe, the web server doesn't have the permissions to execute it (which is needed to call the ImageMagick convert.exe utility).

If GD libs is an option on your install, you might try it. If it works that means all the standard directory permissions are correct and the problem is with running external programs.

Thanks!
Mark
 Quote

Status: offline

rvsuper8

Forum User
Junior
Registered: 03/23/08
Posts: 15
My IUSER does not have any permissions to cmd.exe and the system will not allow me to change the ecurity settings on that file.

I dont remember seeing the cmd.exe in the docs anywhere.

Ill poke around and see what I can come up with.
I am able to make a copy of it to another location and I can change the permissions in the new location.
I tried putting a cmd.exe in the imagemagick directory and giving the IUSER wrwrite to it, it did not help. Im not sure if it is being called or not though.

I checked my 2003 server install (it works fine) and the IUSER does in fact have read/execute to cmd.exe and I can modify those permissions.

I do not know why I cant in 2008 logged in as administrator. Its ability to add users to the security is greyed out for some reason. GOogle search did not help here.

Ill keep on this path. I do believe its the cmd.exe access now.
Mike

 Quote

Status: offline

rvsuper8

Forum User
Junior
Registered: 03/23/08
Posts: 15
Update,
The group Users has read execute to the cmd.exe
I added the IUSER to that group and that didnt do anything.
I added everyone to it, and that did not do anything.
Now Im not sure where to look.
:banghead:
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Mike,

Check the Windows event logs and the server error logs, there has to be a clue hiding in there somewhere.

Thanks!
Mark
 Quote

Status: offline

rvsuper8

Forum User
Junior
Registered: 03/23/08
Posts: 15
Nothing in the event logs.
Only thing in the system logs are what Ive copied in the previous messages.
:banghead:
 Quote

Status: offline

mevans

Forum User
Full Member
Registered: 02/08/04
Posts: 393
Location:Texas
Mike,

I'll have to load up a Win2008 server and do some testing. May take me a few days...

Can you use the GD libs in the meantime, they should work fine.

Thanks!
Mark
 Quote

Status: offline

rvsuper8

Forum User
Junior
Registered: 03/23/08
Posts: 15
I enabled the GD libraries, and the problem went away. (ie I can now upload an image.)
Since I dont know the difference bwtween one package and the other, Ill just go with the GD librairies.
I did notice that with PHP6, the GD libraries will no longer be compiled.

Would you like me to try anything else?
Mike
 Quote

All times are EST. The time is now 10:59 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content