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.5.1 From Scratch

  1. Download the software
    Download the v1.5.1 package.
    Download the database files: Either the v1.5.x Schema + Sample Data or the v1.5.x 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 directory immediately above the DOCUMENT_ROOT directory of your host (usually something like /home/yourfoodsite/public_html/ or /home/yourfoodsite/yourfoodsite.com/, extract the software archive. It will create a local_food_include directory and will either create or populate a public_html/shop directory hierarchy. If your site does not use public_html as the DOCUMENT_ROOT, you will need to move the contents of that directory to an appropriate location for your web server.
  5. 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 to the local-food-coop include files that were extracted 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.
  6. 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 which is located in the local_food_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 added to the local_food_include/ directory to override any configuration settings if desired. This can be useful for maintaining mirrors and for testing settings without changing the main configuration file. To use the override file, just redefine any of the configuration settings from the config_foodcoop.php file and the override value will prevail.

    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.