Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #26869
    Profile photo of Laurent
    Laurent
    Participant

    Hello,

    My install of wordpress is in a subfolder http://www.jlpasquier.ch/photographie/

    I can not get the processor to make the zip file. Here are the errors I get.

    [caption id="" align="alignnone" width="731"] Error while processing[/caption]

    [caption id="" align="alignnone" width="767"] Error when i try to download from the account page.[/caption]

    Can somebody help on this matter ?

    Thanks in advance

    Laurent

    #26872
    Profile photo of Robin
    Robin
    Keymaster

    Hi there – I can’t see the images you’ve posted

    #26874
    Profile photo of Laurent
    Laurent
    Participant
    #26875
    Profile photo of Robin
    Robin
    Keymaster

    Appears to be a directory permissions issue. Try disabling the zip in your download settings

    #26876
    Profile photo of Laurent
    Laurent
    Participant

    Solved

    I’v played with the PHP settings and discovered that PHP was executed as an Apache module instead of FastCGI, I also reverted PHP version to 5.4 from 5.6.

    Now the download work from the account page and from the last email (Order completed) but the link on the the first email is not working, it is possible to get rid of this link ?

     

    Thanks

    #26877
    Profile photo of Robin
    Robin
    Keymaster

    Also PM me your login info and I’ll take a look

    #26878
    Profile photo of Laurent
    Laurent
    Participant

    Thanks but this is not necessary, I’ve simply deactivate the client email notification for Order processing, I prefer the customer to receive only one email Order completed with the link working, i mean both email links works but the file is only available when the order is completed.

    Thanks for your help, and your very nice plugin.

    #26908
    Profile photo of
    Anonymous

    Hi All,

    Great update so far, been enjoying new layout and changes!

    I too am having a problem with ZipArchive:

    Warning: ZipArchive::addFile(): Invalid or uninitialized Zip object in /<removed>/wp-content/plugins/symbiostock/tools-cron.php on line 496
    Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /<removed>/wp-content/plugins/symbiostock/tools-cron.php on line 497

    ZipArchive loaded into PHP:

    $ php -m | grep zip
    zip

    ZipArchive working example (sample.php will show contents of zip file):

    $ ls
    sample.php
    test.txt

    $ zip sample.zip test.txt

    $ cat sample.php

    <?php
    $za = new ZipArchive();
    $za->open(‘sample.zip’);
    for( $i = 0; $i < $za->numFiles; $i++ ){
    $stat = $za->statIndex( $i );
    print_r( basename( $stat[‘name’] ) . PHP_EOL );
    }
    ?>

    $ php sample.php
    test.txt

    Set chmod 777 to uploads/_sz just for testing.

    #26916
    Profile photo of
    Anonymous

    Hi Robin,

    I changed the line in bold in tools-cron.php:

    function ss_zipupfile($fileloc) {

    $filename = pathinfo($fileloc,PATHINFO_FILENAME).”.zip”;

    $destination = pathinfo($fileloc,PATHINFO_DIRNAME).”/”.$filename;

     

    $zip = new ZipArchive();

    $zip->open($destination,ZipArchive::OVERWRITE);

    $zip->addFile($fileloc,pathinfo($fileloc, PATHINFO_BASENAME));

    $zip->close();

     

    return $filename;

    }

    To:

    $zip->open($destination,ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);

    I am now able to create and download the ZIP file. The next problem I ran into was a 0 size zip file download.

    This was fairly easy to diagnose and fix:

    1. Check to see if mod_xsendfile was compiled and loaded: Yes (apachectl -M | grep xsendfile)
    2. Check http headers when clicking on download: X-Sendfile in header = Bad (x-sendfile is supposed to remove X-Sendfile headers)
    3. Checked in httpd.conf (or vhost config, or .htaccess – Whichever way your host is configured): Found two directives missing:

    XSendFile On
    XSendFilePath “/wp-content/uploads/_sz/temp”

    Restarted apache, downloaded file again and the zip file contained the image, ie not 0 bytes.

    #26921
    Profile photo of Robin
    Robin
    Keymaster

    Hi Ross – thanks for looking into that. I see that the PHP docs have similar information relating to different versions of PHP. I’ll look into fixing this in the next release, thanks.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.