Symfony and Azure Distribution Bundle - assets in Azure - php

I am trying to deploy an existing Symfony 2.1 application to Azure. For this I am using the Azure Distribution Bundle, and I am trying to deploy assets to Azure as documented here.
However, I am getting an error when doing windowsazure:package to create the package:
Catchable Fatal Error: Argument 2 passed to WindowsAzure\DistributionBundle\Deployment\Assets\BlobStrategy::__construct() must be an instance of WindowsAzure\Blob\BlobRestProxy, none given, called in C:\IGPR\igpr\app\cache\azure\appAzureDebugProjectContainer.php on line 2361 and defined in C:\IGPR\igpr\vendor\beberlei\azure-distribution-bundle\WindowsAzure\DistributionBundle\Deployment\Assets\BlobStrategy.php line 35
Here is the relevant section of my config.yml:
windows_azure_distribution:
...
services:
blob:
default: UseDevelopmentStorage=true
azureprod: DefaultEndpointsProtocol=http;AccountName=myaccountname;AccountKey=MyVeryLongAccOUntKeY==
assets:
type: blob
connection_name: azureprod
Any ideas? Seems that the Blob proxy cannot be created. I get the same error if I try to use the local development storage.
The bundle is installed via Composer.

Looks like this was a bug in the Azure Distribution Bundle, which the maintainer has now fixed.

Related

Get API Platform documentation running in an existing Symfony 3.4 appliation

