PhotoPlog

PhotoPlog (http://www.photoplog.com/forum/index.php)
-   Troubleshooting & Problems (http://www.photoplog.com/forum/forumdisplay.php?f=6)
-   -   Bad Type - File is of the Wrong MIME Type (http://www.photoplog.com/forum/showthread.php?t=1826)

cam2 10-15-2007 01:00 AM

Bad Type - File is of the Wrong MIME Type
 
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 thread?

cam2 10-15-2007 02:39 PM

Still not working
 
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:
Code:

photoplog_output_page('photoplog_error_page',$vbphrase['photoplog_error'],$vbphrase['photoplog_bad_type']);

cam2 10-15-2007 05:49 PM

Quote:

Originally Posted by Morgan (Post 14429)
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:
Code:

photoplog_output_page('photoplog_error_page',$vbphrase['photoplog_error'],$vbphrase['photoplog_bad_type']);

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:
Code:

photoplog_output_page('photoplog_error_page',$vbphrase['photoplog_error'],$vbphrase['photoplog_bad_type']);
The second spot is:
Code:

photoplog_output_page('photoplog_error_page',$vbphrase['photoplog_error'],$vbphrase['photoplog_bad_type']);
Both are the same line of code, so before the first one add:
Code:

echo 'A'; exit;
And before the second one add:
Code:

echo 'B'; exit;
And then see what letter appears upon upload.

cam2 10-15-2007 06:00 PM

Got it now
 
OK, I get the letter B

Morgan 10-15-2007 06:08 PM

Okay, undo those changes and then find:
Code:

                        move_uploaded_file($photoplog_file_tmp_name,$photoplog_file_location);

                        $photoplog_file_check = @getimagesize($photoplog_file_location);

And temporarily replace with the following:
Code:

                        ini_set('display_errors', true);
                        error_reporting(E_ALL);

                        move_uploaded_file($photoplog_file_tmp_name,$photoplog_file_location);

                        $photoplog_file_check = getimagesize($photoplog_file_location);

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...
Quote:

Requirements: vB 3.5.0+ (development based on having vB 3.5.4 though vB 3.6.0+ should be okay, but not every version was personally tested) and MySQL 4.1+ (development based on having MySQL 4.1+ though MySQL 3+ may be okay, but not every version was personally tested) and PHP with GD2 and Safe Mode off
There is no workaround for when safe mode is on, as PhotoPlog requires safe mode off, though you can take a read through this thread if interested.


All times are GMT. The time now is 05:44 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.