Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Data Path #983

Closed
ghost opened this issue Mar 31, 2016 · 3 comments
Closed

Custom Data Path #983

ghost opened this issue Mar 31, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 31, 2016

Hi. Can I ask, what is the correct way to use a custom data path?

I'm trying to install RainLoop on the OpenShift Online platform, which needs a specific directory for persistent data. This can be referred to by the $OPENSHIFT_DATA_DIR environment variable.

I don't really know PHP but I've created an include.php file in the root directory that contains the following:

<?php
    define('DATA_DIR',getenv('OPENSHIFT_DATA_DIR'));
    $sCustomDataPath = DATA_DIR;

However the data directory is still being created in the default location.

Is this simply bad coding on my part or am I going about this the wrong way? Many thanks.

@RainLoop
Copy link
Owner

@ghost
Copy link
Author

ghost commented Mar 31, 2016

Working perfectly. Many thanks.

On a similar subject. I'm trying to use environment variables in the application.ini file. Eg.:

[contacts]
; Enable contacts
enable = On
allow_sharing = On
allow_sync = On
sync_interval = 20
type = "mysql"
pdo_dsn = "mysql:host=$OPENSHIFT_MYSQL_DB_HOST;port=$OPENSHIFT_MYSQL_DB_PORT;dbname=$OPENSHIFT_APP_NAME"
pdo_user = "$OPENSHIFT_MYSQL_DB_USERNAME"
pdo_password = "$OPENSHIFT_MYSQL_DB_PASSWORD"
suggestions_limit = 30

What I've coded doesn't work so it's obviously incorrect. Is there a way I can reference the environment variables in the config file? Thanks again.

@RainLoop
Copy link
Owner

RainLoop commented Jun 4, 2016

Available in the last version.

@RainLoop RainLoop closed this as completed Jun 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant