Posts Tagged composer
Composer could not be installed b/c of php.ini setting
Posted by gullele in PHP, Uncategorized on December 22, 2015
trying to install composer on your server and got something like
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
And specifically for suhosin.executor.include.whitelist = phar?
Then the fix is to modify php.ini on the fly while you are passing the installer
sudo curl -sS https://getcomposer.org/installer | php -d suhosin.executor.include.whitelist=phar
That should take care of modifying the php.ini on the fly without you updating the config and re-bouncing the server.
error = MongoId not found in symfony application
Posted by gullele in Amazon EC2, Doctrine, Symfony on November 15, 2015
I got the MongoId not found error on the the application I recently moved to remote server.
The app is working fine locally and the problem appears to happen on the remote one only.
The problem seems obvious, and I checked the mongo version I have locally vs the version I have on the remote – they are different
I have newer version of mongo installed on the remote server. And the doctrine orm handling my mongo objects was also older.
I updated my doctrie orm on composer as
"doctrine/orm": "2.4.6",
This took care of the problem – at least for now 😉
Deploying Symfony app on micro instance of aws – Amazon EC2
Posted by gullele in Amazon EC2, PHP, Symfony on November 15, 2015
The major issue you would face is memory. Yeah, the instance comes with small memory allocation and anything memory intensive task might not work there. Your composer install command might not do anything as well.
The major one would be Composer install just hangs and even aborts the process
When you are issuing
composer install
It will eat a bit of memory and doing it on the instance might not work as expected.
Here are the methods I used to overcome it.
1. Incremental install
On you composer.json file, you can try to list only one or two packages at a time and issue composer update vendor/package and if your individual packages are small enough you might get away with it. In my case this didn’t work
2. Ship your vendor from your local machine to the instance
yeah, just have all your composer install where you will be comforted by memory in Gigabytes and just zip and ship it to your instance.
On your local machine
tar -cf vendor.tar.gz /path/to/vendor/folder
Once you have the tar or zip of any of your favorite compressed file
scp -i /path/to/your/pem/file vendor.tar.gz ec2-user@ec2-domain-goes-here:/path/on/instance
This is assuming this will transfer your vendor file to instance.
Then log into your instance and just uncompress the file and put it on the root directory of your application.
This would be just the half of the work.
Then you will need to generate the bootstrap cache file
composer run-script post-update-cmd
yeah.. this will take care of creating the cache file of the bootstrap along with other stuffs that you put on your composer.json post-update-cmd part.
Sometimes you might want to give the write access to the app/cache and app/logs folders as well
ENjOY
The dist file “app/config/parameters.yml.dist” does not exist. Check your dist-file config or create it.
Posted by gullele in Symfony, Uncategorized on July 20, 2013
Are you upgrading symfony to 2.3. Bum! This will be the problem you would face after upgrading the composer.json file and trying to doÂ
composer.phar install
the solution is simple. Just copy the existing parameters.yml file from app/config/ folder to new file called parameters.yml.dist and rerun the command