Hello

We are currently using the store outside the base, and export everything with the command:

/cli/manage.php file migrate --backend D --to F

Can it be done in reverse to import to the base?

Osticket 1.10.4
Apache 2.4
PHP 5.6
MySQL 5.7
Ubuntu 16.04

Yes. This is how you migrate all files from the db to the filesystem, and later if you want to migrate them back you do it the same way (in reverse order)

    throws this error

    cli/manage.php file migrate --backend F --to D

    PHP Fatal error: Call to a member function logError() on null in /var/www/html/osticket/include/class.error.php on line 33

    @pablopol24

    You can fix that error with this:

    diff --git a/include/class.error.php b/include/class.error.php
    index c083437..e342595 100644
    --- a/include/class.error.php
    +++ b/include/class.error.php
    @@ -25,12 +25,15 @@ class BaseError extends Exception {
             global $ost;
     
             parent::__construct(__($message));
    -        $message = str_replace(ROOT_DIR, '(root)/', _S($message));
     
    -        if ($ost && $ost->getConfig()->getLogLevel() == 3)
    -            $message .= "\n\n" . $this->getBacktrace();
    +        if ($ost) {
    +            $message = str_replace(ROOT_DIR, '(root)/', _S($message));
     
    -        $ost->logError($this->getTitle(), $message, static::$sendAlert);
    +            if ($ost->getConfig()->getLogLevel() == 3)
    +                $message .= "\n\n" . $this->getBacktrace();
    +
    +            $ost->logError($this->getTitle(), $message, static::$sendAlert);
    +        }
         }
     
         function getTitle() {

    We need to merge the pull request for this but this will do in the meantime.

    Cheers.

    its mod, it works perfect !!!

    thank you.

    Thread can be closed

    Write a Reply...