PHP 7 with phpmyadmin gives lots of Deprecation Notices

前端 未结 20 1325
失恋的感觉
失恋的感觉 2020-12-12 13:16

I have Ubuntu 16.04 LTS running with PHP7 and phpmyadmin installed. However, I get a lot of deprecation notices like:

Depre         


        
20条回答
  •  醉话见心
    2020-12-12 13:38

    The problem is caused by outdated PHP Class Constructor syntax. To fix this issue run the following code on your terminal:

    sed -ri.bak 's:function StringReader.*:function __construct($str=\x27\x27) {:' /usr/share/php/php-gettext/streams.php
    sed -ri 's:function FileReader.*:function __construct($filename) {:' /usr/share/php/php-gettext/streams.php
    sed -ri 's:function CachedFileReader.*:function __construct($filename) {:' /usr/share/php/php-gettext/streams.php
    sed -ri.bak 's:function gettext_reader.*:function __construct($Reader, $enable_cache = true) {:' /usr/share/php/php-gettext/gettext.php
    

提交回复
热议问题