0

I'm trying to deploy for first time my application to production. For this I want to ue Capifony. I followed Capifony.org instructions but I'm stuck with this error

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php on line 35
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in app/console on line 13
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in app/console on line 13

My hosting provider gives PHP 5.2 as default, but I have access to 5.3 so I need to set up php path on Capifony config.

This is my deploy.rb

#Application
set :application, "acme"
set :domain,      "#{application}.com"
set :deploy_to,   "/home/user/public_html/acme"
set :app_path,    "app"

#Repository
set :repository,  "git@bitbucket.org:user/repo.git"
set :scm,         :git
set :deploy_via,  :rsync_with_remote_cache
set :git_enable_submodules, 1 

set :model_manager, "doctrine"

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 Rails migrations will run

set  :keep_releases,  3

#Symfony2
set :shared_files,      ["app/config/parameters.ini"]
set :shared_children,     [app_path + "/logs", web_path + "/uploads", "vendor"]
set :update_vendors, true
set :dump_assetic_assets, true

#Server connection
set :user, "user"
ssh_options[:forward_agent] = true
ssh_options[:port] = "2222"
set :use_sudo, false

set :php_bin, "/opt/php53/bin/php"

And finally on my development environment I never got those errors.

Edit: Command executed by capifony when error is thrown

/opt/php53/bin/php bin/vendors install --reinstall

Symfony    -> 2.0.12
Capifony   -> 2.1.5
Capistrano -> 2.11.2

console line 13: use Symfony\Bundle\FrameworkBundle\Console\Application;

4

1 回答 1

0

As a workaround, adding PHP 5.3 path at the beginning of the PATH solve this issue.

于 2012-04-07T09:57:17.070 回答