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:
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:
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.