windows - Run PHP Composer Commands from Client to Server
Get the solution ↓↓↓We have a php project shared on a server on our local network. Developers are working on the same project using the client pcs. Now we need to run the composer commands on the main project without giving them access to our main server. Is it possible to run php composer commands from local client to local server?
Answer
Solution:
First off all do not let clients to access composer by any means as the can upload a shell directly to your server and all of your hosted domains can be hacked.
Let's guess you have no problem with this issue,
you have to be confirm that composer is accessible from command line directly.
composer ** **
like thisuse
exec
,shell_exec
etc command from any php script directly.Be sure that all of your clients have permission to access composer (if you are in linux)
Note: It is a very bad practice to let them get access to composer. Your server may be compromised.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: installation failed, reverting ./composer.json and ./composer.lock to their original content.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.