Error when trying to Export

Comments

10 comments

  • Avatar
    Chris Muench

    Make sure server has Php zip and high enough memory

    You will need to perform debugging steps to figure out the exact error.
    Open up index.php in the phppos root folder:

    FIND:
    define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production’);

    REPLACE:
    define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : ‘development’);

    open application/config/database.php

    FIND:
    $db['default']['db_debug'] = FALSE;

    REPLACE:
    $db['default']['db_debug'] = TRUE;

    Then see the errors.

    Do NOT forget to undo these changes afterwords.

    0
    Comment actions Permalink
  • Avatar
    MIKE

    I went ahead and applied the changes to the two files. The error is exactly the same. What should the URL look like when an export is made? Because it appears to be looking for a nonexistent URL.

    0
    Comment actions Permalink
  • Avatar
    MIKE

    I get the same error when trying to work with suppliers. [myurl]/pos/index.php/suppliers/excel is not a proper URL. Please explain the logic.

     

    0
    Comment actions Permalink
  • Avatar
    Chris Muench

    Your server most likely doesn’t have php zip and php xml extension installed which is why it doesn’t work.

    I would ask your host to install these extensions

    0
    Comment actions Permalink
  • Avatar
    MIKE

    Just checked with host and both extensions are installed. 

    What is the URL supposed to look like when an export is being made? I don't think you're understanding the error. It's a NON-EXISTENT url. Should there be a ? in the url to call a value?  

    To reiterate [myurl]/pos/index.php/suppliers/excel <------- isn't a logical URL.  

    0
    Comment actions Permalink
  • Avatar
    Chris Muench

    Is is a valid url; it is the same on demo. This is how the framework (codeigniter) generates urls

    Can you check your php error log?

    0
    Comment actions Permalink
  • Avatar
    Chris Muench

    And what version of php are you using? If you open a support ticket with server info I can take a look

    0
    Comment actions Permalink
  • Avatar
    MIKE

    I looked at demo, and I see how the exports are supposed to work. 

    PHP Version: 5.6

    This is the error log:

    [30-Dec-2019 16:23:35 America/North_Dakota/Beulah] PHP Fatal error:  Class 'ZipArchive' not found in /home/[REDACTED]/public_html/pos/application/libraries/Spout/Writer/Common/Helper/ZipHelper.php on line 79



    0
    Comment actions Permalink
  • Avatar
    Chris Muench

    That means php zip is not installed

    PHP extension php_zip enabled
    PHP extension php_xmlreader enabled

    0
    Comment actions Permalink
  • Avatar
    MIKE

    actually, it just started working now. I think the webhost must have just flipped the switch. Your PROMPT responses have been greatly appreciated. I look forward to using your software in my store beginning Jan 1, 2020. Thanks again for your help!

    0
    Comment actions Permalink

Please sign in to leave a comment.