Proc_open和Capifony问题 [英] Proc_open and Capifony issue

查看:110
本文介绍了Proc_open和Capifony问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Symfony2.1的Web应用程序中使用Capifony,以加快部署过程。

I'm trying to use Capifony with my web app in Symfony2.1 to accelerate the deployment process.

这是我的deploy.rb文件:

Here is my deploy.rb file :

default_run_options[:pty] = true
set :application, "mywebsite"
set :domain,      "mywebsite.com"
set :deploy_to,   "~/git/mywebsite.git"
set :app_path,    "app"

set :repository,  "git@github.com:myname/mywebsite.git"
set :scm,         :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set :user, "myserveruser"  # The server's user for deploys


set :model_manager, "doctrine"
# Or: `propel`

role :web,        domain                         # Your HTTP server, Apache/etc
role :app,        domain                         # This may be the same as your `Web` server
role :db,         domain, :primary => true       # This is where Symfony2 migrations will run

set :use_composer, true
set :update_vendors, true


set :use_sudo,      false
set :keep_releases,  3
set :shared_files,      ["app/config/parameters.yml"]
set :shared_children,   [app_path + "/logs", web_path + "/uploads"]

set :deploy_via, :rsync_with_remote_cache
set :ssh_options, { :forward_agent => true }
ssh_options[:keys] = %w(/.ssh/id_rsa)
ssh_options[:port] = xxxx


# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL

这是我的错误:

 The Process class relies on proc_open, which is not available on your PHP installation.

当脚本运行 php composer.phar update

此处有更多详细信息: http://pastebin.com/hNJaMvwf

more details here : http://pastebin.com/hNJaMvwf

但是我在共享托管中,托管人告诉我无法启用proc_open,有办法让它正常工作吗?

But I'm in a shared hosting and my hoster told me that I can't have proc_open enabled, is there a way to get it working though ?

非常感谢您的帮助!

推荐答案

Composer需要以便能够运行命令行进程(它使用symfony / process组件执行此操作)。如果您的主机不支持proc_open,则无法运行Composer。

Composer needs to be able to run command-line processes (it does this using the symfony/process component). There is no way to have Composer run if your host does not support proc_open.

作为一种替代部署策略,您可以上传 vendor / 目录手动添加到生产计算机(您可以使用上传功能在Capistrano食谱中)。话虽如此,虚拟服务器现在已经可以负担得起了,我也不建议将Symfony2应用程序部署到共享主机上。也许您应该在寻找其他托管解决方案?

As an alternative deployment strategy, you could upload the vendor/ directory manually to the production machine (you can use the upload functionality in your Capistrano recipe). That said, virtual servers are affordable these days, and I would not recommend deploying Symfony2 applications to a shared hosting anyway. Maybe you should be looking for a different hosting solution?

这篇关于Proc_open和Capifony问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