What is the reason why phpMyAdmin fails after Ubuntu 22.04 upgrade?
P粉763748806
2023-08-24 22:00:37
<p>Just upgraded to Ubuntu 22.04 and now my phpadmin won't load. I get the following error</p>
<blockquote>
<p>Parse error: Syntax error, unexpected 'static' (T_STATIC) in /usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php on line 272</p>
</blockquote>
<p>I opened the file and found the specific code in that paragraph. </p>
<pre class="brush:php;toolbar:false;">public function addResource(ResourceInterface $resource): static
{
if (!$this->trackResources) {
return $this;
}
if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) {
return $this;
}
$this->resources[(string) $resource] = $resource;
return $this;
}</pre>
<p>Everything was working fine yesterday before the upgrade. Does anyone have any suggestions? </p>
I am using php7.4.30, my solution is to upgrade phpmyadmin.
Here’s a simple guide:
https://devanswers.co/manually-upgrade-phpmyadmin/