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