[Vtigercrm-developers] upgrade to 7.2
Alan Lord
alanslists at gmail.com
Wed Nov 13 19:35:24 GMT 2019
On 13/11/2019 19:06, Rubén A. Estrada Orozco wrote:
> Thanks for the input Alan! It's very helpful.
> 1. How do you turn on the logs in the case of migrations? I have tried
> enabling it by setting 'LOG4PHP_DEBUG' => true in config.performance.php
> without luck :( It has been very frustrating that migration scripts just
> silently fail and I can't get fatal errors to display.
You also need to edit the log4php.properties file to enable debug
logging; change where it says "FATAL" to "DEBUG".
> 2. How do you run the migration scripts by the command line? I assume
> running for example php -f 701_to_710.php wouldn't work because of
> dependencies in the script.
It's probably not something I would recommend unless you know what you
are doing or have lots of time to play, test & fail ;-) It's a thing
I've been working on (on and off) since 2015 according to my git commit
history ;-)
Anyway - basically you need to do this:
Depending on the process (New Installation, or a Migration) you need to
set the VTIGER_UPGRADE and/or INSTALLATION_MODE constants. You need
include a few files at the top such as the config.php and the WebbUI.php
so the class loader works. Then it is helpful, but not essential, to
edit the scripts so the output is readable on the cli as most of it is
echoed with html tags such as br, p etc... I also turn on php
error_reporting as this can be a lot more helpful than the debug logs.
You also really have to run the scripts as the web-server user because
they need write access to the vtiger filesystem... I would never
recommend using a super user account. FWIW on linux I create a
.bash_alias entry for this
alias phpwww='sudo -u www-data php'
so from the command line I just need to type
# phpwww file-to-run.php
Hope that helps
Al
More information about the vtigercrm-developers
mailing list