PDA

View Full Version : Bad Type - File is of the Wrong MIME Type


cam2
10-15-2007, 01:00 AM
I am working with the Plesk control panel.

The root tmp file is writable. Still having this error message.

Sorry, Buck: Bad Type - File is of the Wrong MIME Type

Morgan
10-15-2007, 02:12 PM
Did you try the code from post nine or post eleven in this (http://www.photoplog.com/forum/showthread.php?t=1530) thread?

cam2
10-15-2007, 02:39 PM
I just updated the 2 files with the patches and it is still not working. Same error message. Thanks for your quick response.

Morgan
10-15-2007, 05:32 PM
Undo those changes, as I see now that you are getting bad type and not bad file. Instead, look for the following line in the PhotoPlog upload.php file (appears in two spots) and before the first spot add echo 'A'; exit; and before the second spot add echo 'B'; exit; and see what letter appears on screen when you go to upload a file:
Content visible to registered users only.

cam2
10-15-2007, 05:49 PM
Content visible to registered users only.

I'm sorry, I do not know what the first and second spots are? Can you write the code and I can replace the 2 lines with your code? Sorry for the confusion.

Morgan
10-15-2007, 05:53 PM
The first spot is:
Content visible to registered users only.
The second spot is:
Content visible to registered users only.
Both are the same line of code, so before the first one add:
Content visible to registered users only.
And before the second one add:
Content visible to registered users only.
And then see what letter appears upon upload.

cam2
10-15-2007, 06:00 PM
OK, I get the letter B

Morgan
10-15-2007, 06:08 PM
Okay, undo those changes and then find:
Content visible to registered users only.
And temporarily replace with the following:
Content visible to registered users only.
What appears on screen now upon upload?

cam2
10-15-2007, 06:16 PM
Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 10004 is not allowed to access /var/www/vhosts/huntingne.com/httpdocs/forum/photoplog/images/1 owned by uid 48 in /photoplog/upload.php on line 174

Warning: getimagesize() [function.getimagesize]: Unable to access /var/www/vhosts/huntingne.com/httpdocs/forum/photoplog/images/1/1_Fishing_4-2007_003.jpg in /photoplog/upload.php on line 176

Warning: getimagesize(/var/www/vhosts/huntingne.com/httpdocs/forum/photoplog/images/1/1_Fishing_4-2007_003.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /photoplog/upload.php on line 176

Morgan
10-15-2007, 06:36 PM
Okay, you can undo those changes as well.

PhotoPlog requires safe mode to be off. As currently listed in the vBorg release post...
Content visible to registered users only.
There is no workaround for when safe mode is on, as PhotoPlog requires safe mode off, though you can take a read through this (http://www.photoplog.com/forum/showthread.php?t=13) thread if interested.

cam2
10-15-2007, 06:42 PM
How do I set the safe mode to be off?

Morgan
10-15-2007, 06:54 PM
You can change safe mode and related settings in the php.ini file. If you do not have access to that file, you will need to see if your host will do it for you, though be aware that your host may not make the change.