1

i have a fresh install of linux mint 21.1 as well as the latest version of xampp which comes with php 8.2.4. i added

export PATH=$PATH:/opt/lampp/bin to .bashrc to access php from the terminal. it works and recoginzes the php command.

the problem is that i cannot use php interactively with option php -a. i get this error instead:

Interactive shell (-a) requires the readline extension.

i have only found this discussing the issue and i tried to follow the advice. i installed what i think is the extension with:

sudo apt install php8.1-readline

which made this config file: /etc/php/8.1/mods-available/readline.ini

i added '--with-readline' in opt/lampp/bin/php-config to configure_options. (i also tried adding --with-readline=/etc/php/8.1/mods-available) but no luck.

i also installed libreadline-dev with sudo apt install libreadline-dev as the tutorial i read suggested. but no luck.

is it because php was installed as xampp?

(btw, i restarted apache and opened a new terminal with each try).

UPDATE:

found this in an answer on an old apache forum --

You cannot add extensions to Xampp. Either it is already included >(what i dont know), or it is not included. You cannot add it, because >you have to recompile the whole thing. As far as it looks, readline is >not part of Xampp.

If you need readline, you should not use Xampp, instead use the >Packages from Ubuntu (Apache, MySQL, PHP etc.).

i guess i will give up and install them all separate unless someone here knows something... but that was from 2008, so i was hoping something has changed.

0 Answers0