oSoc19 / bebudget

MIT License
0 stars 1 forks source link

Falls back to IP address when switching languages -> should stay the domain #47

Open jeborsel opened 5 years ago

jeborsel commented 5 years ago

could you help out @jbelien ?

jbelien commented 5 years ago

I see that $config['base_url'] = getenv('APP_URL'); in https://github.com/oSoc19/bebudget/blob/master/application/config/config.php

I guess you "forgot" to define APP_URL to http://bebudget.be/ in your environment file (usually .env)

EmmyBruynseels commented 5 years ago

I have defined the APP_URL to 'http://bebudget.be/ but that doesn't solve the problem

jbelien commented 5 years ago

I'll have a deeper look tomorrow (if the issue is not fixed meanwhile)!

jbelien commented 5 years ago

Well, there is definitely an issue with the getenv() function used in the application/config/config.php file! The $_ENV is not correctly set and so the APP_URL environment variable is not set.

I searched a bit for it and found this example : http://roopampoddar.com/2016/01/26/integrating-phpdotenv-env-files-in-codeigniter-3-0-using-hooks/ It seems that those steps are done ; the "hook" is indeed set up ; but I don't know CodeIgniter enough to find out why getenv() is not "correct" when used in application/config/config.php file.


At the moment, I fixed it by doing:

$config['base_url'] = 'https://bebudget.be/';

Needs to be researched more!