Local Food Cooperative Software


The Jist: This software operates on an order cycle instead of an “always open” system. Producers/farmers can log in and add products to their product catalog at anytime for sale. During a designated time, cooperative members place orders.
HomeWho’s Using It?DownloadsHow to HelpOther Resources

Upgrading from a prior 1.5.0 version to 1.5.1

IMPORTANT: This procedure has not been thoroughly tested. It is compiled based upon known changes and experience with various partial upgrades. It is strongly recommend this process be undertaken on a test server with mirrored data rather than on a live production system and it is likely there will be points of difference in just about every system attempting to upgrade. Absolutely no guarantee is given. Please share your experience to help improve this document.

Updating the code – Using a patch file

NOTE: You will need to have shell-access for this procedure.

  1. Plan your work

    For major changes such as upgrades, it is a good idea to schedule a block of time when member usage will be at a minimum and when there will be no need to run critical functions for a while. That way, if something goes terribly wrong, you will have time to return your system to a stable configuration.

    Read through the entire upgrade process before beginning and be certain you know how to get back to your original setup – either by restoring a backup or by undoing the upgrade process itself. If you are not certain, find someone more experienced to help.

  2. Backup your web files

    The procedure you are about to perform will automatically modify many of your files and if it "goes bad" it can leave you with a mess. Be sure you have a working backup of your website and database contents. Many web hosting companies provide this service.

  3. Download the patch

    Download the v1.5.0 to v1.5.1 patch and save it to your web server.

  4. Prepare to apply the patch

    Open a shell account to your web server and change to the directory immediately above DOCUMENT_ROOT. IMPORTANT: The patch assumes default configuration with a DOCUMENT_ROOT called public_html and all local food coop files in public_html/shop/. If that is not true for your setup, you must move the files – or copies of the files – into that configuration prior to running the patch.

  5. Apply the patch

    Execute the following command to apply the patch to your system:

    patch -Np1 < patchfile

    where patchfile is the path/name to the patch file you saved in step 1.

  6. What to expect

    Running the patch command will output a list of files as they are patched. Ideally, most of them will be silently patched with a message like

    patching file public_html/shop/producers/template.php

    but occasionally – particularly with the .htaccess files – it will complain, which is normal. If you are asked for some kind of confirmation about whether/how to patch individual files, it is probably a sign that the patch is going poorly and should be aborted. There are too many possibilities to discuss in detail here.

  7. Do a few things that patch did not finish

    Create a web-server writable shop/admin/temp/ directory. This directory is used for temporary storage of producer invoices when they are generated singly.

    Update the $current_version value in the local_food_include/config_foodcoop.php file to reflect the 1.5.2 update.

  8. Make necessary changes to the database

    Proceed to the database modification section below and perform the necessary steps.

Database Modifications

There are no changes to the database in moving from v1.5.0 to v1.5.1.