If you followed my previous post to get mopa bootstrap working with assetic, you might be running into a problem like the error below.
After some digging around I found this which points to a forum post that tells us to comment out the two un-commented lines in /Applications/MAMP/Library/bin/envvars. Give that a shot and see if it works for you too!
[exception] 500 | Internal Server Error | RuntimeException
[message] The process stopped because of a "0" signal.
[1] RuntimeException: The process stopped because of a "0" signal.
at n/a
in .../vendor/symfony/symfony/src/Symfony/Component/Process/Process.php line 375
at SymfonyComponentProcessProcess->wait(null)
in .../vendor/symfony/symfony/src/Symfony/Component/Process/Process.php line 175
at SymfonyComponentProcessProcess->run()
in /Users/mikeosterhout/Sites/builditawesome-sandbox/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php line 123
at AsseticFilterLessFilter->filterLoad(object(FileAsset))
in /Users/mikeosterhout/Sites/builditawesome-sandbox/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php line 62
at AsseticFilterFilterCollection->filterLoad(object(FileAsset))
in /Users/mikeosterhout/Sites/builditawesome-sandbox/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php line 90
at AsseticAssetBaseAsset->doLoad('
@import "../bootstrap/less/bootstrap.less";
I have been using Symfony2 a lot lately and I recently had the need to use the Country Form Type. When I tried to use the form type $builder->add('country', 'country'); I was getting the following error:
Fatal error: Class 'ResourceBundle' not found in .../vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php on line 51
This error is not very helpful but I can tell you that it is a result of not having the intl extension enabled. Here is how you can get it set up.
1. Get the intl.so file
I found this to be easier than this, but it does require that you install mac ports and you will have a opt folder left over on your computer when you are done.
2. Place the intl.so file in the extension folder
For php 5.3.14 that would be this folder /Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626
If you are using a different version of php 5.3 you should just have to change that in the path. I am still looking into how this would be handled with php 5.4, if anyone knows please post in the comments.
3. Enable the intl extension in php.ini
You just need to add extension=intl.so someplace in your php.in file
4. Done!
However, with php 5.4 already here we will have to revisit this post soon.
new MopaBundleBootstrapBundleMopaBootstrapBundle(),
7.Start using it! I used vendor/mopa/boostrap-bundle/Mopa/Bundle/BootstrapBundle/Resources/views/base.html.twig as a template for my own view file...
[edit] if you run into issues with symlinking check out the last couple posts on this thread http://www.princexml.com/bb/viewtopic.php?f=4&t=3204 - you will have to comment out the uncommented lines in the envvars file
Have you ever tried to create a link dynamically in php with a URL such as 'facebook.com'? If you have you know that URLs like that don't work so well. It will simply append the URL onto the end of the current page. So if the visitor is on a page like mysite.com/my-page they will get a link like mysite.com/my-pagefacebook.com.
This is kind of annoying, so I created a helper function that will add the http:// part if it is missing from the string you are trying to create a link for.
Check out the function below. It simply checks to see if the $url contains either http:// or https:// and if it doesn't it will append http:// to the end.
This function could probably be even better, but it is pretty useful as is. Feel free to suggest any improvements in the comments below.