简体   繁体   English

安装没有弯曲的Composer(本地)

[英]Install Composer without curl (local)

I have to run a Laravel Project on a customers Server, Mcrypt is already installed but I can't run "composer install" because composer is missing. 我必须在客户服务器上运行Laravel Project,已经安装了Mcrypt,但由于缺少作曲器而无法运行“ composer install”。 Problem here is, that I can't run 问题是我不能跑步

curl -sS https://getcomposer.org/installer | php

because I don't get a connection to other server "outside". 因为我没有“外部”连接到其他服务器。

So does anybody know, if I can save the file local and upload it with FTP and run it? 那么有人知道吗,是否可以将文件保存在本地并通过FTP上传并运行? Already tried to save the /installer as a file and run it with "asdf | php" but it didn't work. 已经尝试将/ installer保存为文件,并使用“ asdf | php”运行它,但是它不起作用。 I also downloaded the composer.phar file but how do I run the .phar file? 我还下载了composer.phar文件,但是如何运行.phar文件?

Thanks!! 谢谢!!

Downloading the composer phar file as you have done is a sufficient alternative. 完成后下载composer phar文件是一个足够的选择。

Usage: 用法:

php composer.phar command

Docs: https://getcomposer.org/doc/01-basic-usage.md 文件: https//getcomposer.org/doc/01-basic-usage.md


However, I am fairly sure composer depends on curl, at least as far as updating/installing packages goes. 但是,我相当确定作曲家至少在更新/安装软件包方面依赖curl。 So if you're intending to use those features you'll need curl anyway.* 因此,如果您打算使用这些功能,则仍然需要卷曲。*

*citation needed. *需要引用。

edit : 编辑

I am currently looking through the composer source and I can't yet find a reference to curl. 我目前正在浏览作曲者资源,但找不到卷曲的参考。 It appears to use stream_context_create, and the manual page for that method doesn't mention curl either. 似乎使用了stream_context_create,该方法的手册页也没有提到curl。 So maybe it'll work without curl... 所以也许它可以不卷曲地工作...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM