Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 2020 18:34:39 +0100
From:      Adrian Gschwend <ml-ktk@netlabs.org>
To:        freebsd-questions@freebsd.org
Subject:   phpMyAdmin can't find hash() in Apache 2.4 with PHP 7.4
Message-ID:  <5363c3c4-6374-b15e-cd1b-b84469724d20@netlabs.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5363c3c4-6374-b15e-cd1b-b84469724d20>