Following the advice from this thread, I ran the following in my existing Symfony 3.4 application's home directory:
composer require api-platform/core v2.2
... after which composer spit out a bunch of green messages confirming successful installation.
However, when I visit http://localhost:8443/ as suggested here, I get 'can't establish a connection'.
My Symfony app is still running normally when I go to http://localhost. Are there additional steps required to get the API Platform documentation running?
(For Symfony2/3)
Use this package with composer:
composer require api-platform/core
Configure the bundle manually in AppKernel.php:
$bundles = [
// [...]
new ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle(),
];
Add this in your app/config/routing.yml
api:
resource: '.'
type: 'api_platform'
prefix: '/api' # Optional
If needed, add your specific configuration in app/config/config.yml
api_platform:
title: 'specific name'
(complete configuration https://api-platform.com/docs/core/configuration/)
I hope it will help.

Google App Engine and Laravel, some bug?

I am trying to deploy my laravel app into the GCS (Google Cloud Storage).
While doing a deployment:
gcloud preview app deploy ./app.yaml --project="cuisinedegeek-151614"
I got these errors:
WARNING: The gcloud preview app command group is deprecated; please use the gcloud app commands instead.
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.preview.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$ gcloud app deploy ./app.yaml --project="cuisinedegeek-151614"
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$ gcloud app deploy ./app.yaml --project="cuisinedegeek-151614"
ERROR: The [application] field is specified in file [/home/epistolshow/CuisineDeGeek/app.yaml]. This field is not used by gcloud and must be removed. Project name should instead be specified either by gcloud config set project MY_PROJECT or by setting the --project flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App Engine app configuration.
epistolshow#cuisinedegeek-151614:~/CuisineDeGeek$
Which doesn't make sense because app.yaml:
runtime: php55
handlers:
- url: /favicon\.ico
static_files: public/favicon.ico
upload: public/favicon\.ico
- url: /assets/(.*\.(htm$|html$|css$|js$|png$))
static_files: public/assets/\1
upload: public/assets/(.*\.(htm$|html$|css$|js$|png$))
application_readable: true
- url: /.*
script: public/index.php
EDIT : Thank's to Jarmod, I've got this now :
x#x:~/CuisineDeGeek$ gcloud app deploy ./app.yaml
Please help me.

Symfony2 Memcached - LeaseWeb/LswMemcacheBundle Not work in development mode

Am using Symfony2 in my project and i added this bundle "LeaseWeb/LswMemcacheBundle" to use memcahced , the problem that its work fine for me in the production mode and in development mode show me this error :
ContextErrorException: Catchable Fatal Error: Argument 3 passed to
Lsw\MemcacheBundle\DataCollector\MemcacheDataCollector::addClient()
must be an instance of
Lsw\MemcacheBundle\Cache\LoggingMemcacheInterface, instance of
Lsw\MemcacheBundle\Cache\AntiDogPileMemcache given, called in
/home/www/project/app/cache/dev/appDevDebugProjectContainer.php on
line 2166 and defined in
/home/www/project/vendor/leaseweb/memcache-bundle/Lsw/MemcacheBundle/DataCollector/MemcacheDataCollector.php
line 40
And here is my configuration :
lsw_memcache:
session:
client: default
clients:
default:
hosts:
- { dsn: localhost, port: 11211 }
Any one can help with this ?
Thank you in advance ...
I cant see any problem with your configuration.
The error message should not occur with the current version of the bundle.
Which Version of the bundle do you use?
This is a reported issue in the symfony bundle, until now is not fixed
https://github.com/LeaseWeb/LswMemcacheBundle/issues/41
This is solved, its was need libmemcache version 1.0.10 or higher and install last version of memcahced .

Getting 'CG\Proxy\InterceptorLoaderInterface' error with JMS Bundle in symfony 2

I am trying to install symfony2 JMS DI Extra bundle.
But i keep getting this error
Fatal error: Interface 'CG\Proxy\InterceptorLoaderInterface' not found
in
/home/xxxxx/public_html/XXXX/Symfony/vendor/bundles/JMS/AopBundle/Aop/InterceptorLoader.php
on line 30
I have found the solution here
https://github.com/schmittjoh/JMSAopBundle/issues/7
But could not able to understand where to fix the path
I think that's cg-library is missing. Open a command prompt into your Symfony vendor folder and issue:
git clone https://github.com/schmittjoh/cg-library.git cg-library
The add cg-library into your deps file:
[cg-library]
git=https://github.com/schmittjoh/cg-library.git
target=/cg-library

FOSRest gives fatal error in symfony 2

i am trying to install FOSRest & FOSRestBundle
initially , i have specified following settings in the deps
[FOSRest]
git=git://github.com/FriendsOfSymfony/FOSRest.git
target=fos/FOS/Rest
[FOSRestBundle]
git=git://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
But that cause me into following error when i access http://localhost/Symfony/web/app_dev.php/
Fatal error: Declaration of
FOS\RestBundle\Routing\Loader\RestRouteLoader::setResolver() must be
compatible with that of
Symfony\Component\Config\Loader\LoaderInterface::setResolver() in
/home/logicase/public_html/Symfony/vendor/bundles/FOS/RestBundle/Routing/Loader/RestRouteLoader.php
on line 29
After that i tried following setting to make to the master branch and above error remains the same
[FOSRest]
git=git://github.com/FriendsOfSymfony/FOSRest.git
target=fos/FOS/Rest
version=origin/2.0
[FOSRestBundle]
git=git://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
version=origin/2.0
and now when i run php ./bin/vendors install
i get following message in console.
Installing/Updating FOSRest 5eb800bd63ba84e5fc7028386cb66373bc3efafc fatal: ambiguous argument 'origin/2.0': unknown revision or path not
in the working tree. Use '--' to separate paths from revisions
Installing/Updating FOSRestBundle c11ab9d990a1e0e979b1c8ab72cc9793b4b2dcb5 fatal: ambiguous argument
'origin/2.0': unknown revision or path not in the working tree.
I tried following settings for FOSRest which solved my problem for symfony 2
[FOSRest]
git=git://github.com/FriendsOfSymfony/FOSRest.git
target=fos/FOS/Rest
version=origin/0.6
[FOSRestBundle]
git=git://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
As you can see, there is no 2.0 branch : https://github.com/FriendsOfSymfony/FOSRestBundle/branches https://github.com/FriendsOfSymfony/FOSRest/branches The installation documentation does not talk about it. You should just remove the version lines.

Categories