Ich versuche, zum ersten Mal meine Anwendung in der Produktion zu implementieren. Dafür möchte ich Capifony. Ich folgte Capifony.org Anweisungen, aber ich bin fest mit diesem FehlerCapifony: parse Fehler auf build_bootstrap.php
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
Mein Hosting-Provider PHP 5.2 als Standard gibt, aber ich habe Zugang zu 5,3, so brauche ich php Pfad auf Capifony Config einzurichten.
Das ist mein 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, "[email protected]: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"
Und schließlich auf meiner Entwicklungsumgebung Ich habe nie diese Fehler.
Edit: von capifony ausgeführt Befehl, wenn Fehler
/opt/php53/bin/php bin/vendors install --reinstall
Symfony -> 2.0.12
Capifony -> 2.1.5
Capistrano -> 2.11.2
Konsolenlinie 13 geworfen wird: Verwenden Sie Symfony \ Bundle \ FrameworkBundle \ Console \ Application;
Welche Version von Symfony und Capifony verwenden Sie? Was ist in Zeile 13 in deiner App/Konsole? –
Ich habe die Frage hinzugefügt. Es ist komisch, es scheint, als würde PHP 5.2 statt 5.3 verwenden, obwohl 5.3 auf dem Befehl angegeben ist. – Axxiss
Verwendet PHP 5.2 in der Tat. Beide Dateien in der ersten Zeile haben #!/Usr/bin/env php Wenn ich sie änderte und ich den Pfad zu PHP 5.3, beim Aktualisieren von Anbietern das Problem war weg. Aber offensichtlich ist das Problem bei der Bereitstellung einer neuen Version immer noch vorhanden, da der Quellcode aus einem Repository abgerufen wird. – Axxiss