Steps:
-
- Download CareCarma-live.zip from \Wufei in Google drive
-
- Install XAMPP and start Apache Server and MySQL
-
- Extract CareCarma-live.zip in C:\xampp\htdocs\ directory
-
- localhost/carecarma will show homepage of CareCarma website
-
- Install composer & set it as environment variable (https://getcomposer.org/doc/00-intro.md)
-
- configure composer with following commands in C:\xampp\htdocs\CareCarma\carecarma directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html) :
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer update
- (option)access tokens will be generated in github account:
- a. Login your github account
- b. Go to setting page (https://github.com/settings/profile)
- c. Click "Personal access tokens" in "Develop settings" session
- d. Click "Generate new token" and input your password of this github account
- e. Give a name in "Token description" and click "Generate token"
- f. Copy the token and paste it
- configure composer with following commands in C:\xampp\htdocs\CareCarma\carecarma directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html) :
-
- Enable "INTL_ICU_VERSION'
- Open C:\xampp\php\php.ini to edit
- Remove semicolon from line ";extension=php_intl.dll"
- Restart Apache server in XAMPP
still not work? try: https://github.com/humhub/humhub/commit/3e0a507ceaeeaa04045c8f87e1f9ebcf21ebb996
-
- Change the file upload size
- Open C:\xampp\php\php.ini to edit.
- Change "post_max_size" equal to "10M"
- Change "upload_max_filesize" equal to "10M"
-
- Start Apache Server
-
- Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
$userId = Yii::$app->user->id;
$user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
- Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
-
- localhost/carecarma -> Login will show set up page (including Database Configuration) for CareCarma
- Hostname : 127.0.0.1
- Username : root
- Password :
- DatabaseName: carecarma (create a new database in localhost/phpmyadmin)
-
- Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
$userId = Yii::$app->user->id;
$user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
- Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
-
- (Option) Configure Mailing Server
- Go into Administration => Mailing => Server Settings (/carecarma/index.php?r=admin%2Fsetting%2Fmailing-server)
- Add information and Save
- If have "OpenSSL Error: SSL3_GET_SERVER_CERTIFICATE: certificate verify failed" when system send e-mails, add follow code in carecarma/protected/vendor/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php line 266 inside function "_establishSocketConnection()":
$options['ssl']['verify_peer'] = FALSE;
$options['ssl']['verify_peer_name'] = FALSE;
If you have some errors, please search in https://github.com/humhub/humhub/issues first.
- Refernce of code:
Steps:
-
- Upload CareCarma-live.zip to Running Version and go into CareCarma folder (ex. /var/app/current/CareCarma)
-
- Change the file upload size
- Open /etc/php.ini to edit.
- Change "post_max_size" equal to "10M"
- Change "upload_max_filesize" equal to "10M"
- Restart App Server in AWS Elastic Beanstalk dashboard
-
- Configure composer in root with following commands in CareCarma (/var/app/current/CareCarma) directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html)
composer.phar global require "fxp/composer-asset-plugin:~1.1.1"
composer.phar update
- (option)access tokens will be generated in github account:
- a. Login your github account
- b. Go to setting page (https://github.com/settings/profile)
- c. Click "Personal access tokens" in "Develop settings" session
- d. Click "Generate new token" and input your password of this github account
- e. Give a name in "Token description" and click "Generate token"
- f. Copy the token and paste it
- Configure composer in root with following commands in CareCarma (/var/app/current/CareCarma) directory via cmd - (https://www.humhub.org/docs/guide-admin-installation.html)
-
- Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
$userId = Yii::$app->user->id;
$user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
- Delete codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
-
- Make sure the required PHP extensions (http://docs.humhub.org/admin-requirements.html)
-
- Use browser to open the website (ex. http://carecarmas-env.us-east-1.elasticbeanstalk.com)/carecarma => Login will show set up page (including Database Configuration) for CareCarma
- Hostname : (ex. carecarmar.c81l6jttxgta.us-east-1.rds.amazonaws.com:3306)
- Username : (ex. root)
- Password : (ex. 2439Lona)
- DatabaseName: (ex. carecarma)
-
- Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
$userId = Yii::$app->user->id;
$user = \humhub\modules\user\models\User::findOne(['id' => $userId]);
- Add codes below in \carecarma\themes\CareCarma-4cacc6\views\layouts\head.php (line 9)
-
- Add cron jobs in root with following command
crontab -e
- Add "30 * * * * php /var/app/current/CareCarma/carecarma/protected/yii cron/hourly >/dev/null 2>&1 00 22 * * * php /var/app/current/CareCarma/carecarma/protected/yii cron/daily >/dev/null 2>&1" Please make sure the folder is the same with the folder displayed in /carecarma/index.php?r=admin%2Fsetting%2Fcronjob
- Save the crontab file and exit
- Start/Restart cron jobs :
service crond restart
- Add cron jobs in root with following command
-
- (option) If you want to keep users' uploaded images and files in the old version, please copy the whole files in /carecarma/uploads
- Folder "file" save the files and images, which users uploaded in Modules
- Folder "profile_image" save the users' profile image
-
- (option) Install, configure and enable modules on /carecarma/index.php?r=admin%2Fmodule%2Flist
Don't update Tasks, Mail and Custom Pages
Use follow steps to debug module "Files":
- Add code in /modules/cfiles/controllers/MoveController.php
$rootFolder = $this->getRootFolder(); <line 46>
'rootFolder' => $rootFolder, <line 52>
'rootFolder' => $rootFolder, <line 87> - In /modules/cfiles/views/move/modal_move.php <line 45>
Replace id = "0" to "$rootFolder->id"
- (option) Install, configure and enable modules on /carecarma/index.php?r=admin%2Fmodule%2Flist
-
- (option) Calculate steps and heart rate data:
- Copy following files from Google drive /Wufei/python:
- heartrate.py
- mainHeartScheduler.py
- mainSensorScheduler.py
- sensor.py
- Paste it in the web server (ex. /home/ec2-user)
- Check the hardware id of the devices you want to keep tracking
- Replace the array to your hardware_id array in heartrate.py (line 816) and sensor.py (line 991)
- Add rows with your hardware_id in table "LastTimeReadHeart" and table "LastTimeReadSteps"
Make sure "datetime" is yesterday midnight (23:59:59) in the device's timezone, and "time" is 13 digit timestamp of "datetime"
You can check in https://www.epochconverter.com/ - Use "screen" to run
- Add one screen and run heart rate part:
screen -r
python mainHeartScheduler.py
ctrl+a+d - Add other screen to run steps part:
screen -r
python mainSensorScheduler.py
ctrl+a+d - The code will run at midnight in EST everyday.
- Add one screen and run heart rate part:
If you have some errors, please search in https://github.com/humhub/humhub/issues first.