Viewing 15 posts - 31 through 45 (of 47 total)
  • Author
    Posts
  • kadad Friend
    #380363

    I don’t think I will get much from my host but thanx anyway.

    I don’t understand what you advice me to ask, but I guess I’ll search the internet to find out.

    kadad Friend
    #380372

    Sorry to insist but I made an attempt.

    I published my site on another host.

    The result is the same. I conclude that the problem is include in the quistart I downloaded…

    I keep searching…

    Phill Moderator
    #380376

    Sorry but I am still convinced this is a permissions issue. It worked on localhost did it not? If you cannot upload any attachments via K2 then I really cannot see what else it can be.

    kadad Friend
    #380377

    I will try to upload Ja Social Quickstart with no modification to see if I did something wrong.

    Thanx again.

    kadad Friend
    #380746

    Hi,

    I re-up my post because I found something that didn’t solve my problem but adds an important information concerning my bug and I think you could help with it.

    The problem doesn’t exist when I attach a jpg file for example, it works perfectly with it…

    Odd, isn’t it…

    kadad Friend
    #380750

    I’m not a programmer but in the file administrator/components/com_k2/models/item.php that seem to describe how attachment are treated, there is an information about allowing zip files as an attachment :

    if($file["tmp_name"]){

    $handle = new Upload($file);

    if ($handle->uploaded) {
    $handle->file_auto_rename = true;
    $handle->allowed[] = 'application/x-zip';
    $handle->Process($savepath);
    $filename = $handle->file_dst_name;
    $handle->Clean();
    $attachment = &JTable::getInstance('K2Attachment', 'Table');
    $attachment->itemID = $row->id;
    $attachment->filename = $filename;
    $attachment->title = ( empty($attachments_titles[$counter])) ? $filename : $attachments_titles[$counter];
    $attachment->titleAttribute = ( empty($attachments_title_attributes[$counter])) ? $filename : $attachments_title_attributes[$counter];
    $attachment->store();
    } else {
    $mainframe->redirect('index.php?option=com_k2&view=items', $handle->error, 'error');

    Maybe that I should add pdf as allowed at this line :

    $handle->allowed[] = 'application/x-zip';

    If I’m right, what should I add ?

    Phill Moderator
    #380761

    The fact that it worked perfectly well when you were on localhost but fails when you went to your live host shows it is not code related. You stated that the problem only occurred after you uploaded the site from your local setup to your live host. It is definately a server related problem. I’ve just installed this very template on my test server and it is working as expected.

    kadad Friend
    #380792

    I’m sure you are more qualified than me.

    With that experience, is it possible that all format can be attached ( zip, rar, jpg, doc,…) but not pdf in that very same folder, script… and that it is also linked to a host problem.

    If yes, do you know what is the name of the phenomena that forbids pdf, so that I make a search in that direction.

    Thank you for your patience.

    Phill Moderator
    #380807

    I was under the impression that previously it did work but it only failed when you went live. How did you transfer your site from localhost to the live host or did you make a separate install?

    Please also try a very smal pdf file, something under 30k.

    kadad Friend
    #380808

    I made the site locally, the same for my recent try with virgin quickstart, then, used akeeba to produce a backup, wich I upload to the web with kickstart.php which is used to decompress and install.

    I never tried to upload Joomlart quickstart content directly because it lasts about 2 hours. ( Internet is not really fast by here, especially on upload.

    And you are right, locally all can be attached, on website, only pdf can’t…

    Phill Moderator
    #380815

    Yes, akeeba is excellent.

    Please try a 30k or smaller pdf so we can rule out some other server related possibilities.

    Also, is the akeeba file still on your server? If so could you send me a link via PM so I can download your setup and try it on my live server (assuming you have the download bandwidth, I would not want to use it all up for you)?

    kadad Friend
    #380817

    I tried a 12K pdf file, same…

    I send in PM link

    Thank again.

    Phill Moderator
    #380819

    Please check your PM.

    kadad Friend
    #380955

    I did and answer. Did you get it ?

    Phill Moderator
    #380964

    Yes, downloading now.

Viewing 15 posts - 31 through 45 (of 47 total)

This topic contains 47 replies, has 5 voices, and was last updated by  kadad 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum