Symfony 2.5 deployment and cahce issues - symfony

I'm working on an old Symfony 2.5 application. I don't have SSH access on the server, I can't do the cache:clear command or any other Symfony command. I don't have access to the git repository either. I'm working with a manual backup made from the production server.
I made some changes to the Twig template, the changes are shown in DEV but in Production, the changes do not appears.
If I manually delete the /cache/prod/twig folder from the server, will it clear the cache and can it break the site.
There is also a 'deploy' file, which is a shell script, but I don't know which deployment platform has been used in the past with this file. Does someone know about this file.
Thanks

Related

Symfony 2.7 - Changes to Views in shared hosting not working

I'm working on a website developed on Symfony 2.7 and hosted on a shared host. It seems like views are served from Symfony cache created with assetic library. These cache files are not re-generated automatically after making changes to views. How do I apply changes in such scenario?
After doing some changes, you should clear the cache by running this command:
php bin/console cache:clear --env=prod
I had the same issue with a shared hosting. I had to connect to the server (ssh/ftp) and manually delete the cache folder generated for twig.
This cache folder in production mode and for that Symfony version is located at app/cache/prod/twig.
I hope it helps.

Symfony project works on live server but not on wamp

I am assigned a symfony project. It is my first project, so I transfered the symfony files from live server to local wamp (win 7) in order to do some tests. While the site works in live and demo server ( I transfered it by myself) in my local wamp it throws error 500. So I suppose there is a problem with my server and not the project itself. php log file shows nothing. Also I have enabled rewrite module, php accelerator and minimum requirements are met. How can I debug it? I would like to give more info but unfortunately I can't even find what causes error 500... Any help is much appreciated...
Try this :
composer run-script post-update-cmd
See this : Symfony2 updating bootstrap.php.cache
Your bootstrap.php.cache was build on UNIX and won't work in Windows + it contains absolute paths.

Migrating Symfony Project from Windows to Server in Linux

Once my web application is running on local, I want to pour it into a server. Whenever I upload it, I'm having problems with the routing staff.
I guess it is searching on local routes (in full paths) instead of server ones.
So this is the error given:
Warning:
file_get_contents(C:\xampp\htdocs\MyApp\src\MyBundle/Resources/views/Default/index.html.twig):
failed to open stream: No such file or directory
Obviously, it is mixing Windows routing(computer) with Linux paths (server).
I have been looking for the config files or whatever, searching in the routing files but nothing changed.
*Edit: I am currently using 2,8 version of Symfony
First, you should make sure you’re not uploading the app/cache directory, or that you’re clearing the cache after uploading.

deploying wabapps (e.g. moodle) on heroku

What is the proper way to deploy webapps on Heroku? I'm installing Moodle, but the same procedure should apply to e.g. Drupal or Wordpress. What I hace done is to unzip Moodle locally, then uploaded it using git to Heroku. When I then visit my site I get the option to install it and select the database, which works fine. The problem is that the install procedure saves information in the filesystem on the server, which gets overwritten next time I deploy my app. So what is the proper way of doing this?
You have to pre-configure your app with all of the database settings before you deploy to Heroku. So either do a fake "install" on your local environment, or manually edit your php config files.
As you've discovered, Heroku's filesystem is not persistent: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem.

How can I deploy ASP.NET (mvc) site using GIT and for ex. beanstalkapp.com via FTP?

The problem is, that when I commit project directory, there is uploaded everything including source code.
Not really sure why you want to upload via FTP? You shouldn't commit your own compiled binaries to source control for deployment though.
You could take a look at AppHarbor, just push your code with git and it will be build and deployed automatically.
more about AppHarbor
Real alternatives to Windows Azure PaaS (web role)?
Does it matter? Since asp.net pages can be compiled on the server, having source files on the web server is sometimes normal so IIS knows not to allow access to them.
That said, uploading output binaries into source control is generally a bad idea - it is better to do the deployment from your build server.
Actually, this is kind of hard.
For months, I've tried to automatize our deployment, without absolute success. For my experience, I can see only way to do that:
Have a build server on your deployment machine (or same network)
A build server will pull out your code from repository, say, once per minute and will check for modifications. If there's modifications, it will execute the build scripts related to this project. I suggest you to use TeamCity, because it is very easy to use compared to CruiseControl (I'm not sure if you can use Git with TFS). You can program your build server for build your solution or project and after, you can execute an msbuild script to copy the files to the production folder (e.g: c:\inetpub\yourapp or \\my_server\inetpub\yourapp). You can use MSBuild's Copy Task to do that.
UPDATE 1: I didn't tried, but if helps, you can push to an FTP server using git-ftp
UPDATE 2: Seems that some guy did some workarounds and successfully deployed his app using git and FTP.

Resources