Strange problem with attached files ?!

I have an strange problem.

MIME types are ok. When I attach the files, all files except the images get extension *.txt. It is strange that when I download the same file on the desktop and manually change the extension to his original I really get the original file??

Comments

  • wait, what? all the files you attach become *.txt files?

    can you provide more information on your setup? as well as you attachment array options in your config.php
  • I use default status.net settings for MIME, if I add the code into the config.php for example for pdf file format the same thing is happening. On the host server is all ok.
  • Maybe the problem is the place from which I upload!? (I take a lunch break free time to do upload files on my private server:) the same thing happened to me sometimes when I upload *. zip format on the corporate server with FileZilla as it is transferred to *. txt, although all MIME files were supported,?
  • My server OS is linux
  • "when you upload an attachment what happens? what os/host are you running your site on?"
    No problem with the upload everything is ok, only the conversion to txt , because, I quote myself:
    " It is strange that when I download the same file on the desktop and manually change the extension to his original I really get the original file?? "
  • Definitely, all the extensions that I do apload except jpg, gif, png,
    be with *.txt extension on the public server. But when I download the same file with *.txt extension and replace *.txt with the original extension for example *.jpg, I get the original file
  • @miki I cannot for the life of me imagine why this would happen.
    if you look in the statusnet/files/ directroy what are the filenames? all .txt?

    please provide the steps to reproduce this behavior.

    what is your version and distribution of linux
  • CentOS
    Apache:2.2.15
    MySQL5.1.47
    PHP:5.2.4


    The following is a link to the print screen image: http://www.test.fiatpuntoclassic.com/files.jpg content of my statusnet files folder, as you can see all files assigned to the extension *.txt, except for pictures and pdf.

    It is just a test site http://www.fiatpuntoclassic.com/blogg/ . Soon I'd had to put a micro blogging site for me and my friends. I tried the same on a few computers and have the same problem with *. txt. Aric if you find time try to login on my site as a user, maybe you somehow recognize the problem.


  • miki you have /usr/bin/file ?

    which version of centos, ill try to reproduce
    also can I see php -m ?
  • CentOS 5.4 Enterprise Linux x86

    "miki you have /usr/bin/file ?" what about did you mean? In root I have /bin/ but folder is empty.

    php -m

    [******@gator1048 ~]$ php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    ctype
    curl
    date
    dbase
    dom
    exif
    filter
    ftp
    gd
    gettext
    hash
    iconv
    imagick
    imap
    ionCube Loader
    json
    libxml
    magickwand
    mbstring
    mcrypt
    mhash
    mime_magic
    mssql
    mysql
    mysqli
    OAuth
    odbc
    openssl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    posix
    pspell
    Reflection
    session
    SimpleXML
    soap
    sockets
    SourceGuardian
    SPL
    SQLite
    standard
    tidy
    tokenizer
    uploadprogress
    wddx
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend Optimizer
    zip
    zlib

    [Zend Modules]
    Zend Optimizer
    the ionCube PHP Loader
  • @miki install the fileinfo php extension.
  • Did you mean:

    http://www.fiatpuntoclassic.com/phpinfo.php

    ( If you maybe mean about "File_Infopath (0.1.
    0 alpha)" I can't install that extension.)
  • On my server that I test statusnet, http://www.fiatpuntoclassic.com/blogg , the server is shared, and I have a lot of restrictions, including restrictions that I can not install the meteor server (I can't run meteor HTTP server, on my Apache, If I'm not wrong). I will soon time to move on VPS or dedicated. This is what I have written may not be depending on to any strange problems with *.txt extensions. But who know...

    When I be moved to VPS maybe I will not have this *.txt problem, but very strange problem isn't it.
  • @miki yes, very strange, I feel like it has something to do with your hosting situation.
  • Aric thank you.
    My site is just test site, soon I'll rent VPS and if I had a problem I'll write in this forum.
    Until then, many greetings and all the best.
  • Hey all.
    I have the same problem on a shared server at cyon.ch: http://status.davidhaberthuer.ch/ The filenames of all uploads (PNG screenshots up to now) are converted to .txt files. If I download the files over FTP and rename to PNG, i can view them.
    Since I'm on a shared server I don't think I can install the fileinfo php extension (i haven't asked the cyon support though). Any other idea how to proceed?
  • @habi You should check with your host, sometimes they'll enable things on demand if you ask nicely ;-)
    In the meantime can you show me your phpinfo? just throw up a php file with this as the content
    <?php phpinfo(); ?>
  • @jordanc
    - cyon is extremely friendly (i already asked them about accelerators for speedup, but that's not possible), i just want to see what exactly to ask for. I've seen that my status.net-Installation is rather slow and I'd like to speed things up a bit before making the move from identi.ca to my self-hosted instance...
    - here's the info.php http://grobmotoriker.ch/info.php (status.davidhaberthuer.ch and other stuff is running on a subdomain of this server).
    - sorry for the late reply, but I kinda forgot about it. there should be an email for new replies here **EDIT**: I've just seen the email-notifier in the forum-settings :)
  • @jordanc ok, i've sent an email to cyon-support
  • hi habi.
    on your site i see that you could solve the problem for there is a picture attached in a post. how did you fix that thing? my problem to attach files is very similar. only that my uploaded files got no extensions at all. also the files are proper after renaming.
    got statusnet running on a hosted platform with php v5.2.17 and wasn't able to install fileinfo yet (do i need root access?). within php v5.3 fileinfo should be implemented. will this make the issues obsolet?

    bye -morph-

    edit:
    error notification in mysql database
    _mime type of resource_
    System_Command Error: non-zero exit value from com

    btw ... avatar pictures do work.
  • @morph: the problem was fixed with help from the support of cyon.ch They needed to install a custom FileInfo module and turn it on in my custom php.ini. Since they didn't exactly tell me how they did it I cannot really help you, sorry.
  • thanks anyway :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID