Php-extension-php uses phpize to install the extended readline. After installation, you can enter the command line interaction mode, but an error is returned after you type the second line of php code !!

Source: Internet
Author: User
Environment: centos7php version: 5.5.20 Description: php uses phpize to install the extended readline. After installation, you can enter the command line interaction mode. However, an error is returned when you type the second line of php code !! Error: [root @ localhostreadline] # php-aInteractivemodeenabled... environment: centos 7
Php version: 5.5.20

Description: php uses phpize to install the extended readline. After installation, you can enter the command line interaction mode, but an error is returned after you type the second line of php code !!

Error:

[Root @ localhost readline] # php-
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. Go to the extension directory in the php source code directory.

    Cd ~ /Myfiles/php-5.5.20/ext/readline

    Run the phpize command and start compiling:

    Phpize

    ./Configure

    Make & make install

    Modify the configuration file php. ini and add the following line:

    Extension = readline. so

    Save and exit.

    Test whether the interaction mode is Enabled:

    [Root @ localhost readline] # php-
    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

What is the cause of this problem? How can this problem be solved?

Reply content:

Environment: centos 7
Php version: 5.5.20

Description: php uses phpize to install the extended readline. After installation, you can enter the command line interaction mode, but an error is returned after you type the second line of php code !!

Error:

[Root @ localhost readline] # php-
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. Go to the extension directory in the php source code directory.

    Cd ~ /Myfiles/php-5.5.20/ext/readline

    Run the phpize command and start compiling:

    Phpize

    ./Configure

    Make & make install

    Modify the configuration file php. ini and add the following line:

    Extension = readline. so

    Save and exit.

    Test whether the interaction mode is Enabled:

    [Root @ localhost readline] # php-
    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

What is the cause of this problem? How can this problem be solved?

The version of your php readline module differs greatly from that of the used readline library.

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.