Alternative location (path) for the file in OJS 3.1.0

By default the file is located in the base directory of OJS 3.1.0: /path/to/ojs/ I want to place it in a dedicated config directory, for example: /path/to/ojs/config/ Is there a standard way to do this?

I can see it’s used in 2 places:

  1. In lib/pkp/classes/config/
    define('CONFIG_FILE', Core::getBaseDir() . DIRECTORY_SEPARATOR . '');.
    I could change this line to:
    define('CONFIG_FILE', Core::getBaseDir() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . '');.
  2. In lib/pkp/templates/install/install.tpl:
    ...if is_writeable('')....
    I can ignore this as I can make the change post install.

Unless there is a standard way to do this, will 1 suffice? Is it fairly future-proof?

Hi @kasioumis,

As far as I’m aware, that should do it. I don’t think we have any plans to change our config file handling in the near or medium future, so the change should be reasonably future-proof.

Alec Smecher
Public Knowledge Project Team