Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Why do we need this?

  • To hide some configuration from Network Admins (such as Mail configuration, Cache configuration, etc.)
  • To remove the concern of where to write configurations in scalable systems.
  • To be able to change configurations in scalable systems.
  • To easily ship the phpFox applications to container-based environments such as Docker.
  • To simplify some installation steps for non-tech users.

What are Environment Variables supported?

Environment variables will be prefixed as "PFE_".

  1. Site-specific:
    1. PFE_CORE_HOST
    2. PFE_CORE_FOLDER
  2. Database variables:
    1. PFE_DAT_DRIVER
    2. PFE_DAT_HOST
    3. PFE_DAT_PORT
    4. PFE_DAT_USR
    5. PFE_DAT_PW
    6. PFE_DAT_DBNAME
    7. PFE_DAT_DBPREFIX
  3. Cache configurations
    1. PFE_CACHE_DRIVER
    2. PFE_CACHE_HOST
    3. PFE_CACHE_PORT
    4. PFE_CACHE_AUTH_USR
    5. PFE_CACHE_AUTH_PW
  4. Mail sending configurations:
    1. PFE_MAIL_PROVIDER
    2. PFE_MAIL_FROM_NAME
    3. PFE_MAIL_FROM_EMAIL
    4. PFE_MAIL_SMTP_HOST
    5. PFE_MAIL_SMTP_USR
    6. PFE_MAIL_SMTP_PW
    7. PFE_MAIL_SMTP_PORT
    8. PFE_MAIL_SMTP_ENCRYPTION
    9. PFE_MAIL_IS_SMTP_AUTH
  5. License
    1. PFE_LICENSE_ID
    2. PFE_LICENSE_KEY
  6. Site Info and Admin
    1. PFE_SITE_NAME
    2. PFE_SITE_ADMIN
    3. PFE_SITE_PW
  7. Some other settings:
    1. PFE_IS_SHORT_URL
    2. PFE_IS_FORCE_EMAIL_VER
    3. PFE_RECAPT_SITE_KEY
    4. PFE_RECAPT_SECRET
    5. PFE_RECAPT_TYPE (2 or 3)

Notes

  1. Environment variables are visible to all users who can access the code base, so we choose the above "weird" names
  2. In the Admin section, if one configuration is defined in the configuration file (e.g. SMTP configuration), it will be disabled from editing and the following message is shown: "This configuration is set in a configuration file. If you want to change, please edit the corresponding file."