deployer-extended-database icon indicating copy to clipboard operation
deployer-extended-database copied to clipboard

Undefined index in DatabaseUtility.php

Open einNicklas opened this issue 1 year ago • 3 comments

Environment: DDEV based TYPO3 10 on PHP 7.4.

I'm getting the following error in db:backup because of undefined index in DatabaseUtility.php:

task db:backup
[moria]  error  in db_backup.php on line 30:
[moria] run . /data/mounts/webspaces/php7.4/toelke/308-khwob/shared/.env; cd /data/mounts/webspaces/php7.4/toelke/308-khwob/releases/6 && /usr/bin/php7.4 /data/mounts/webspaces/php7.4/toelke/308-khwob/releases/6/vendor/bin/dep db:export moria --options=dumpcode:backup_for_release_6_a80143dcdf5969f32d17b955533684f9 
[moria] task db:export
[moria] [moria]  ErrorException  in DatabaseUtility.php on line 24:
[moria] [moria]
[moria] [moria]   Undefined index: port
[moria] [moria]
[moria] ERROR: Task db:export failed!
[moria] exit code 255 (Unknown error)
ERROR: Task db:backup failed!
task deploy:failed

vendor/sourcebroker/deployer-extended-database/src/Utility/DatabaseUtility.php

        $mysqli->real_connect(
            $dbConf['host'],
            $dbConf['user'],
            $dbConf['password'],
            $dbConf['dbname'],
            $dbConf['port'],
            null,
            isset($dbConf['flags']) ? (int)$dbConf['flags'] : 0
        );

einNicklas avatar Aug 21 '23 13:08 einNicklas

what driver you use to get database data?

kszymukowicz avatar Aug 21 '23 13:08 kszymukowicz

I'm using the DDEV default: MySQL 5.5.5-10.4.28-MariaDB-1:10.4.28+maria~ubu2004-log

and

deploy.php

set('driver_typo3cms', true);

is set.

einNicklas avatar Aug 22 '23 05:08 einNicklas

I can not reproduce. I suppose you need to debug problem yourself. Looks lie for some reason the output of ddev typo3cms configuration:showactive DB --json is not returning "port". On my side it is hard to me to force to no set this key.

kszymukowicz avatar Aug 22 '23 19:08 kszymukowicz