phpMyAdmin can't find hash() in Apache 2.4 with PHP 7.4
Adrian Gschwend
ml-ktk at netlabs.org
Fri Jan 3 17:34:43 UTC 2020
Hi group,
I'm preparing a new server to migrate an old FBSD box running an old
Apache version (I'm a bit late to the Apache 2.4 party...).
I thought I will start with PHP 7.4, which seems to be the latest stable
release. Unfortunately that does not seem to work with the latest 5.0
port of phpMyAdmin, I get this error:
PHP Fatal error: Uncaught Error: Cal
l to undefined function Symfony\\Component\\DependencyInjection\\hash()
in /usr/local/www/phpMyAdmin/vendor/symfony/dependenc
y-injection/ContainerBuilder.php:1573\nStack trace:\n#0
/usr/local/www/phpMyAdmin/vendor/symfony/dependency-injection/Loader/
YamlFileLoader.php(150):
Symfony\\Component\\DependencyInjection\\ContainerBuilder::hash('/usr/local/www/...')\n#1
/usr/local
/www/phpMyAdmin/libraries/common.inc.php(94):
Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader->load('../servi
ces.yml')\n#2 /usr/local/www/phpMyAdmin/index.php(23):
require_once('/usr/local/www/...')\n#3 {main}\n thrown in /usr/local/
www/phpMyAdmin/vendor/symfony/dependency-injection/ContainerBuilder.php
on line 1573
On that line it is using the hash() function from php.
I've installed the apache php module & the necessary php extensions.
According to the php 7.4 release notes, hash() is now part of core. I
can run this simple test on cli with php binary:
<?php
echo hash('sha256', 'Some input');
?>
And I get a hash as expected. However, if I run the same file from
Apache 2.4, I get "undefined function" as well, same like the
phpMyAdmin error message above.
I'm a bit lost here, how come that the version executed in Apache
behaves differently than the cli binary?
FYI I built all the ports myself using `synth` as I need a lot more
modules in Apache.
Thanks
Adrian
More information about the freebsd-questions
mailing list