We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have deployed these packages : Mysql : 8.0.21 PHP : 7.4.6 PhpMyAdmin : 5.1.1
We can without problem navigate into structure, we can create tables, but we cannot go on "import" and "export" tables.
Export tab is throwing this error :
Fatal error: Uncaught TypeError: mb_substr() expects parameter 1 to be string, bool given in /opt/app-root/src/libraries/classes/Util.php:1351 Stack trace: #0 /opt/app-root/src/libraries/classes/Util.php(1351): mb_substr(false, -1) #1 /opt/app-root/src/libraries/classes/Export/Options.php(191): PhpMyAdmin\Util::userDir(false) #2 /opt/app-root/src/libraries/classes/Controllers/Database/ExportController.php(156): PhpMyAdmin\Export\Options->getOptions('database', 'mydb', '', '', 1, 0, Array) #3 /opt/app-root/src/libraries/classes/Routing.php(187): PhpMyAdmin\Controllers\Database\ExportController->index(Array) #4 /opt/app-root/src/index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/database/expor...', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #5 {main} thrown in /opt/app-root/src/libraries/classes/Util.php on line 1351
And import tab is throwing this :
Fatal error: Uncaught TypeError: mb_substr() expects parameter 1 to be string, bool given in /opt/app-root/src/libraries/classes/Util.php:1351 Stack trace: #0 /opt/app-root/src/libraries/classes/Util.php(1351): mb_substr(false, -1) #1 /opt/app-root/src/libraries/classes/Controllers/Database/ImportController.php(131): PhpMyAdmin\Util::userDir(false) #2 /opt/app-root/src/libraries/classes/Routing.php(187): PhpMyAdmin\Controllers\Database\ImportController->index(Array) #3 /opt/app-root/src/index.php(18): PhpMyAdmin\Routing::callControllerForRoute('/database/impor...', Object(FastRoute\Dispatcher\GroupCountBased), Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #4 {main} thrown in /opt/app-root/src/libraries/classes/Util.php on line 1351
1.Install these packages : Mysql : 8.0.21 PHP : 7.4.6 PhpMyAdmin : 5.1.1 2.Click on 'import' or "export" 3. See error
We should be able to access to these tabs
We already tried to clear our cache/cookies. Same in private browser.
The text was updated successfully, but these errors were encountered:
Hi @Whisper40 I think you have no value of the wrong value for $cfg['SaveDir'] or $cfg['UploadDir']
Meanwhile, I will fix the code to handle this case
Sorry, something went wrong.
Hi @williamdes I have these values :
$cfg['UploadDir'] = getenv('DATA_PATH'); $cfg['SaveDir'] = getenv('DATA_PATH');
The configuration on our side of "config.inc.php" does not change between (php-71-rhel7 with phpmyadmin 5.0.4) and (ubi8/php-74 with phpmyadmin 5.1.1)
Ah ! 🇫🇷 But this function also returns false ;) https://www.php.net/manual/en/function.getenv.php
$cfg['UploadDir'] = (string) getenv('DATA_PATH'); $cfg['SaveDir'] = (string) getenv('DATA_PATH');
Or maybe
$cfg['UploadDir'] = getenv('DATA_PATH') ?? 'defaultValueReplaceMe'; $cfg['SaveDir'] = getenv('DATA_PATH') ?? 'defaultValueReplaceMe';
Probably one of the ENVs is not defined
You are right :) Env is not defined in the container... Will try to find why..
Sry to have broken the code by doing this ahah
Just for information :
getenv('DATA_PATH') ?? ''; // ?? does not work '' // default value works
( you can close when you want )
Thanks for the feedback, I was indeed afraid it would not handle false the same way as null
I will push my commits and the issue will close itself
Add a ChangeLog entry for #17026
cd5c2f0
Signed-off-by: William Desportes <williamdes@wdes.fr>
d281dcc
williamdes
No branches or pull requests
Describe the bug
We have deployed these packages :
Mysql : 8.0.21
PHP : 7.4.6
PhpMyAdmin : 5.1.1
We can without problem navigate into structure, we can create tables, but we cannot go on "import" and "export" tables.
Export tab is throwing this error :
And import tab is throwing this :
To Reproduce
1.Install these packages :
Mysql : 8.0.21
PHP : 7.4.6
PhpMyAdmin : 5.1.1
2.Click on 'import' or "export"
3. See error
Expected behavior
We should be able to access to these tabs
Screenshots
Server configuration
Client configuration
We already tried to clear our cache/cookies. Same in private browser.
The text was updated successfully, but these errors were encountered: