php-extension-php use Phpize to install the extension readline, after installation can enter the command line interactive mode but typed in the second line of PHP code after the error!!

Source: Internet
Author: User
Tags zts
Environment: CentOS 7
PHP Version: 5.5.20

Description: PHP uses phpize to install the extension readline, after installation can enter the command line interactive mode but after typing the second line of PHP code Error!!

Error:

[Root@localhost readline]# Php-a
Interactive mode Enabled

php > $a = ' hello ';
Php:symbol Lookup Error:/usr/local/php/lib/php/extensions/no-debug-zts-20121212/readline.so:undefined symbol: Append_history

ReadLine Installation steps:

    1. Extended directory into the source directory of PHP

      CD ~/myfile/php-5.5.20/ext/readline

      Execute the phpize command and start compiling:

      Phpize

      ./configure

      Make && make install

      Finally, modify the configuration file php.ini, adding the following line:

      Extension = readline.so

      Save exit.

      Test whether the interaction mode is open:

      [Root@localhost readline]# Php-a
      Interactive mode Enabled

php > $a = ' hello ';
Php:symbol Lookup Error:/usr/local/php/lib/php/extensions/no-debug-zts-20121212/readline.so:undefined symbol: Append_history

Excuse me, what is the cause of this problem? How to solve it?

Reply content:

Environment: CentOS 7
PHP Version: 5.5.20

Description: PHP uses phpize to install the extension readline, after installation can enter the command line interactive mode but after typing the second line of PHP code Error!!

Error:

[Root@localhost readline]# Php-a
Interactive mode Enabled

php > $a = ' hello ';
Php:symbol Lookup Error:/usr/local/php/lib/php/extensions/no-debug-zts-20121212/readline.so:undefined symbol: Append_history

ReadLine Installation steps:

    1. Extended directory into the source directory of PHP

      CD ~/myfile/php-5.5.20/ext/readline

      Execute the phpize command and start compiling:

      Phpize

      ./configure

      Make && make install

      Finally, modify the configuration file php.ini, adding the following line:

      Extension = readline.so

      Save exit.

      Test whether the interaction mode is open:

      [Root@localhost readline]# Php-a
      Interactive mode Enabled

php > $a = ' hello ';
Php:symbol Lookup Error:/usr/local/php/lib/php/extensions/no-debug-zts-20121212/readline.so:undefined symbol: Append_history

Excuse me, what is the cause of this problem? How to solve it?

Your PHP readline module differs too much from the version of the ReadLine library you are using.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.