Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
LemonWiki共筆
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Troubleshooting of PHP errors
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 錯誤訊息: no such file or directory 找不到 PHP 路徑 === <pre> % php -v zsh: no such file or directory: /Applications/MAMP/bin/php/php7.4.21/bin/php </pre> 解決方法:找到 PHP 檔案路徑 * [[XAMPP]] on {{Mac}} {{kbd | key=<nowiki>/Applications/xampp/bin/php</nowiki>}} * MAMP PRO on on {{Mac}} input the command ls {{kbd | key=<nowiki>/Applications/MAMP/bin/php/php*/bin/php</nowiki>}} to find the suitable version you want e.g. {{kbd | key=<nowiki>/Applications/MAMP/bin/php/php8.1.13/bin/php</nowiki>}} If you are using zsh. Input the command {{kbd | key=<nowiki>vi ~/.zshrc</nowiki>}} to edit the file<ref>[https://castion2293.medium.com/mac%E4%B8%AD%E5%8D%87%E7%B4%9Aphp%E7%89%88%E6%9C%AC%E4%B8%A6%E8%A8%AD%E7%82%BA%E9%A0%90%E8%A8%AD-d7e6fdad9cc2 Mac中升級php版本並設為預設. 確認目前PHP的版本 | by Nick Zhang | Medium]</ref> 原檔案內容 <pre> alias php='/Applications/MAMP/bin/php/php7.4.21/bin/php' </pre> 修改後檔案內容 <pre> alias php='/Applications/MAMP/bin/php/php8.1.13/bin/php' </pre> And then relaunch the shell
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki共筆:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)