utf8_(en|de)code removed from php7?

后端 未结 7 1402
一整个雨季
一整个雨季 2020-12-01 13:52

I recently switched to PHP 7 on my development server, which has worked just fine - until now.

Since I updated to PHP 7.0.3-10+deb.sury.org~trusty+1 (ea

相关标签:
7条回答
  • 2020-12-01 14:04

    I encountered the same problem and for me,

    sudo apt-get install php-patchwork-utf8
    

    and restarting the apache2 server solved the problem (on Ubuntu 16.04 LTS).

    0 讨论(0)
  • 2020-12-01 14:17

    I had the same problem. Just install php7.0-xml package. Ubuntu 16.04:

    sudo apt-get install php7.0-xml
    

    Edit: Restart apache2 to load the new package.

    0 讨论(0)
  • 2020-12-01 14:17

    As the top voted answer did not work for me i found yet another package for php7 which (obvious by its name) fixed it for me

    sudo apt-get install php7.0-mbstring
    
    0 讨论(0)
  • 2020-12-01 14:23

    In Ubuntu 16.04 LTS, with php 5.6, try:

    sudo apt-get install php5.6-xml
    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-12-01 14:23

    The utf8_decode and utf8_encode functions are accessible in php 7:

    function.utf8-encode - manual - php

    This is because the php-xml package is missing in your php installation.

    If your server is running Mandrake, enter "urpmi php-xml".

    If your server is running EASYPHP on Windows, click on the EASYPHP logo to activate the php-xml module.

    On debian or ubuntu try :

    apt-get install php7.0-xmlrpc
    
    0 讨论(0)
  • 2020-12-01 14:24

    If you are on CentOS, following command should work:

    yum install php-xml
    
    0 讨论(0)
提交回复
热议问题