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