0

I want to deploy my Symfony2 project into my server and capifony but I have a problem:

[server.com] executing command
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/css: No such file or directory
*** [err :: server.com] 
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/images: No such file or directory
*** [err :: server.com] find: /home/app/src/releases/20120207163503/web/js
*** [err :: server.com] : No such file or directory

the script continue but I have others errors

* executing "cd /home/app/src/releases/20120207163503 && /usr/local/php5/bin/php bin/vendors install --reinstall"
servers: ["server.com"]
[server.com] executing command
 ** [out :: server.com] X-Powered-By: PHP/5.3.8-pl0-gentoo
 ** [out :: server.com] Content-type: text/html
 ** [out :: server.com] 
 ** [out :: server.com] <br />
 ** [out :: server.com] <b>Warning</b>:  Wrong parameter count for parse_ini_file() in <b>/home/app/src/releases/20120207163503/bin/vendors</b> on line <b>69</b><br />
  ** [out :: server.com] <br />
  ** [out :: server.com] <b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/app/src/releases/20120207163503/bin/vendors</b> on line <b>73</b><br />
 *** [err :: server.com] sh: ./vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php: No such file or directory
 *** [err :: server.com] sh: ./app/console: No such file or directory
 *** [err :: server.com] sh: ./app/console: No such file or directory
     command finished in 369ms

I have followed the ServerGrove tutorial

Here is my deploy.rb file

set :serverName,   "server.com" # The server's hostname
set :repository,   "file:///Applications/MAMP/htdocs/sf2"

set :domain,      "server.com"
set :deploy_to,   "/home/app/src" # Remote location where the project will be stored
ssh_options[:port] = "22"

set :scm,         :git
set :deploy_via,  :rsync_with_remote_cache
set :user,        "root"

# Roles
role :web,        domain
role :app,        domain
role :db,         domain, :primary => true

set  :keep_releases,  3 # The number of releases which will remain on the server
set  :use_sudo,       false

# Update vendors during the deploy
set :update_vendors, true

# Set some paths to be shared between versions
set :shared_files,    ["app/config/parameters.ini"]
set :shared_children, [app_path + "/logs", web_path + "/uploads", "vendor"]

EDIT: I have change the php version to 5.3.8 and exactly the same error.

halfer
  • 19,824
  • 17
  • 99
  • 186
Sam
  • 779
  • 3
  • 18
  • 39
  • You seem to be using PHP 5.2 on your server. Symfony2 requires PHP 5.3.2 or higher. – richsage Feb 08 '12 at 10:47
  • Hi, thank you for your answer but I have tried with php 5.3.8, and I have exactly the same error – Sam Feb 08 '12 at 10:54
  • It seems that the error come from when /usr/local/php53/bin/php bin/vendors install --reinstall" – Sam Feb 08 '12 at 11:05

3 Answers3

0

The problem does not come from Capifony. It looks like you just have to add a new line at the end of your deps file. Then try to deploy again.

Hope that helps!

Quentin
  • 2,529
  • 2
  • 26
  • 32
  • Hi thanks for your help, but do you mean that i have to add a new empty Line? I have add a new empty Line and have the exact same error... – Sam Feb 08 '12 at 20:26
0

Make sure that your project is working on your local computer (run ./bin/vendors install --reinstall) before you try capifony (official documentation) to another server.

To me it looks like you are using mismatched versions of dependencies. I would compare content of these files (./bin/vendors, deps, deps.lock) with those packaged in Symfony Standard distribution.

Hope it helps :)

Anton Babenko
  • 6,586
  • 2
  • 36
  • 44
  • Thanks for your help. First php bin/vendors install --reinstall is ok on my local machine – Sam Feb 08 '12 at 21:47
  • i have tried using ./bin/vendors, deps, deps.lock from v2.0.10 but same errors occurs – Sam Feb 08 '12 at 22:11
0

I have found the problem.

It was because git wasn't installed into the server for all users...

Sam
  • 779
  • 3
  • 18
  • 39