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

Installing v1.5Pre From Scratch

  1. Download the software
    Download the v1.5Pre package.
    Download the database files: Either the v1.5Pre Schema + Sample Data or the v1.5Pre Schema Only.
  2. Set up the web server / System requirements
    The local-food-coop software requires a MySQL database and PHP in order to run. Both MySQL and PHP should be version 5.0 or greater. The software has never been tested on a Windows-based server, so *nix-based servers are highly recommended. Some additional features may (or will) be available if htmldoc and/or PEAR::Spreadsheet_Excel_Writer are also installed, but these are not operational requirements.

    Important: At this time the greatest source of difficulty in getting the software properly configured is in this fact: Most servers (for security reasons) are configured to operate with register_globals OFF. At this time the local-food-coop software still REQUIRES register_globals ON.

    The server must allow .htaccess file override for include directory path.
  3. Backup any existing file structure on your host.
    The local-food-coop software lives mostly or wholly in a shop directory in DOCUMENT_ROOT. If you are already using a directory by that name, you will either need to move it to a new location or modify your local-food-coop installation accordingly. Details for that process are beyond the scope of these notes but you may contact software@localfoodcoop.org for individual assistance.
  4. Extract the software
    From the DOCUMENT_ROOT directory of your host (usually something like /home/yourfoodsite/public_html/ or /home/yourfoodsite/yourfoodsite.com/, extract the software archive into the shop directory.
  5. Move the local_food_include directory above DOCUMENT_ROOT
    Within the extracted shop directory is one called local_food_include. This directory contains the configuration and other include files for running the local-food-coop site. Because these files contain passwords and other sensitive data, they must be moved above the DOCUMENT_ROOT. It is suggested to move the engire local_food_include directory into the home directory just above DOCUMENT_ROOT.
  6. Modify the .htaccess file to reflect your settings
    Within the shop directory is a hidden .htaccess file. It contains a line that must identify the absolute pathname of the include directory. You will need to change the default setting to match the path you used for the local-food-coop include files in the preceeding step. Change the portion of that line shown in light blue below to match your account settings:
    php_value include_path '/home/yourfoodsite/local_food_include/:.'

    Leave the :. at the end of that directive because it allows include files within the immediate directory of the script being executed.

    Each local-food-coop directory has a .htaccess file with a soft-link to the one in the shop directory. If you change the directory structure, you will need to adjust those soft links accordingly. Furthermore, if you install any local-food-coop files outside the established shop directory structure (such as membership forms), you will need to provide a proper .htaccess file for them to work properly.
  7. Configure the local-food-coop software
    With this version, almost all configuration can be done within a single configuration file. Edit the config_foodcoop.php file from the include directory. You should only need to modify values in the top part of the file. Most of the configuration settings have example data that should be self-explanatory

    An optional config_override.php file can be used to override any of those settings if desired. Normally that file is not needed except for maintaining mirrors or possibly for testing settings without changing the main configuration file.

    You may desire to edit some of the template_hdr files to modify the style of the site. Future versions will have better styling options. You will at least want to change the shop/grfx/logo.jpg file to use your own logo.