[Docs] Clarify usage of `echo` for adding extensions
Opened this issue · 0 comments
TheDevick commented
Hey!
I noticed that the current documentation here suggests using the echo {message} > {file}
command to add new extensions to PHP. There's a potential risk associated with it. Using the >
operator will overwrite the entire file!
I recently lost all the configurations in my php.ini
file when trying to add a new extension. While I understand that this was my fault, I believe we can improve the documentation to prevent such accidents in the future.
Proposed Improvement:
I suggest updating the documentation to use the >>
operator instead of >
Here's the revised command:
pecl install redis
pecl install imagick
echo "extension=redis.so
extension=imagick.so" >> $(asdf where php)/conf.d/php.ini