Help - Search - Members - Calendar
Full Version: Upload User Pic Creates Internal Server Error (fresh Install)
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Ben S
so i just finished installing MT-4.21 and so far so good. however, when i log on as a general user and try to upload a user pic it creates a Internal Server Error - at this point i can no longer edit the profile either from the user account OR from the admin backend..

what i have to do is go into phpmyadmin and NULL out the "author_userpic_asset_id" data - or delete the asset from the backend- then i am able to edit and view the profile of the user again

it shows that it's uploading the file to %2/support/uploads (figured it would goto the '/support/userpic/ folder)

i am able to view the image over the web. permissions are set wide open.

help!? i need to get this working tonight...
OtherNiceMan
Do you have ImageMagick installed?
Ben S
yes ImageMagick is installed - i did read about a possible conflict between ImageMagick and PerlMagick if they are not the same version, but i don't know how to see what version PerlMagick is

ImageMagick is version 6.2.6 and it seems to work because i can upload images in posts and it creates thumbnails

-- Apache is creating Core dumps int he cgi-bin/MT directory every time i get a 500 error (either after uploading or anytime trying to view or edit the profile)

-- in the error log all i get is this (even though the image did upload and is accessible via http, HOWEVER, the file is uploaded to %s/support/uploads NOT into the userpics folder (though i'm not sure if it's supposed to go there anyway):
[Wed Oct 08 09:21:10 2008] [error] [client 76.173.217.71] File does not exist: /home/uncharit/public_html/500.shtml, referer: http://uncharitable.net/#_login
OtherNiceMan
What file format are you uploading?

Do you have the same problem using an alternate image format?
Ben S
Using JPEG - have also tried GIF - they both work fine when uploading to posts, just not to UserPics

arg - this install is on a server using cPanel

I just now Tar'd up the entire thing and restored it on my Media Temple site - did a SQL dump and restore - changed the few little config options - and i am able to upload user pics no problem

so it's something on the host - i don't know if i am going to be able to do anything about that...

PerlAddict
QUOTE (Ben S @ Oct 8 2008, 12:08 PM) *
Using JPEG - have also tried GIF - they both work fine when uploading to posts, just not to UserPics

arg - this install is on a server using cPanel

I just now Tar'd up the entire thing and restored it on my Media Temple site - did a SQL dump and restore - changed the few little config options - and i am able to upload user pics no problem

so it's something on the host - i don't know if i am going to be able to do anything about that...


Did you ever figure out what was causing this problem? I'm having the exact same issue - I go to upload the pic, and then I get an Internal Server Error 500:

QUOTE
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at daveandsam.net Port 80


I also get a core.XXXX file (where XXXX is different numerals) dumped into my MT directory after this occurs that's several megabytes in size.

After I get the error, I usually click off the center of the screen where the upload window is and click ESC to get back to the main MT user admin screen. If I then go to select my userpic again, the file I uploaded is there and shows up in the list. If I select it and click "continue," however, it gives me another internal server error again.

At some point, it gave me an error about the %s/support/uploads folder, which is what directed me to this page when I googled that line of code. But I can't seem to find where that error occured now.

This is driving me batty ... I've really liked MT4 aside from the userpics issue. My webhost is also running cPanel.

Any help or ideas would be great appreciated.

- Dave

PerlAddict
I just downloaded one of the CORE files that gets created (this one was 20MB+ in size) after I tried selecting the userpic that was uploaded. I opened up the CORE file in Ultraedit and toggled it to ASCII mode as it defaulted to Hex. There is a whole mess of stuff in this file, but near the very top was this info written out:

QUOTE
mkdir: this may cause subsequent errors
mkdir: ERROR: Mode of %s should be set to %04o
mkdir: Cannot create %s with root ownership
mkdir: Owner of %s should be set to root
mkdir: ERROR: (l)stat failed for %s (%d)
mkdir: ERROR: inode for %s changed
mkdir: ERROR: Cannot create %s
mkdir: ERROR: fstat failed for %s (%d)
SocketUNIXResetListener: mkdir(%s) failed, errno = %d
SocketUNIXCreateListener: path too long
SocketUNIXCreateListener: ...SocketCreateListener() failed
SocketUNIXCreateListener: mkdir(%s) failed, errno = %d
PerlAddict
For what it's worth, I've added the following lines to my mt-config.cgi file:

DBUmask 0022
HTMLUmask 0022
UploadUmask 0022
DirUmask 0022
HTMLPerms 0755
UploadPerms 0644

I'm hosted on Site5.com, and they are fairly strict with permissions there. Directories won't function properly above 755 permissions, and files can be hit or miss at 666, so I either use 644 or 755 for files across the rest of the website.

Making these changes had no effect, however. The asset manager works fine, I've uploaded and inserted pictures into blog entries with no problems, and the userpic uploader itself seems to work (as the userpic DOES get uploaded to the site and shows up correctly in the asset manager screen). It's whatever page that comes AFTER uploading or trying to assign a userpic that is giving me fits. I've spent some time looking through the code, but I can't find what page and function is trying to load when you select a userpic and then click "Continue."

If anyone can even direct me to what function is being called there and what file the routine is located in, I could get a bit of a jumpstart on figuring this out. I'm no stranger to Perl, but I've never done a ton of object-oriented programming, so following the breadcrumbs through the code can get a little confusing.

- Dave
OtherNiceMan
Are you still getting core dumps?

This is a useful post on checking the IM config http://www.digitalquery.com/2007/11/movabl...magemagick.html
PerlAddict
QUOTE (OtherNiceMan @ Jan 17 2009, 11:45 AM) *
Are you still getting core dumps?

This is a useful post on checking the IM config http://www.digitalquery.com/2007/11/movabl...magemagick.html


Yes, I'm still getting core dumps. Thanks for the article - however, it seems it's more related to the actual installation of Image::Magick? It says: "Ok - so first up, browse to mt-check.cgi and see whether Image::Magick is already there. It's in the same directory as mt.cgi, so just replace with mt-check.cgi in your normal URL for MT. If you're lucky, and it's already there, then you're done. Congrats, and enjoy!"

My server has Image::Magick installed on it already (v6.2.6). When I run mt-check.cgi, the only two modules I don't have are Crypt::DSA and Mail::Sendmail. It seems like if Image::Magick wasn't working properly, then regular asset uploads would fail, too. But currently the only problem is uploading userpics, and even then, the userpics actually upload just fine. The error occurs when they are assigned (and when you upload a userpic, I'm assuming it tries to go ahead and assign it right then and there automatically). That seems to be why the error comes up after a userpic is uploaded as well as after you try and assign a userpic that is already in the system (I can click "upload" and the 500 error will come up, but if I exit and click "select userpic" again, the userpic I just uploaded will be in the list. Selecting it and clicking 'continue' will give the 500 error again, though).

Does anyone know what routine and script is being called right after a userpic is selected and the form is submitted? I'm wondering if there's a permissions problem somewhere as that happens.
OtherNiceMan
After the asset is uploaded it will try to create a thumbnail, sounds like it could be the problem.

You could try using a specific temp directory using the TempDir http://www.movabletype.org/documentation/a...es/tempdir.html config setting.
PerlAddict
QUOTE (OtherNiceMan @ Jan 18 2009, 01:57 PM) *
After the asset is uploaded it will try to create a thumbnail, sounds like it could be the problem.

You could try using a specific temp directory using the TempDir http://www.movabletype.org/documentation/a...es/tempdir.html config setting.


I really appreciate you taking the time to shoot me some ideas, ONM. I gave that config setting a try, but I still got the error (for what it's worth, the error page is actually displayed with the pop-up dialog window ... the entire window doesn't go to a new page, and I thought that dialog was supposed to self-close after clicking "continue", so I was thinking the error might be occuring somewhere between where MT4 makes the thumbnail and tries to set the userpic and when it gets back around to actually closing that dialog box).

That documentation page you linked to didn't specify what the path to the temp directory was relative to (root, absolute root, etc.). So just to be sure, I tried it a few different ways. My "mt" directory is located in my root web directory, which is "public_html". I made a new directory named "tmp" inside the "mt" directory, and then tried setting the path to /mt/tmp. When that didn't work, I tried the entire absolute path to it (/home/account/public_html/mt/tmp), and when that didn't work I tried just mt/tmp. I gave just "/tmp" and "tmp" a try for good measure too, but no go.

I don't think it's the thumbnailing code or permissions related to it, because when I check my asset manager, all the assests I've uploaded (including userpics) have a thumbnail with them and appear just fine. It's only when I try actually setting the pic does the error come up. It's very weird and obviously a bit frustrating. I get the core dumps just from trying to select a userpic, too, so I don't think those are actually tied into the uploading, but the assigning. Each of my core dumps is 20.32MB every time.

What's REALLY a bite is that aside from userpics and a couple of Javascript issues in IE7 with the Facebook plug-in, MT4 has everything I really want from a blog. I almost went with WordPress, but I grew up on Perl and figured I'd rather have a more full-featured robust package and do more leg-work. If only I'd grown up on object-oriented Perl. Heh. I'm starting to miss the darkside of PHP, but I'm determined to get this working correctly.

If you have any other ideas, I am all ears! I'm curious if "Ben S" ever got his issue solved on his original host, as our errors sound identical and my host uses cPanel as well.

- Dave
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.