I installed xampp on Ubuntu 22.04.
Running .php files is ok.
Example directory like that.
/opt/lampp/htdocs//helloworld.php
That file worked and run in browser. But when I run php command on terminal, it gave me this error.
I thought this error happened because zsh shell.So I add .zshrc file to this.
export PATH=<path-to-lampp>/bin/php/<php_version>/bin:$PATH
Still not working. Please help.
2
Answers
I got the solution. The problem is need to give symbol link i think.
My solution: run this command in terminal
Check if your PHP path is right, you should output PHP version by
{PHP path} -v
.Do you
source /.zshrc
after changing the .zshrc file?