<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkcBQHo-cSp7ImA9WhRaE0U.&quot;"><id>tag:blogger.com,1999:blog-19309483</id><updated>2012-02-16T02:27:31.459-08:00</updated><title>devtime</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>54</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Devtime" /><feedburner:info uri="devtime" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry gd:etag="W/&quot;DEUGQnk6eCp7ImA9WhRTGU0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-1363918874233369746</id><published>2011-11-09T21:43:00.000-08:00</published><updated>2011-11-09T22:23:43.710-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-09T22:23:43.710-08:00</app:edited><title>Symfony2 FOSTwitterBundle TwitterProvider</title><content type="html">&lt;a href='http://cheezburger.com/View/5417609472'&gt;&lt;img class='event-item-lol-image' src='http://images.cheezburger.com/completestore/2011/11/9/9a61c9c0-8c7b-42ab-814b-04b4f47d4496.jpg' id='_r_a_5417609472' title="Symfony2 and Twittter" alt="Symfony2 and Twittter" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are trying to integrate Symfony2 with Twitter, you're probably trying to install FOSTwitterBundle, and you may have faced two problems, one is that you can't create a user session after you login with Twitter and the other one is that there is no TwitterProvider class available as example in the instructions.&lt;br /&gt;&lt;br /&gt;To help you with the second one here is a TwitterProvider class I made based on FacabookProvider.php&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1354209.js?file=TwitterProvider.php"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;To solve the authentication problem on Symfony what I found is that Twitter anywhere only works at client level, so I decided to create a custom login button and built the authorization URL.&lt;br /&gt;&lt;br /&gt;Controller action:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1354239.js?file=gistfile1.txt"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Twig template:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1354241.js?file=gistfile1.txt"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Then after the user authenticates with Twitter, the custom TwitterProvider can get the authentication tokens from the session and authenticate the user in Symfony.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-1363918874233369746?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/1363918874233369746/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=1363918874233369746" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/1363918874233369746?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/1363918874233369746?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/11/symfony2-fostwitterbundle.html" title="Symfony2 FOSTwitterBundle TwitterProvider" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DkIGRno9fSp7ImA9WhZaE0o.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-8446141990257766312</id><published>2011-06-28T19:56:00.000-07:00</published><updated>2011-06-29T12:08:47.465-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-29T12:08:47.465-07:00</app:edited><title>Capifony: Send an email after deployment</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-TmwAHS0o7LQ/Tgs0S3oyadI/AAAAAAAAADw/U4sRIWIUjBc/s1600/emailmeme.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 200px;" src="http://3.bp.blogspot.com/-TmwAHS0o7LQ/Tgs0S3oyadI/AAAAAAAAADw/U4sRIWIUjBc/s200/emailmeme.jpg" alt="" id="BLOGGER_PHOTO_ID_5623646058479512018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;First, thanks to @cordoval at the #symfony channel for suggesting me to use a symfony2 command to do this.&lt;br /&gt;&lt;br /&gt;To use this command you must have the SwiftmailerBundle enabled. More info &lt;a href="http://symfony.com/doc/2.0/cookbook/email.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This is a simple Symfony2 command to send an email, you should add it to a "Command" directory inside your bundle and replace the namespace to fit your project bundle:&lt;br /&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1052884.js?file=SendEmailCommand.php"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;The email body is just "test" but you can probably modified it you need to.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Test the new command by running the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;php app/console capifony:sendemail emailfrom@server.com emailto@server.com subject&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally, this task will run the capifony:sendemail command after the deployment is complete, be sure to add it to your Capifony script:&lt;br /&gt;&lt;br /&gt;&lt;script src="https://gist.github.com/1052938.js?file=staging.rb"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Want to learn more about Symfony2 console/command-line commands?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/mfony2%20console/command-line%20commands?%20%20http://symfony.com/doc/current/cookbook/console.html"&gt;http://symfony.com/doc/current/cookbook/console.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.craftitonline.com/2011/06/calling-commands-within-commands-in-symfony2/"&gt;&lt;br /&gt;http://www.craftitonline.com/2011/06/calling-commands-within-commands-in-symfony2/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-8446141990257766312?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/8446141990257766312/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=8446141990257766312" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/8446141990257766312?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/8446141990257766312?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/06/capifony-send-email-after-deployment.html" title="Capifony: Send an email after deployment" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-TmwAHS0o7LQ/Tgs0S3oyadI/AAAAAAAAADw/U4sRIWIUjBc/s72-c/emailmeme.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkQDSHYzeip7ImA9WhZbFk8.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-3598979727250002733</id><published>2011-06-19T08:23:00.000-07:00</published><updated>2011-06-20T18:39:39.882-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-20T18:39:39.882-07:00</app:edited><title>How to enable the twig truncate filter (Text extension) in Symfony2 beta5</title><content type="html">&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-N_ZNeCigk_s/Tf4Y1NHhGRI/AAAAAAAAADg/wtdlnojUsCQ/s1600/problem-officer-meme.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 180px; height: 136px;" src="http://2.bp.blogspot.com/-N_ZNeCigk_s/Tf4Y1NHhGRI/AAAAAAAAADg/wtdlnojUsCQ/s320/problem-officer-meme.jpg" alt="" id="BLOGGER_PHOTO_ID_5619956687338281234" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-djcwsOLXD64/Tf4ZQXqOo_I/AAAAAAAAADo/wi_6JqnSoSU/s1600/Fuck-Yeah-meme.jpg"&gt;&lt;br /&gt;&lt;/a&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;Problem ?&lt;/span&gt;&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In previous versions of Symfony2, to enable a extension you needed to add the Text and/or Debug extensions to an "extensions" array in your config.yml&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint"&gt;//app/config/config.yml&lt;br /&gt;# Twig Configuration&lt;br /&gt;twig:&lt;br /&gt; debug:            %kernel.debug%&lt;br /&gt; strict_variables: %kernel.debug%&lt;br /&gt; extensions:&lt;br /&gt;     - twig.extension.debug&lt;br /&gt;     - twig.extension.text&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This was because the extensions were added to the twig.xml file&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;&lt;br /&gt;//vendor/symfony/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml&lt;br /&gt;...&lt;br /&gt;  &amp;lt;service id=&amp;quot;twig.extension.text&amp;quot; class=&amp;quot;Twig_Extensions_Extension_Text&amp;quot; public=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;     &amp;lt;service id=&amp;quot;twig.extension.debug&amp;quot; class=&amp;quot;Twig_Extensions_Extension_Debug&amp;quot; public=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But,  this is the way to do it now :&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;// app/config/config.yml&lt;br /&gt;...&lt;br /&gt;services:&lt;br /&gt; twig.extension.text:&lt;br /&gt;     class: Twig_Extensions_Extension_Text&lt;br /&gt;     tags:&lt;br /&gt;         - { name: twig.extension }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-djcwsOLXD64/Tf4ZQXqOo_I/AAAAAAAAADo/wi_6JqnSoSU/s1600/Fuck-Yeah-meme.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 250px; height: 228px;" src="http://4.bp.blogspot.com/-djcwsOLXD64/Tf4ZQXqOo_I/AAAAAAAAADo/wi_6JqnSoSU/s320/Fuck-Yeah-meme.jpg" alt="" id="BLOGGER_PHOTO_ID_5619957154024694770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I spent some time trying to figure out how to do it, so I hope it helps someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-3598979727250002733?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/3598979727250002733/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=3598979727250002733" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3598979727250002733?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3598979727250002733?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/06/how-to-enable-truncate-filter-text.html" title="How to enable the twig truncate filter (Text extension) in Symfony2 beta5" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-N_ZNeCigk_s/Tf4Y1NHhGRI/AAAAAAAAADg/wtdlnojUsCQ/s72-c/problem-officer-meme.jpg" height="72" width="72" /><thr:total>7</thr:total></entry><entry gd:etag="W/&quot;A0EMRX8_fip7ImA9WhZVE04.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-7355302878641085651</id><published>2011-05-23T21:38:00.000-07:00</published><updated>2011-05-25T09:08:04.146-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-25T09:08:04.146-07:00</app:edited><title>Symfony2 + Twig pagination class</title><content type="html">I was looking for some pagination class to use with Symfony2, but most of the scripts that I found included html in the class, after some googling I found &lt;a href="http://inchoo.net/tools-frameworks/paginator-symfony2-beta/"&gt;this  post&lt;/a&gt;, and it was very helpful to get  what I was looking for. I wanted something like the old digg pagination so I modified this class a little bit to get something like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-IzFqSLwpvQs/Tds7q4edIqI/AAAAAAAAADU/p_yla863Hj4/s1600/How%2Bto%2BPaginate%2BData%2Bwith%2BPHP%2B%257C%2BNettuts%252B_1306213240746.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 37px;" src="http://2.bp.blogspot.com/-IzFqSLwpvQs/Tds7q4edIqI/AAAAAAAAADU/p_yla863Hj4/s320/How%2Bto%2BPaginate%2BData%2Bwith%2BPHP%2B%257C%2BNettuts%252B_1306213240746.png" alt="" id="BLOGGER_PHOTO_ID_5610143368720753314" border="0" /&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The modifications I made:&lt;br /&gt;&lt;br /&gt;- Show a range of pages around the current page as in the old digg.&lt;br /&gt;- Parameters can be passed in a route, so you get a nice URL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is the class after the modifications:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint linenums"&gt;&amp;lt;?php&lt;br /&gt;/**&lt;br /&gt;* Class to paginate a list of items in a old digg style&lt;br /&gt;*&lt;br /&gt;* @author Darko Gole%u0161&lt;br /&gt;* @author Carlos Mafla &amp;lt;gigo6000@hotmail.com&amp;gt;&lt;br /&gt;* @www.inchoo.net&lt;br /&gt;*/&lt;br /&gt;namespace Paginator;&lt;br /&gt;&lt;br /&gt;class Paginator {&lt;br /&gt;&lt;br /&gt;//current displayed page&lt;br /&gt;protected $currentpage;&lt;br /&gt;//limit items on one page&lt;br /&gt;protected $limit;&lt;br /&gt;//total number of pages that will be generated&lt;br /&gt;protected $numpages;&lt;br /&gt;//total items loaded from database&lt;br /&gt;protected $itemscount;&lt;br /&gt;//starting item number to be shown on page&lt;br /&gt;protected $offset;&lt;br /&gt;//pages to show at left and right of current page&lt;br /&gt;protected $mid_range;&lt;br /&gt;//range initial page&lt;br /&gt;protected $start_range;&lt;br /&gt;//range end page&lt;br /&gt;protected $end_range;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function __construct($itemscount, $currentpage = 1,$limit = 20,$mid_range = 7) {&lt;br /&gt;   //set total items count from controller&lt;br /&gt;   $this-&amp;gt;itemscount = $itemscount;&lt;br /&gt;&lt;br /&gt;   $this-&amp;gt;currentpage = $currentpage;&lt;br /&gt;&lt;br /&gt;   $this-&amp;gt;limit = $limit;&lt;br /&gt;&lt;br /&gt;   $this-&amp;gt;mid_range= $mid_range;&lt;br /&gt;&lt;br /&gt;   //Set defaults&lt;br /&gt;   $this-&amp;gt;setDefaults();&lt;br /&gt;&lt;br /&gt;   //Calculate number of pages total&lt;br /&gt;   $this-&amp;gt;getInternalNumPages();&lt;br /&gt;   //Calculate first shown item on current page&lt;br /&gt;   $this-&amp;gt;calculateOffset();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   $this-&amp;gt;calculateRange();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private function calculateRange() {&lt;br /&gt;&lt;br /&gt;        $this-&amp;gt;start_range = $this-&amp;gt;currentpage - floor($this-&amp;gt;mid_range/2);&lt;br /&gt;        $this-&amp;gt;end_range = $this-&amp;gt;currentpage   floor($this-&amp;gt;mid_range/2);&lt;br /&gt;&lt;br /&gt;        if($this-&amp;gt;start_range &amp;lt;= 0)&lt;br /&gt;        {&lt;br /&gt;            $this-&amp;gt;end_range  = abs($this-&amp;gt;start_range) 1;&lt;br /&gt;            $this-&amp;gt;start_range = 1;&lt;br /&gt;        }&lt;br /&gt;        if($this-&amp;gt;end_range &amp;gt; $this-&amp;gt;numpages)&lt;br /&gt;        {&lt;br /&gt;            $this-&amp;gt;start_range -= $this-&amp;gt;end_range-$this-&amp;gt;numpages;&lt;br /&gt;            $this-&amp;gt;end_range = $this-&amp;gt;numpages;&lt;br /&gt;        }&lt;br /&gt;        $this-&amp;gt;range = range($this-&amp;gt;start_range,$this-&amp;gt;end_range);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;private function setDefaults() {&lt;br /&gt;   //If currentpage is set to null or is set to 0 or less&lt;br /&gt;   //set it to default (1)&lt;br /&gt;   if (($this-&amp;gt;currentpage == null) || ($this-&amp;gt;currentpage &amp;lt; 1)) {&lt;br /&gt;       $this-&amp;gt;currentpage = 1;&lt;br /&gt;   }&lt;br /&gt;   //if limit is set to null set it to default (20)&lt;br /&gt;   if (($this-&amp;gt;limit == null)) {&lt;br /&gt;       $this-&amp;gt;limit = 20;&lt;br /&gt;       //if limit is any number less than 1 then set it to 0 for displaying&lt;br /&gt;       //items without limit&lt;br /&gt;   } else if ($this-&amp;gt;limit &amp;lt; 1) {&lt;br /&gt;       $this-&amp;gt;limit = 0;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function getNumpages() {&lt;br /&gt;   return $this-&amp;gt;numpages;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private function getInternalNumPages() {&lt;br /&gt;   //If limit is set to 0 or set to number bigger then total items count&lt;br /&gt;   //display all in one page&lt;br /&gt;   if (($this-&amp;gt;limit &amp;lt; 1) || ($this-&amp;gt;limit &amp;gt; $this-&amp;gt;itemscount)) {&lt;br /&gt;       $this-&amp;gt;numpages = 1;&lt;br /&gt;   } else {&lt;br /&gt;       //Calculate rest numbers from dividing operation so we can add one&lt;br /&gt;       //more page for this items&lt;br /&gt;       $restItemsNum = $this-&amp;gt;itemscount % $this-&amp;gt;limit;&lt;br /&gt;       //if rest items &amp;gt; 0 then add one more page else just divide items&lt;br /&gt;       //by limit&lt;br /&gt;       $restItemsNum &amp;gt; 0 ? $this-&amp;gt;numpages = intval($this-&amp;gt;itemscount / $this-&amp;gt;limit)   1 : $this-&amp;gt;numpages = intval($this-&amp;gt;itemscount / $this-&amp;gt;limit);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private function calculateOffset() {&lt;br /&gt;   //Calculet offset for items based on current page number&lt;br /&gt;   $this-&amp;gt;offset = ($this-&amp;gt;currentpage - 1) * $this-&amp;gt;limit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function getCurrentpage() {&lt;br /&gt;   return $this-&amp;gt;currentpage;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function getCurrentUrl() {&lt;br /&gt;   return $this-&amp;gt;currentUrl;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;   //For using from controller&lt;br /&gt;public function getLimit() {&lt;br /&gt;   return $this-&amp;gt;limit;&lt;br /&gt;}&lt;br /&gt;//For using from controller&lt;br /&gt;public function getOffset() {&lt;br /&gt;   return $this-&amp;gt;offset;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function getRange()&lt;br /&gt;{&lt;br /&gt;   return $this-&amp;gt;range;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public function getMidRange()&lt;br /&gt;{&lt;br /&gt;   return $this-&amp;gt;mid_range;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And this is how you can implement it in the controller:&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint linenums"&gt;use Path\to\class\Paginator;&lt;br /&gt;&lt;br /&gt;class ListController extends SiteController&lt;br /&gt;{&lt;br /&gt;/**&lt;br /&gt;* @extra:Route("/{offset}", name="_items")&lt;br /&gt;* @extra:Template()&lt;br /&gt;*/&lt;br /&gt;public function listAction( $offset = 1)&lt;br /&gt;{&lt;br /&gt;  $repository = new ListRepository();&lt;br /&gt;&lt;br /&gt;  $limit = 20;&lt;br /&gt;  $midrange = 7;&lt;br /&gt;&lt;br /&gt;  $itemsCount = $repository-&amp;gt;getListCount();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  $paginator = new Paginator($itemsCount, $offset , $limit, $midrange);&lt;br /&gt;&lt;br /&gt;  $items = $repository-&amp;gt;getList ($offset);&lt;br /&gt;&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  return array('items' =&amp;gt; $items, 'paginator' =&amp;gt; $paginator);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And this is an example of a twig template you can use:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="prettyprint linenums"&gt;&amp;lt;div class="paginator"&amp;gt;&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;   {% if paginator.currentpage != 1 %}&lt;br /&gt;       &amp;lt;li&amp;gt; &amp;lt;a class="previous" href="{{ path('_items', {  'offset': paginator.currentpage-1 }) }}"&amp;gt;Previous&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;   {% endif %}&lt;br /&gt;   {% for i in 1..paginator.numpages%}&lt;br /&gt;&lt;br /&gt;   {% if paginator.range.0 &amp;gt; 2 and i == paginator.range.0 %}&lt;br /&gt;         ...&lt;br /&gt;   {% endif %}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     {%  if(i==1 or i==paginator.numpages or i in paginator.range) %}&lt;br /&gt;&lt;br /&gt;       {% if i==paginator.currentpage %}&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a class="active" href="{{ path('_items', {  'offset': i })}}"&amp;gt;{{i}}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       {% else %}&lt;br /&gt;       &amp;lt;li&amp;gt;&amp;lt;a href="{{ path('_items', {  'offset': i }) }}"&amp;gt; {{i}}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;       {% endif %}&lt;br /&gt;     {% endif %}&lt;br /&gt;&lt;br /&gt;    {% if paginator.range[paginator.midrange -1] &amp;lt; paginator.numpages -1 and i == paginator.range[paginator.midrange-1] %}&lt;br /&gt;         ...&lt;br /&gt;    {% endif %}&lt;br /&gt;&lt;br /&gt;   {% endfor %}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;li&amp;gt; &amp;lt;a class="next" href="{{ path('_items', {  'offset': paginator.currentpage 1 }) }}"&amp;gt;Next&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I'm sure there are many improvements to be made, but it may help someone to have an idea.&lt;br /&gt;&lt;br /&gt;You can find the files on git:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/gigo6000/Symfony2-Pagination-Class"&gt;https://github.com/gigo6000/Symfony2-Pagination-Class&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-7355302878641085651?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/7355302878641085651/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=7355302878641085651" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/7355302878641085651?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/7355302878641085651?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/05/symfony2-twig-pagination-class.html" title="Symfony2 + Twig pagination class" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-IzFqSLwpvQs/Tds7q4edIqI/AAAAAAAAADU/p_yla863Hj4/s72-c/How%2Bto%2BPaginate%2BData%2Bwith%2BPHP%2B%257C%2BNettuts%252B_1306213240746.png" height="72" width="72" /><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;AkUBR34zcSp7ImA9WhZVEkQ.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-202462504044427024</id><published>2011-05-12T12:13:00.000-07:00</published><updated>2011-05-24T21:37:36.089-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-24T21:37:36.089-07:00</app:edited><title>Symfony2 Xzibit Meme</title><content type="html">&lt;a href="http://1.bp.blogspot.com/-3auty6oj2Jg/TcwxkZOJTWI/AAAAAAAAADM/-MqtAmLGADw/s1600/xzibit_meme.jpg"&gt;&lt;img style="display: block; text-align: center; cursor: pointer; width: 400px; height: 266px;" src="http://1.bp.blogspot.com/-3auty6oj2Jg/TcwxkZOJTWI/AAAAAAAAADM/-MqtAmLGADw/s400/xzibit_meme.jpg" alt="" id="BLOGGER_PHOTO_ID_5605910137484692834" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-3auty6oj2Jg/TcwxkZOJTWI/AAAAAAAAADM/-MqtAmLGADw/s1600/xzibit_meme.jpg"&gt;&lt;br /&gt;&lt;/a&gt;A little meme for the Symfony2 Bundles :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-202462504044427024?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/202462504044427024/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=202462504044427024" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/202462504044427024?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/202462504044427024?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/05/symfony2-xzibit-meme.html" title="Symfony2 Xzibit Meme" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-3auty6oj2Jg/TcwxkZOJTWI/AAAAAAAAADM/-MqtAmLGADw/s72-c/xzibit_meme.jpg" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkIARHo7cCp7ImA9Wx9UEkQ.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-343033752978058400</id><published>2011-02-09T09:34:00.000-08:00</published><updated>2011-02-09T16:42:25.408-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-09T16:42:25.408-08:00</app:edited><title>Symfony live 2011 interesting links -  Symfony2 (day 2)</title><content type="html">Fabien Potencier presentations:&lt;br /&gt;&lt;br /&gt;http://www.slideshare.net/fabpot&lt;br /&gt;&lt;br /&gt;Symfony2 from the trenches:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slideshare.net/jwage/symfony2-from-the-trenches"&gt;http://www.slideshare.net/jwage/symfony2-from-the-trenches&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="width: 425px;" id="__ss_6865341"&gt;&lt;strong style="display: block; margin: 12px 0pt 4px;"&gt;&lt;a href="http://www.slideshare.net/jwage/symfony2-from-the-trenches" title="Symfony2 from the Trenches"&gt;Symfony2 from the Trenches&lt;/a&gt;&lt;/strong&gt;&lt;object id="__sse6865341" height="355" width="425"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=symfony2fromthetrenches-110209123435-phpapp01&amp;amp;stripped_title=symfony2-from-the-trenches&amp;amp;userName=jwage"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed name="__sse6865341" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=symfony2fromthetrenches-110209123435-phpapp01&amp;amp;stripped_title=symfony2-from-the-trenches&amp;amp;userName=jwage" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="padding: 5px 0pt 12px;"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/jwage"&gt;Jonathan Wage&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Being dangerous with Twig:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="Being dangerous with Twig:  http://www.slideshare.net/weaverryan/being-dangerous-with-twig"&gt;http://www.slideshare.net/weaverryan/being-dangerous-with-twig&lt;/a&gt;&lt;br /&gt;&lt;div style="width:425px" id="__ss_6866229"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/weaverryan/being-dangerous-with-twig" title="Being Dangerous with Twig"&gt;Being Dangerous with Twig&lt;/a&gt;&lt;/strong&gt;&lt;object id="__sse6866229" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=twig-sflive-sanfran-2011-110209140501-phpapp02&amp;stripped_title=being-dangerous-with-twig&amp;userName=weaverryan" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse6866229" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=twig-sflive-sanfran-2011-110209140501-phpapp02&amp;stripped_title=being-dangerous-with-twig&amp;userName=weaverryan" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/weaverryan"&gt;Ryan Weaver&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Comment tag (do nothing):  {# Comment #}&lt;br /&gt;&lt;br /&gt;Print tag (show something): {{ 'print me' }}&lt;br /&gt;&lt;br /&gt;Block tag (do something):   {% set foo = 'hola' %}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Introducing Assetic: Asset Management for PHP 5.3:&lt;br /&gt;&lt;br /&gt;&lt;div style="width:425px" id="__ss_6869262"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/kriswallsmith/introducing-assetic-asset-management-for-php-53" title="Introducing Assetic: Asset Management for PHP 5.3"&gt;Introducing Assetic: Asset Management for PHP 5.3&lt;/a&gt;&lt;/strong&gt;&lt;object id="__sse6869262" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=asseticsflive11sanfran-110209181138-phpapp01&amp;stripped_title=introducing-assetic-asset-management-for-php-53&amp;userName=kriswallsmith" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed name="__sse6869262" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=asseticsflive11sanfran-110209181138-phpapp01&amp;stripped_title=introducing-assetic-asset-management-for-php-53&amp;userName=kriswallsmith" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/kriswallsmith"&gt;Kris Wallsmith&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-343033752978058400?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/343033752978058400/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=343033752978058400" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/343033752978058400?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/343033752978058400?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/02/symfony-live-2011-interesting-links_09.html" title="Symfony live 2011 interesting links -  Symfony2 (day 2)" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0IBRnc_eip7ImA9Wx9UEk8.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-1677889466572907925</id><published>2011-02-08T11:10:00.000-08:00</published><updated>2011-02-08T21:32:37.942-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-08T21:32:37.942-08:00</app:edited><title>Symfony live 2011 (Symfony2) interesting links</title><content type="html">Twitter tag #sflive2011:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://twitter.com/#%21/search?q=%23sflive2011"&gt;https://twitter.com/#!/search?q=%23sflive2011&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Slides for the first presentation of the day, The Path to Symfony in the USA:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slideshare.net/dustin.whittle/the-path-to-symfony-in-the-usa"&gt;http://www.slideshare.net/dustin.whittle/the-path-to-symfony-in-the-usa&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Symfony2 bundle repository:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.symfony2bundles.org/"&gt;http://www.symfony2bundles.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Symfony Questions / Anwers :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://symfonyexperts.com/"&gt;http://symfonyexperts.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Apostrophe presentation:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slideshare.net/tompunk/apostrophe-6853364"&gt;http://www.slideshare.net/tompunk/apostrophe-6853364&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Symfony Live blogging:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://window.punkave.com/2011/02/08/liveblogging-symfony-live/"&gt;http://window.punkave.com/2011/02/08/liveblogging-symfony-live/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Doctine in the real world (opensky) :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slideshare.net/jwage/doctrine-intherealworldsf-live2011sanfran"&gt;http://www.slideshare.net/jwage/doctrine-intherealworldsf-live2011sanfran&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;phpBB4 building end user applications with Symfony2:&lt;br /&gt;&lt;br /&gt;http://prezi.com/gxrdwsplwplf/phpbb4-building-end-user-applications-with-symfony2/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-1677889466572907925?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/1677889466572907925/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=1677889466572907925" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/1677889466572907925?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/1677889466572907925?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2011/02/symfony-live-2011-interesting-links.html" title="Symfony live 2011 (Symfony2) interesting links" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUQHSXw5cSp7ImA9Wx5QEUQ.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-3175624501015730481</id><published>2010-08-30T12:18:00.000-07:00</published><updated>2010-08-30T12:42:18.229-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-30T12:42:18.229-07:00</app:edited><title>PHP 5.3.3 short tags problem when upgrading</title><content type="html">Recently after upgrading php to 5.3.3 I found a problem with short tags &amp;lt;?= and &amp;lt;? , it seems that you now must only use &amp;lt;?php as starting tag, and all my code with &amp;lt;?= was not processed by php. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Short tags looks nicer and cleaner but can be a problem for people using XML, find more info here:&lt;br /&gt;&lt;br /&gt;http://wiki.php.net/rfc/shortags&lt;br /&gt;&lt;br /&gt;Here is a useful command if you need to replace this tags in your old code:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;grep -oiR '&amp;lt;?=' /path/to/dir | cut -d ":" -f 1 | xargs sed -i 's/&amp;lt;?=/&amp;lt;?php echo /g'&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-3175624501015730481?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/3175624501015730481/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=3175624501015730481" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3175624501015730481?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3175624501015730481?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2010/08/php-533-short-tags-problem-when.html" title="PHP 5.3.3 short tags problem when upgrading" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8ASXk6fCp7ImA9WxNSGUU.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-659893871837524276</id><published>2009-09-03T06:53:00.000-07:00</published><updated>2009-09-03T07:07:28.714-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-03T07:07:28.714-07:00</app:edited><title>How to resize or scale a list of images on linux</title><content type="html">Here is a simple but powerful command when you got several images that you want to shrink:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;mogrify -scale 50% *.jpg&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will reduce all the images by 50%&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Or if you just want to reduce one image to 200x200 pixels for example:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;convert -scale 200x200 image.jpg image_small.jpg&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-659893871837524276?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/659893871837524276/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=659893871837524276" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/659893871837524276?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/659893871837524276?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2009/09/how-to-resize-or-scale-list-of-images.html" title="How to resize or scale a list of images on linux" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;AkAAQHY5fCp7ImA9Wx5QEUQ.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-276198976383598482</id><published>2009-08-21T21:04:00.000-07:00</published><updated>2010-08-30T13:05:41.824-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-30T13:05:41.824-07:00</app:edited><title>Installing virtualbox on Ubuntu 9.04</title><content type="html">&lt;code&gt;&lt;br /&gt;# virtualbox&lt;br /&gt;WARNING: The character device /dev/vboxdrv does not exist.&lt;br /&gt;   Please install the virtualbox-ose-source package and the appropriate&lt;br /&gt;   headers, most likely  linux-headers-generic.&lt;br /&gt;&lt;br /&gt;   You will not be able to start VMs until this problem is fixed.&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;root@ubuntu-laptop:/home/camafla# apt-get install linux-headers-server&lt;br /&gt;Reading package lists... Done&lt;br /&gt;Building dependency tree    &lt;br /&gt;Reading state information... Done&lt;br /&gt;The following extra packages will be installed:&lt;br /&gt;linux-headers-2.6.28-11-server&lt;br /&gt;The following NEW packages will be installed:&lt;br /&gt;linux-headers-2.6.28-11-server linux-headers-server&lt;br /&gt;0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;Need to get 672kB of archives.&lt;br /&gt;After this operation, 8139kB of additional disk space will be used.&lt;br /&gt;Do you want to continue [Y/n]? y&lt;br /&gt;Get:1 http://archive.ubuntu.com jaunty/main linux-headers-2.6.28-11-server 2.6.28-11.42 [669kB]&lt;br /&gt;Get:2 http://archive.ubuntu.com jaunty/main linux-headers-server 2.6.28.11.15 [3388B]&lt;br /&gt;Fetched 672kB in 6s (104kB/s)                                               &lt;br /&gt;Selecting previously deselected package linux-headers-2.6.28-11-server.&lt;br /&gt;(Reading database ... 157949 files and directories currently installed.)&lt;br /&gt;Unpacking linux-headers-2.6.28-11-server (from .../linux-headers-2.6.28-11-server_2.6.28-11.42_i386.deb) ...&lt;br /&gt;Selecting previously deselected package linux-headers-server.&lt;br /&gt;Unpacking linux-headers-server (from .../linux-headers-server_2.6.28.11.15_i386.deb) ...&lt;br /&gt;Setting up linux-headers-2.6.28-11-server (2.6.28-11.42) ...&lt;br /&gt;Examining /etc/kernel/header_postinst.d.&lt;br /&gt;run-parts: executing /etc/kernel/header_postinst.d/dkms&lt;br /&gt;* Running DKMS auto installation service for kernel 2.6.28-11-server        &lt;br /&gt;*  vboxdrv (2.1.4)...                                                          vboxdrv (2.1.4): Installing module.&lt;br /&gt;.............&lt;br /&gt;......&lt;br /&gt;                                                                       [ OK ]&lt;br /&gt;*  vboxnetflt (2.1.4)...                                                       vboxnetflt (2.1.4): Installing module.&lt;br /&gt;............&lt;br /&gt;......&lt;br /&gt;                                                                       [ OK ]&lt;br /&gt;run-parts: executing /etc/kernel/header_postinst.d/nvidia-common&lt;br /&gt;&lt;br /&gt;Setting up linux-headers-server (2.6.28.11.15) ...&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-276198976383598482?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/276198976383598482/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=276198976383598482" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/276198976383598482?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/276198976383598482?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2009/08/installing-virtualbox-on-ubuntu-904.html" title="Installing virtualbox on Ubuntu 9.04" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE8GSHkzcSp7ImA9WxJXFUs.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-5330890202485820689</id><published>2009-06-08T18:27:00.000-07:00</published><updated>2009-06-09T10:00:29.789-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-09T10:00:29.789-07:00</app:edited><title>LPI 102 exam reference card (or cheat sheet if you like)</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_BPxoSnKU1Ww/Si2-bbKcalI/AAAAAAAAACM/v_wJddxuWlc/s1600-h/lpi-102-reference-card-v1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 235px; height: 320px;" src="http://1.bp.blogspot.com/_BPxoSnKU1Ww/Si2-bbKcalI/AAAAAAAAACM/v_wJddxuWlc/s320/lpi-102-reference-card-v1.png" alt="" id="BLOGGER_PHOTO_ID_5345137711115954770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I recently cleared the &lt;a href="http://www.lpi.org/eng/certification/the_lpic_program/lpic_1"&gt;LPIC-1 certification&lt;/a&gt; (LPI certification Level 1) , as an educational exercise to study for my second exam (&lt;a href="http://www.lpi.org/eng/certification/the_lpic_program/lpic_1/exam_102_detailed_objectives"&gt;exam 102&lt;/a&gt;) I created a reference card that helped me remember some commands and key concepts for the exam.&lt;br /&gt;&lt;br /&gt;I want to share this to anyone interested in taking this exam or just anyone who wants a quick linux reference card to the objectives included in the exam.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PNG version: &lt;a href="http://pruebas.calipso.com.co/camafla/lpi-102-reference-card-v1.png"&gt;lpi-102-reference-card-v1.png&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PDF version: &lt;a href="http://pruebas.calipso.com.co/camafla/lpi-102-reference-card-v1.pdf"&gt;lpi-102-reference-card-v1.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-5330890202485820689?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/5330890202485820689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=5330890202485820689" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5330890202485820689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5330890202485820689?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2009/06/lpi-102-exam-reference-card-or-cheat.html" title="LPI 102 exam reference card (or cheat sheet if you like)" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_BPxoSnKU1Ww/Si2-bbKcalI/AAAAAAAAACM/v_wJddxuWlc/s72-c/lpi-102-reference-card-v1.png" height="72" width="72" /><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CU4ASHY4fip7ImA9WxVQEUU.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-6778555439820976265</id><published>2009-01-28T08:54:00.000-08:00</published><updated>2009-01-28T15:05:49.836-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-28T15:05:49.836-08:00</app:edited><title>Installing Oracle OCI8 and PHP</title><content type="html">I will describe here the steps I needed to install oracle connectivity for php. It's supposed you have php installed, in my case&lt;br /&gt;I had php 5.1.6 throught RPM:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# rpm -qa  | grep php&lt;br /&gt;php-5.1.6-20.el5_2.1&lt;br /&gt;php-adodb-4.81-1.el5.rf&lt;br /&gt;php-pecl-mailparse-2.1.1-1.el5.rf&lt;br /&gt;phpmyadmin-2.11.8.1-1.el5.rf&lt;br /&gt;php-odbc-5.1.6-20.el5_2.1&lt;br /&gt;php-pecl-fileinfo-1.0.4-1.el5.rf&lt;br /&gt;php-cli-5.1.6-20.el5_2.1&lt;br /&gt;php-pear-file-1.2.2-1.el5.rf&lt;br /&gt;php-eaccelerator-5.1.6_0.9.5.2-4.el5.rf&lt;br /&gt;php-pecl-memcache-2.1.2-1.el5.rf&lt;br /&gt;php-pear-db-1.7.13-2.el5.rf&lt;br /&gt;php-common-5.1.6-20.el5_2.1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Distro:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# cat /etc/redhat-release&lt;br /&gt;Red Hat Enterprise Linux Server release 5 (Tikanga)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;1. Download and install the Instant Client rpms from oracle which you can get here &lt;a href="http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html"&gt;http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This are the two files needed in my case:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# rpm -ivh oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64.rpm&lt;br /&gt;&lt;br /&gt;# rpm -ivh oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64.rpm&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2. Compile and install the oci8 extension:&lt;br /&gt;&lt;br /&gt;Make sure you have the proper packages to compile a script like:  php-devel, gcc,etc.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# pear install pecl/oci8&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I used pear install pecl/oci8 instead of pear install oci8 because for some reason the second one returns an out of memory error and ignores the memory limit variable (memory_limit = XX ) from the&lt;br /&gt;php.ini file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When asked about this:&lt;br /&gt;&lt;br /&gt;Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client : autodetect&lt;br /&gt;&lt;br /&gt;If you have oracle installed in the same server just hit enter. If not (you just want to connect to another server) type:&lt;br /&gt;&lt;br /&gt;instantclient and enter or the path to the oracle libraries e.g: /usr/lib/oracle/11.1/client64/lib/.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Finally, edit your php.ini file (/etc/php.ini) and add the extension=oci8.so in the Dynamic extensions section. Don't forget to restart apache so the changes take effect in apache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Additional information can be found here: &lt;a href="http://www.oracle.com/technology/pub/notes/technote_php_instant.html"&gt;http://www.oracle.com/technology/pub/notes/technote_php_instant.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-6778555439820976265?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/6778555439820976265/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=6778555439820976265" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6778555439820976265?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6778555439820976265?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2009/01/installing-oracle-oci8-and-php.html" title="Installing Oracle OCI8 and PHP" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DEQGR3k_eSp7ImA9WxRSEEg.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-6165539440868957975</id><published>2008-09-10T07:08:00.000-07:00</published><updated>2008-09-10T07:18:46.741-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-10T07:18:46.741-07:00</app:edited><title>How to solve no sound in flash videos ( fedora )</title><content type="html">After installing flash-plugin-9.0.124.0-release.i386 rpm I just got the flash plugin in my firefox but didn't get any sound. Googling about it I found a solution that worked, you need to install libflashsupport rpm, restart firefox and that's it:&lt;br /&gt;&lt;br /&gt;just type this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;yum install libflashsupport&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I guess this may work in other red hat based distros.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-6165539440868957975?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/6165539440868957975/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=6165539440868957975" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6165539440868957975?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6165539440868957975?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/09/how-to-solve-no-sound-in-flash-videos.html" title="How to solve no sound in flash videos ( fedora )" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CEQEQnY9cCp7ImA9WxRTGU0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-2140229443988143650</id><published>2008-09-08T12:25:00.000-07:00</published><updated>2008-09-08T12:31:43.868-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-08T12:31:43.868-07:00</app:edited><title>PHP Fatal error:  Class 'DomDocument' not found in ...</title><content type="html">After running symfony propel-build-all on a new symfony installation got this error. The solution is to install the  php-xml rpm (deb).&lt;br /&gt;&lt;br /&gt; [root@devel2 cms]# symfony propel-build-all&lt;br /&gt;&gt;&gt; schema    converting "/home/sfprojects/cm...lugin/config/schema.yml" to XML&lt;br /&gt;&gt;&gt; schema    putting /home/sfprojects/cms/pl...erated-sfGuardPlugin-schema.xml&lt;br /&gt;&gt;&gt; file+     config/generated-sfGuardPlugin-schema.xml&lt;br /&gt;&gt;&gt; file-     /home/sfprojects/cms/plugins/sf...erated-sfGuardPlugin-schema.xml&lt;br /&gt;Buildfile: /usr/share/pear/symfony/vendor/propel-generator/build.xml&lt;br /&gt;[resolvepath] Resolved /home/sfprojects/cms/config to /home/sfprojects/cms/config&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; check-project-or-dir-set:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; check-project-set:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; set-project-dir:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; check-buildprops-exists:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; check-buildprops-for-propel-gen:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; check-buildprops:&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; configure:&lt;br /&gt;     [echo] Loading project-specific props from /home/sfprojects/cms/config/propel.ini&lt;br /&gt; [property] Loading /home/sfprojects/cms/config/propel.ini&lt;br /&gt;&lt;br /&gt;propel-project-builder &gt; om:&lt;br /&gt;    [phing] Calling Buildfile '/usr/share/pear/symfony/vendor/propel-generator/build-propel.xml' with target 'om'&lt;br /&gt; [property] Loading /usr/share/pear/symfony/vendor/propel-generator/./default.properties&lt;br /&gt;&lt;br /&gt;propel &gt; check-run-only-on-schema-change:&lt;br /&gt;&lt;br /&gt;propel &gt; om-check:&lt;br /&gt;&lt;br /&gt;propel &gt; om:&lt;br /&gt;     [echo] +------------------------------------------+&lt;br /&gt;     [echo] |                                          |&lt;br /&gt;     [echo] | Generating Peer-based Object Model for   |&lt;br /&gt;     [echo] | YOUR Propel project! (NEW OM BUILDERS)!  |&lt;br /&gt;     [echo] |                                          |&lt;br /&gt;     [echo] +------------------------------------------+&lt;br /&gt;[phingcall] Calling Buildfile '/usr/share/pear/symfony/vendor/propel-generator/build-propel.xml' with target 'om-template'&lt;br /&gt; [property] Loading /usr/share/pear/symfony/vendor/propel-generator/./default.properties&lt;br /&gt;&lt;br /&gt;propel &gt; om-template:&lt;br /&gt;[propel-om] Target database type: mysql&lt;br /&gt;[propel-om] Target package: lib.model&lt;br /&gt;[propel-om] Using template path: /usr/share/pear/symfony/vendor/propel-generator/templates&lt;br /&gt;[propel-om] Output directory: /home/sfprojects/cms&lt;br /&gt;[propel-om] Processing: schema.xml&lt;br /&gt;PHP Fatal error:  Class 'DomDocument' not found in /usr/share/pear/symfony/vendor/propel-generator/classes/propel/phing/AbstractPropelDataModelTask.php on line 406&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-2140229443988143650?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/2140229443988143650/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=2140229443988143650" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/2140229443988143650?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/2140229443988143650?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/09/php-fatal-error-class-domdocument-not.html" title="PHP Fatal error:  Class 'DomDocument' not found in ..." /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DUYGRno-fSp7ImA9WxdXEEU.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-9061289666302272603</id><published>2008-06-21T15:14:00.000-07:00</published><updated>2008-06-21T15:25:27.455-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-21T15:25:27.455-07:00</app:edited><title>Mplayer crashes using beryl compiz-fusion</title><content type="html">When you start to use compiz-fusion and all the fancy desktop effects you will notice a little problem, you can't watch videos!. There's a  bug that crashes mplayer, totem and all your video players. Hopefully there's a workaround for mplayer (not sure how to solve the problem with totem).&lt;br /&gt;&lt;br /&gt;1. Open mplayer.&lt;br /&gt;2. Right click over the window.&lt;br /&gt;3. Click on preferences.&lt;br /&gt;4. Click on the Video tab .&lt;br /&gt;5. Change the video driver from Xv to X11 and click Ok.&lt;br /&gt;&lt;br /&gt;You may have to restart mplayer to see the changes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-9061289666302272603?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/9061289666302272603/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=9061289666302272603" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/9061289666302272603?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/9061289666302272603?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/06/mplayer-crahes-using-beryl-compiz.html" title="Mplayer crashes using beryl compiz-fusion" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkMDRHk4fip7ImA9WxRaEEk.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-8555075367055302383</id><published>2008-06-18T19:17:00.000-07:00</published><updated>2008-12-11T17:14:35.736-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-11T17:14:35.736-08:00</app:edited><title>Vista Blue Screen of Death: STOP: 0x0000008E</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_BPxoSnKU1Ww/SFnGXb-_PdI/AAAAAAAAABc/SdzPARB31Vs/s1600-h/finde_junio+040.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/SFnGXb-_PdI/AAAAAAAAABc/SdzPARB31Vs/s320/finde_junio+040.JPG" alt="" id="BLOGGER_PHOTO_ID_5213416149609299410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The famous blue screen of death attacked me again (&lt;a href="http://devtime.blogspot.com/2005/12/bsod-blue-screen-of-death.html"&gt;previous bsod&lt;/a&gt;), this time on Vista, on my Dell inspiron 1520. It's very annoying that you have to deal with this kind of errors on a laptop recently bought.  This error started to display a few seconds after logging in to the user account and with no clear reason of what could be the trigger of the error.&lt;br /&gt;&lt;br /&gt;The solution this time actually had nothing to do (directly) with Windows Vista but with the laptop BIOS, and the solution came from the dell support site &lt;a href="http://support.dell.com/support/topics/global.aspx/support/dsn/en/document?c=us&amp;amp;docid=33428502887DCFF7E040A68F5B2835B9&amp;amp;l=en&amp;amp;s=gen"&gt;support.dell.com, &lt;/a&gt;the error itself suggested to update the BIOS , but I don't  pay too much attention to this general error messages. If you're having this same problem you could go and follow this &lt;a href="http://support.dell.com/support/topics/global.aspx/support/dsn/en/document?c=us&amp;amp;docid=33428502887DCFF7E040A68F5B2835B9&amp;amp;l=en&amp;amp;s=gen"&gt;check list&lt;/a&gt; from dell, the BIOS upgrade was the second suggestion for a BSOF error and this was the one that worked for me, the file to do this is in the "Drivers and Downloads" section and you can select between all the different models.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-8555075367055302383?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/8555075367055302383/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=8555075367055302383" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/8555075367055302383?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/8555075367055302383?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/06/blue-screen-of-death-stop-0x0000008e.html" title="Vista Blue Screen of Death: STOP: 0x0000008E" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_BPxoSnKU1Ww/SFnGXb-_PdI/AAAAAAAAABc/SdzPARB31Vs/s72-c/finde_junio+040.JPG" height="72" width="72" /><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DEACRHw7eip7ImA9WxdQGE0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-6981455676861938924</id><published>2008-06-18T09:17:00.000-07:00</published><updated>2008-06-18T09:32:45.202-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-18T09:32:45.202-07:00</app:edited><title>Subversion: MKCOL of '...' 405 Method Not Allowed</title><content type="html">I was messing with the .svn/entries file in one of my local working copy folders, also I rm -rf a folder and regenerated again (I'm using symfony admin generator) , long story, but the fact is that I think I screwed up something and started to get this error when trying to commit:&lt;br /&gt;&lt;br /&gt;# svn commit -m "backend modifications"&lt;br /&gt;Adding         apps/backend/modules/comment&lt;br /&gt;svn: Commit failed (details follow):&lt;br /&gt;svn: MKCOL of '/projects/cms/!svn/wrk/5ca09002-f34f-0410-890e-9511925f86a5/trunk/apps/backend/modules/comment': 405 Method Not Allowed  (http://svn.calipso.com.co)&lt;br /&gt;&lt;br /&gt;After some googling, I found it could be some proxy problem, but I wasn't using a proxy. Later I found that this error could mean that&lt;br /&gt;the directory already existed in the repository and couldn't be recreated again, so my next step was to delete the folder from the repository (svn del ...) and try to do a fresh commit after recreating the folder and files included in it, and this worked ;).&lt;br /&gt;&lt;br /&gt;I hope this helps some lost soul out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-6981455676861938924?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/6981455676861938924/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=6981455676861938924" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6981455676861938924?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6981455676861938924?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/06/subversion-mkcol-of-405-method-not.html" title="Subversion: MKCOL of '...' 405 Method Not Allowed" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>10</thr:total></entry><entry gd:etag="W/&quot;DkYBQHYyeip7ImA9WxdSFEo.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-4309100411020094183</id><published>2008-05-22T09:30:00.000-07:00</published><updated>2008-05-22T09:35:51.892-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-22T09:35:51.892-07:00</app:edited><title>Unable to write config cache for "config/config_handlers.yml"</title><content type="html">After upgrading to symfony version 1.0.16 from 1.0.8 I started to get this error:&lt;br /&gt;&lt;br /&gt;Unable to write config cache for "config/config_handlers.yml"&lt;br /&gt;&lt;br /&gt;I tried to chmod 777 the cache and it didn't work. The solution for me was to disable SELinux.&lt;br /&gt;&lt;br /&gt;How to do that? edit your /etc/sysconfig/selinux file, and set SELINUX=disabled:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# This file controls the state of SELinux on the system.&lt;br /&gt;# SELINUX= can take one of these three values:&lt;br /&gt;#       enforcinfg - SELinux security policy is enforced.&lt;br /&gt;#       permissive - SELinux prints warnings instead of enforcing.&lt;br /&gt;#       disabled - No SELinux policy is loaded.&lt;br /&gt;SELINUX=disabled&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-4309100411020094183?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/4309100411020094183/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=4309100411020094183" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/4309100411020094183?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/4309100411020094183?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/05/unable-to-write-config-cache-for.html" title="Unable to write config cache for &quot;config/config_handlers.yml&quot;" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUUMR3g4eip7ImA9WhZVE04.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-5781261299107321683</id><published>2008-02-21T06:36:00.000-08:00</published><updated>2011-05-25T08:28:06.632-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-25T08:28:06.632-07:00</app:edited><title>Page redirection in php with header('Location...') : Blank page vs Working redirection</title><content type="html">This kind of errors are what make debugging sometimes a very frustrating part of the developement, if you're suffering a blank page when trying to make a header('Location..'), give this a try:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is a good redirection:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;?&lt;br /&gt;header('Location: http://www.example.com/');&lt;br /&gt;exit();&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And this is a wrong redirection:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?&lt;br /&gt;header('Location : http://www.example.com/');&lt;br /&gt;exit();&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Notice a space between 'Location' and ':' this makes the redirection not to work!!!!&lt;br /&gt;&lt;br /&gt;Simple errors likes this consume a lot of time :( , hope helps someone else...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-5781261299107321683?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/5781261299107321683/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=5781261299107321683" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5781261299107321683?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5781261299107321683?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/02/page-redirection-in-php-with.html" title="Page redirection in php with header('Location...') : Blank page vs Working redirection" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0cCRXY-eCp7ImA9WxZQFk0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-5643187101459689905</id><published>2008-02-11T12:29:00.000-08:00</published><updated>2008-02-21T06:44:24.850-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-21T06:44:24.850-08:00</app:edited><title>.htaccess: order not allowed here</title><content type="html">I was getting an 500 Internal Server Error when trying to access Drupal after installing it, when I checked the http error log it said : .htaccess: order not allowed here.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After adding this to the httpd.conf and restarted apache it worked:&lt;br /&gt;&lt;br /&gt;&lt;code &gt;&lt;br /&gt;&amp;lt; directory "/home/httpd/html/drupal" &amp;gt;&lt;br /&gt;AllowOverride FileInfo Limit Options Indexes&lt;br /&gt;&amp;lt; /directory &amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;change "/home/httpd/html/drupal" to wherever your document root is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-5643187101459689905?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/5643187101459689905/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=5643187101459689905" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5643187101459689905?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5643187101459689905?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/02/htaccess-order-not-allowed-here.html" title=".htaccess: order not allowed here" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;DEIFQng6eSp7ImA9WxZRFU0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-7510617945952296496</id><published>2008-02-08T13:30:00.000-08:00</published><updated>2008-02-08T13:35:13.611-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-08T13:35:13.611-08:00</app:edited><title>Apache Error: No space left on device</title><content type="html">Apache doesn't start and the error log contains:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[emerg] (28)No space left on device: Couldn't create accept lock&lt;br /&gt;or&lt;br /&gt;[crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;After checking your disk it shows that you have plenty of space. The problem is that apache didn't shut down properly, and it's left myriads of semaphore-arrays left, owned by 'apache' user. &lt;br /&gt;&lt;br /&gt;Run:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ipcs -s | grep apache&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Removing these semaphores immediately should solve the problem and allow apache to start.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ipcs -s | grep apache | perl -e 'while (&lt;STDIN&gt;) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;where 'apache' is the owner of the apache process, if that's not the name of the user on your server change it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-7510617945952296496?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/7510617945952296496/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=7510617945952296496" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/7510617945952296496?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/7510617945952296496?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/02/apache-error-no-space-left-on-device.html" title="Apache Error: No space left on device" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;D08ARHk5eip7ImA9WxZRFU0.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-3741768319328665616</id><published>2008-02-08T13:07:00.000-08:00</published><updated>2008-02-08T13:24:05.722-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-08T13:24:05.722-08:00</app:edited><title>How to check running queries and stats in postgres ?</title><content type="html">You want to know what query is slowing the database or want to check what's going on with a query you&lt;br /&gt;just run, well in mysql just need to type 'show processlist;', but in postgres you must enable two variables&lt;br /&gt;to check this and other stats.&lt;br /&gt;&lt;br /&gt;Edit your postgres.conf which should be on /var/lib/pgsql/data/postgresql.conf for *nix installations and add or change this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;stats_start_collector = true&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This must be set to true for the statistics collector to be launched at all.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;stats_command_string = true&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This enables monitoring of the current command being executed by any server process. The statistics collector subprocess need not be running to enable this feature.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After restarting postgres the following query will show currently running queries&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/etc/init.d/postgresql restart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;psql -U postgres template1 -c "select * from pg_stat_activity"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;only as user "postgres"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-3741768319328665616?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/3741768319328665616/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=3741768319328665616" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3741768319328665616?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3741768319328665616?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2008/02/how-to-check-running-queries-and-stats.html" title="How to check running queries and stats in postgres ?" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkMDR347cCp7ImA9WxRaEEk.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-5957613590005004277</id><published>2007-12-03T18:07:00.000-08:00</published><updated>2008-12-11T17:14:36.008-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-11T17:14:36.008-08:00</app:edited><title>How to create a DSL connection on ubuntu</title><content type="html">If your router/modem is set in bridge mode and you need to dial to make a connection you must use pppoE (Point to Point Protocol Over Ethernet) it's similar to the usual modem dial-up connection, but the difference is that you use the network an not the land line to connect.&lt;br /&gt;&lt;br /&gt;In ubuntu you can run a little script called:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# pppoeconf&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BPxoSnKU1Ww/R1VxfNcu0QI/AAAAAAAAAAs/FC99H8EfgW0/s1600-h/pppoeconf1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_BPxoSnKU1Ww/R1VxfNcu0QI/AAAAAAAAAAs/FC99H8EfgW0/s320/pppoeconf1.jpg" alt="" id="BLOGGER_PHOTO_ID_5140139330713342210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just accept the defaults an make sure you give the right username/password.&lt;br /&gt;&lt;br /&gt;it will edit this file:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# cat /etc/ppp/peers/dsl-provider&lt;br /&gt;&lt;br /&gt;# Minimalistic default options file for DSL/PPPoE connections&lt;br /&gt;&lt;br /&gt;noipdefault&lt;br /&gt;defaultroute&lt;br /&gt;replacedefaultroute&lt;br /&gt;hide-password&lt;br /&gt;#lcp-echo-interval 30&lt;br /&gt;#lcp-echo-failure 4&lt;br /&gt;noauth&lt;br /&gt;persist&lt;br /&gt;#mtu 1492&lt;br /&gt;usepeerdns&lt;br /&gt;plugin rp-pppoe.so&lt;br /&gt;nic-ath0&lt;br /&gt;user "xxxxxxxxxxx"&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now to create a connection use:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# pon dsl-provider&lt;br /&gt;&lt;br /&gt;Plugin rp-pppoe.so loaded.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;"dsl-provider" is name I chose for the connection which is the default&lt;br /&gt;&lt;br /&gt;And to stop a connection use:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# poff&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To stop all processes:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# poff -a&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can check the log using this commmand:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# plog&lt;br /&gt;pppd[3928] : pppd 2.4.4 started by root, uid 0&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-5957613590005004277?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/5957613590005004277/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=5957613590005004277" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5957613590005004277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/5957613590005004277?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2007/12/how-to-create-dsl-connection-on-ubuntu.html" title="How to create a DSL connection on ubuntu" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_BPxoSnKU1Ww/R1VxfNcu0QI/AAAAAAAAAAs/FC99H8EfgW0/s72-c/pppoeconf1.jpg" height="72" width="72" /><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;DkMDR3wyfSp7ImA9WxRaEEk.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-3290639723105163066</id><published>2007-09-19T09:36:00.000-07:00</published><updated>2008-12-11T17:14:36.295-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-11T17:14:36.295-08:00</app:edited><title>My Firefox Toolbars are blank !</title><content type="html">For some unknown reason my web developer and delicious firefox toobars disappeared, I could see the space where they used to be but no icons or anything was there. I tried with the view toolbars menu , checking and unchecking to hide and show them, but that didn't work. Finally I found the solution, firefox have an option called firefox safemode &lt;a href="http://kb.mozillazine.org/Safe_mode" target="_blank"&gt;http://kb.mozillazine.org/Safe_mode&lt;/a&gt; which allows  us to troubleshoot some problems (like this one), all you have to do is:&lt;br /&gt;&lt;br /&gt;1. Close any running intance of firefox.&lt;br /&gt;2. Type this command :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;firefox -safe-mode&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;For more info for different OSs &lt;a href="http://kb.mozillazine.org/Safe_mode" target="_blank"&gt;check here&lt;/a&gt;&lt;br /&gt;3. Then check the box for "Reset toolbars and controls"&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_BPxoSnKU1Ww/RvF0QQyhTGI/AAAAAAAAAAU/CqheFnoeCP4/s1600-h/ffsm.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_BPxoSnKU1Ww/RvF0QQyhTGI/AAAAAAAAAAU/CqheFnoeCP4/s320/ffsm.jpg" alt="" id="BLOGGER_PHOTO_ID_5111994874775817314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;4. Click on "Make changes and restart"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's it... your toolbar icons should appear again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-3290639723105163066?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/3290639723105163066/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=3290639723105163066" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3290639723105163066?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/3290639723105163066?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2007/09/my-firefox-toolbars-are-blank.html" title="My Firefox Toolbars are blank !" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_BPxoSnKU1Ww/RvF0QQyhTGI/AAAAAAAAAAU/CqheFnoeCP4/s72-c/ffsm.jpg" height="72" width="72" /><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;DkQDSHk_cSp7ImA9WB5aEE8.&quot;"><id>tag:blogger.com,1999:blog-19309483.post-6959926278694102574</id><published>2007-09-05T13:06:00.000-07:00</published><updated>2007-09-05T13:32:59.749-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-05T13:32:59.749-07:00</app:edited><title>Oditt.com: web 2.0 for podcast episodes</title><content type="html">&lt;a href="http://www.oditt.com/" target="_blank"&gt;Oditt&lt;/a&gt; it's a community-based site focused on ranking podcast episodes. It's very useful if you want to find specific podcast episodes about very narrow subjects, you can use tags, categories, or just keywords.  Also, you can find RSS feeds for tags, categories, popular and recent episodes.&lt;br /&gt;&lt;br /&gt;Check some oracle episodes here: &lt;a href="http://www.oditt.com/tag/oracle"  target="_blank"&gt;http://www.oditt.com/tag/oracle&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/19309483-6959926278694102574?l=devtime.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://devtime.blogspot.com/feeds/6959926278694102574/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=19309483&amp;postID=6959926278694102574" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6959926278694102574?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/19309483/posts/default/6959926278694102574?v=2" /><link rel="alternate" type="text/html" href="http://devtime.blogspot.com/2007/09/odittcom-web-20-for-podcast-episodes.html" title="Oditt.com: web 2.0 for podcast episodes" /><author><name>carlos</name><uri>http://www.blogger.com/profile/15934070138187932218</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://4.bp.blogspot.com/_BPxoSnKU1Ww/TVGdmDggY0I/AAAAAAAAACs/iUweq9-a9q4/s220/me_small.jpg" /></author><thr:total>0</thr:total></entry></feed>

