Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
PARAlizer

Uploadproblem will nur .Doc

Recommended Posts

So. Hier mal meine conf_mime_types.php gleich mal vorweg.

<?php

$mime_types = array(

    // mime                              allow post  img          type          allow avatar

    "application/pdf"              => array( 1, 'pdf.gif'      , 'PDF Document'  ) ,

    "image/x-png"                  => array( 1, 'quicktime.gif' , 'PNG Image'  , 1 ) ,

    "image/png"                    => array( 1, 'quicktime.gif' , 'PNG Image'  , 1 ) ,

    "video/vivo"                    => array( 1, 'win_player.gif', 'VIVO Movie'    ) ,

    "application/x-compress"        => array( 1, 'zip.gif'      , 'Compressed File') ,

    "video/x-msvideo"              => array( 1, 'win_player.gif', 'MS Video'      ) ,

    "video/x-ms-wmv"                => array( 1, 'win_player.gif', 'MS Video'      ) ,

    "text/html"                    => array( 1, 'html.gif'      , 'HTML Page'      ) ,

    "audio/x-pn-realaudio"          => array( 1, 'real_audio.gif', 'Real Audio File') ,

    "image/gif"                    => array( 1, 'gif.gif'      , 'GIF Image'  ,1 ) ,

    "video/mpeg"                    => array( 1, 'quicktime.gif' , 'MPEG Video'    ) ,

    "image/ico"                    => array( 1, 'gif.gif'      , 'Icon File'      ) ,

    "application/x-tar"            => array( 1, 'zip.gif'      , 'TAR Ball'      ) ,

    "image/x-MS-bmp"                => array( 1, 'bmp.gif'      , 'BMP Image'      ) ,

    "image/tiff"                    => array( 1, 'quicktime.gif' , 'TIFF Image'    ) ,

    "text/richtext"                => array( 1, 'txt.gif'      , 'Rich Text'      ) ,

    "audio/x-realaudio"            => array( 1, 'realaudio.gif' , 'Real Audio'    ) ,

    "application/mac-binhex40"      => array( 1, 'stuffit.gif'  , 'Mac Binary'    ) ,

    "audio/x-aiff"                  => array( 1, 'quicktime.gif' , 'AIFF File'      ) ,

    "application/x-gzip"            => array( 1, 'zip.gif'      , 'GZIP File'      ) ,

    "application/zip"              => array( 1, 'zip.gif'      , 'ZIP File'      ) ,

    "application/postscript"        => array( 1, 'postscript.gif', 'Postscript'    ) ,

    "application/msword"            => array( 1, 'word.gif'      , 'MS Word doc'    ) ,

    "video/quicktime"              => array( 1, 'quicktime.gif' , 'QuickTime Movie') ,

    "application/vnd.ms-powerpoint" => array( 1, 'apps.gif'      , 'PowerPoint Doc' ) ,

    "application/powerpoint"        => array( 1, 'apps.gif'      , 'PowerPoint Doc' ) ,

    "audio/x-wav"                  => array( 1, 'sound.gif'    , 'WAV File'      ) ,

    "audio/x-mpeg"                  => array( 1, 'mp3.gif'      , 'MPEG Audio'    ) ,

    "audio/mpeg"                    => array( 1, 'mp3.gif'      , 'MPEG Audio'    ) ,

    "image/jpeg"                    => array( 1, 'jpeg.gif'      , 'JPEG Image'  ,1) ,

    "application/x-zip-compressed"  => array( 1, 'zip.gif'      , 'ZIP File'      ) ,

    "application/octet-stream"      => array( 1, 'quicktime.gif' , 'OCTET Stream'  ) ,

    "text/plain"                    => array( 1, 'text.gif'      , 'Text File'      ) ,

    "image/pjpeg"                  => array( 1, 'jpeg.gif'      , 'JPEG Image'  ,1) ,

    "application/x-shockwave-flash" => array( 0, 'quicktime.gif' , 'Flash'        ,0) ,

);

?>

Das Problem ist das ich trotz dieser conf keine PDF Files oder ZIP Dateien hochladen kann. Weder über das Forum, noch über den Downloadblock des MKportals welches ich einsetze!

Share this post


Link to post

Ach ja. Hier auch noch mein Server Environment

Configuration

PHP Core

Directive Local Value Master Value

allow_call_time_pass_reference On On

allow_url_fopen On On

always_populate_raw_post_data Off Off

arg_separator.input & &

arg_separator.output & &

asp_tags On On

auto_append_file no value no value

auto_prepend_file no value no value

browscap /usr/local/lib/browscap.ini /usr/local/lib/browscap.ini

