Upgrading
Here is basic tutorial how to perform upgrades since 2.04 version. This version can update database automatically from any previous LHC version. Since 3.30v we require composer
dependencies to be installed if you are installing from source code.
If you are upgrading from older version to any version 3.30v and higher you have to install composer dependencies.
cd lhc_web
composer install
- You can download version with dependencies included https://github.com/LiveHelperChat/livehelperchat/releases look for newest file name
*.**v-with-dependencies.tgz
8.2 PHP version is required.
It has a folder lib/vendor
in it so you don't need to install composer thing yourself. Copy it to lib/vendor
- Read the new version announcement article for any possible changes in settings/settings.ini.php. If the article does not mention anything, you do not have to do anything.
- Go to "System" -> "Update information" and check if LHC finds any differences in the database. If it does, click on "Update database." You may not see differences if your server does not allow making requests to remote URLs.
- You need to run these commands from the root folder (where index.php is located)
php cron.php -s site_admin -c cron/util/update_database
tries to update the database from a remote URL. If this does not work, run:php cron.php -s site_admin -c cron/util/update_database -p local
after replacing all files.
- If you accidentally override files before updating the database, you can:
- Update the database from the local definition
- Copy
doc/shell/upgrade.php
to the root folder, the same folder whereindex.php
exists.- In your browser, enter
https://example.com/upgrade.php
to update the database directly.
- In your browser, enter
- Log out from LHC.
- Download the most recent LHC version Overwrite
doc
,ezcomponents
,lib
,modules
,pos
,translations
,design
folders. Also, overwriteindex.php
andcron.php
files with the new version. - Overwrite
composer.json
andcomposer.lock
files and runcomposer install
orcomposer update
command. - Disable cache in settings.ini.php
- Log in to LHC again and go to
"System configuration" -> "Clear Cache" and click Clear Cache
- You can also clear the cache by executing this command from the command line:
php cron.php -s site_admin -c cron/util/clear_cache
- You can also clear the cache by executing this command from the command line:
- Now you can re-enable the cache in your
settings.ini.php
- If you still encounter errors, then Enable debug output
If you are updating from any older version, you can follow this pattern, which can also be applied to new versions:
- Download the most recent LHC version Overwrite the following folders
doc
,ezcomponents
,lib
,modules
,pos
,translations
,design
folders. Also, overwriteindex.php
andcron.php
files with the new version. - Install composer dependencies as described above. You can just download most recent https://github.com/LiveHelperChat/livehelperchat/releases
*.**v-with-dependencies.tgz
file and copylhc_web/lib/vendor
to your existing installation. This folder should be non existing if you are upgrading from older version than 4.29v - Copy from doc/shell/upgrade.php file to the root folder of LHC.
- In your browser, type chatfolder/upgrade.php. It will update the database to the most recent version and clear the cache automatically.
- Delete upgrade.php from the root folder.
In all cases, I suggest making a backup.
How to make PHP 8.1 version compatible?
You will loose facebook messenger compatibility.
- Modify
lhc_web/composer.json
file and- Change
"php": ">=8.2"
to `"php": ">=8.1" - Remove
- Change
"tgallice/fb-messenger-sdk": "dev-master#47498e9926df01f2633835ff3ffb310f88ac444f",
"symfony/event-dispatcher": "^7.1",
- Execute
composer update
Permissions
To be able to see Update information
operator has to have
'lhsystem','performupdate'