error updating doctrine with composer may be a bug? - symfony

I am getting the following error when i try to update doctrine with composer
[RuntimeException]
Failed to clone https://github.com/doctrine/dbal.git via git, https protocols, aborting.
- git://github.com/doctrine/dbal.git
error: could not lock config file .git/config: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
- https://github.com/doctrine/dbal.git
error: could not lock config file .git/config: Permission denied
error: cannot open .git/FETCH_HEAD: Permission denied
I am using this line for doctrine in my composer.json
"doctrine/doctrine-bundle": "1.2.*#dev",

Please check that the doctrine folder within vendor has correct permissions. For me removing the doctrine folder and running update again fixed the problem.
$ sudo rm -rf vendor/doctrine ; ./composer update

Related

Error: EACCES: permission denied, mkdir '/foldername'

While trying to deploy my meteor app using:
meteor build /foldername --mobile-settings settings.json --server=https://appname.herokuapp.com/
I get this error:
/Users/username/.meteor/packages/less/.2.7.9.1rcbr4q++os+web.browser+web.cordova/plugin.compileLessBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
throw error;
^
Error: EACCES: permission denied, mkdir '/foldername'
at Error (native)
at Object.fs.mkdirSync (fs.js:794:18)
at Object.wrapper [as mkdir] (/tools/fs/files.js:1586:35)
at Object.files.mkdir_p (/tools/fs/files.js:445:11)
at buildCommand (/tools/cli/commands.js:977:11)
at Command.func (/tools/cli/commands.js:831:12)
at /tools/cli/main.js:1483:23
How do I fix it?
it's a permission issue. you have to be a super user before run your code. or else
sudo meteor build /foldername --mobile-settings settings.json
--server=https://appname.herokuapp.com/
use the above code in your terminal.
mobile-settings and server aren't described in the doc.
You are trying to create a bundle in / wihout root rights.
Try meteor build ../foldername

Bootstrap 3 in Symfony2

I'm trying to use bootstrap in my symfony project . But when I configure json file through this error. However I have included
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle()
I have looked up from here
error:
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Class 'Braincrafted\Bundle\BootstrapBundle\BraincraftedBo
otstrapBundle' not found in /home/kanat/Public/bootstrap/app/AppKernel.php
I have looked up from here
like the error says, its having touble clearing the cache, that could be a directory permission issue,set the folder permissions to read write and execute and then try to clear cache again, (in linux it would be sudo chmod -R 777 *)

Meteor 0.9.0 Error: EACCES, permission denied '/Users/Jasper/.meteorsession'

After updating to meteor 0.9.0 I get the following error when launching an app to localhost
Error: EACCES, permission denied '/Users/Jasper/.meteorsession'
at Object.fs.openSync (fs.js:432:18)
at Object.fs.readFileSync (fs.js:289:15)
at readSessionData (/Users/Jasper/.meteor/packages/meteor-tool/.1.0.26.1fmrgj1++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/auth.js:137:24)
at Object.tryRevokeOldTokens (/Users/Jasper/.meteor/packages/meteor-tool/.1.0.26.1fmrgj1++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/auth.js:331:10)
at main.registerCommand.name [as func] (/Users/Jasper/.meteor/packages/meteor-tool/.1.0.26.1fmrgj1++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/commands.js:197:8)
at /Users/Jasper/.meteor/packages/meteor-tool/.1.0.26.1fmrgj1++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/tools/main.js:1212:23
Starting the meteor session with sudo meteor fixes this problem but I was wondering what causes this and how it can be fixed.
Thanks in advance
Just delete the .meteorsession and restart meteor and it will create a new .meteorsession directory.
Run the following code in your terminal:
rm -rf /Users/Jasper/.meteorsession

Symfony2 Permission Denied error while creating a bundle

First of all, I want to say I might be missing something basic, but I'm actually new in Symfony.
While I'm creating a bundle from terminal(I'm using mac), it gives me that error;
[UnexpectedValueException]
The stream or file "/Applications/MAMP/htdocs/Symfony/app/logs/dev.log" cou
ld not be opened: failed to open stream: Permission denied
Here is the code for creating a bundle
php app/console generate:bundle --namespace=Ens/JobeetBundle --format=yml
I believe that your permissions were not set correctly. Here is how to set it up - http://symfony.com/doc/current/book/installation.html#configuration-and-setup

symfony2 load fixtures gives error, please advise on how to fix?

i am on part Updating the blog entity where i need to load the fixtures with command:
$ php app/console doctrine:fixtures:load
but i get an error:
php app/console doctrine:fixtures:load
> purging database
> loading Blogger\BlogBundle\DataFixtures\ORM\BlogFixtures
> loading Blogger\BlogBundle\DataFixtures\ORM\CommentFixtures
[ErrorException]
Warning: file_put_contents(/home/helloises/symfony2/Symfony/app/cache/dev/doctrine/orm/Proxies/Blogge rBlogBundleEntityBlogProxy.php): failed to open stream: Permission denied in
/home/helloises/symfony2/Symfony/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php
line 155
please help?
thanks
This is a permission error:
You don't have the write permission in the app/cache/dev/doctrine/orm/Proxies directory of your project so doctrine fails to create its proxy classes.
Maybe you gave the write permission to your HTTP server user (so the web works) but not to the user you used to execute the command.
See the Setting up Permissions paragraph in http://symfony.com/doc/current/book/installation.html#configuration-and-setup

Resources