default_charset no value no value

default_mimetype text/html text/html

define_syslog_variables Off Off

disable_classes no value no value

disable_functions no value no value

display_errors On On

display_startup_errors Off Off

doc_root no value no value

docref_ext no value no value

docref_root no value no value

enable_dl On On

error_append_string no value no value

error_log no value no value

error_prepend_string no value no value

error_reporting 7 2039

expose_php On On

extension_dir ./ ./

file_uploads On On

gpc_order GPC GPC

highlight.bg #FFFFFF #FFFFFF

highlight.comment #FF9900 #FF9900

highlight.default #0000CC #0000CC

highlight.html #000000 #000000

highlight.keyword #006600 #006600

highlight.string #CC0000 #CC0000

html_errors On On

ignore_repeated_errors Off Off

ignore_repeated_source Off Off

ignore_user_abort Off Off

implicit_flush Off Off

include_path .:/usr/local/lib/php .:/usr/local/lib/php

log_errors Off Off

log_errors_max_len 1024 1024

magic_quotes_gpc On On

magic_quotes_runtime Off Off

magic_quotes_sybase Off Off

max_execution_time 0 90

max_input_time -1 -1

memory_limit 50M 50M

open_basedir no value no value

output_buffering no value no value

output_handler no value no value

post_max_size 8M 8M

precision 14 14

register_argc_argv On On

register_globals On On

report_memleaks On On

safe_mode Off Off

safe_mode_exec_dir no value no value

safe_mode_gid Off Off

safe_mode_include_dir no value no value

sendmail_from me@localhost.com me@localhost.com

sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i

serialize_precision 100 100

short_open_tag On On

SMTP localhost localhost

smtp_port 25 25

sql.safe_mode Off Off

track_errors Off Off

unserialize_callback_func no value no value

upload_max_filesize 8M 8M

upload_tmp_dir no value no value

user_dir no value no value

variables_order EGPCS EGPCS

xmlrpc_error_number 0 0

xmlrpc_errors Off Off

y2k_compliance Off Off

Ich würd mich sehr freuen, :w00t: wenn ihr mir bei der Lösung des Problems irgendwie helfen könnt!

Edited by PARAlizer

Share this post


Link to post

OK. Ich hab das Problem eingrenzen können.

Das Problem liegt vor wenn zum Upload Firefox benutzt wurde. Der IE Upload funktioniert!

Vielleicht kann man da ja was in der post.php umschreiben, das auch der Firefox Upload funktioniert. Seltsamer Weise geht er ja sogar mit Docs .... einer soll das verstehen??? :yeahright:

Share this post


Link to post

Du müßtest mal überprüfen, welcher Mime Typ zurückgegeben wird.

In der Post.php such mal folgende Stelle:

  $FILE_NAME = $HTTP_POST_FILES['FILE_UPLOAD']['name'];
 $FILE_SIZE = $HTTP_POST_FILES['FILE_UPLOAD']['size'];
 $FILE_TYPE = $HTTP_POST_FILES['FILE_UPLOAD']['type'];
Darunter setzt mal die folgende Debug Meldung:
  echo "Dateityp: ".$FILE_TYPE;

Nun lade mal wieder eine Datei hoch und schau, welcher Typ dir zurück gegeben. Sollte nun ganz oben auf der Seite angezeigt werden. Es kann sein, das der Typ ein wenig anders ist und deswegen der Upload scheitert, weil das Forum dies dann nicht erkennt.

Share this post


Link to post

OK. Ich hab das nochmal mit .Doc probiert. Ausgabe:

Dateityp: text/richtext

Danach hab ichs nochmal mit einem Pdf probiert. Die Ausgabe kam nicht in Form einer weissen seite sondern wieder direkt im Forum:

Nachricht vom Forum (Fehlermeldung)

Du kannst diesen Dateityp nicht hochladen!

Share this post


Link to post

Wie man sieht, gibt er einen anderen Mime Typ zurück bei doc Dokumenten, deswegen ist der Upload nicht gestattet. Du müßtest dann diesen speziellen Typ auch freigeben, dann sollte es klappen.

Bezüglich dem PDF Dokument, da sollte er dir auch ein entsprechenden Typ auswerfen. Ansonsten füge mal unterhalb der Debugmeldung in der Post.php folgendes ein:

exit();

Nun sollte nur noch die Ausgabe Dateityp: XY erscheinen. Wenn du dann den entsprechenden Mime Typ hast, diesen auch in die conf_mime_types.php einfügen und schon sollte es funktionieren. Die Debugzeile und das nachträgliche exit dann wieder aus der Post.php entfernen.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×