Alex Moreno

A Drupal Developer in London

Accessing centos apache/httpd from vbox host

This is the scenario. You installed vbox in your Mac, windows or Linux computer. Then you´ve installed Centos or Red Hat (or any other Red Hat flavor) in this virtual box.

Next step, installed httpd (apache2) and... even it is running and httpd status confirms it with a "running" message, it cannot be accesible from your host machine.

The problem is on iptables. Red Hat by default denies access to this machine from other (external) machines. Solution? Very easy, open iptables file:

vim /etc/sysconfig/iptables


git Integration Manager Workflow tutorial



mkdir gitlab/blessedrepo

cd gitlab/blessedrepo

git init


Creating new files:



git add .

git commit -m "first file in blessed repository"

git push



mkdir developer2

cd developer2

git clone /Users/air/gitlab/blessedrepo



ls blessedrepo/


cd blessedrepo

vim fileindev2.html

git add .




private git repositories in bitbucket

Let me got directly to the point. The bitbucket documentation is wrong, on the begining you are just suposed to do a git remote add origin

in the directory which you want to commit. But this will not work:

fatal: Not a git repository (or any of the parent directories): .git

Solution? Init the repository:

git init

git remote add origin https://[email protected]/ACCOUNT/REPOSITORY.git


Theming you module

Docs are not allways the best part in programming languages, frameworks or CMS. Sometimes you try to make something and you find problems, just because poor documentation.

It's my situation just now. I was trying to create tpl.php files for a module, and it is really easy... if you follow exactly all the steps.

First, hook_menu:




 * Implements hook_menu().


function mymodule_menu() {

$items = array();



Solving error 500 in Symfony2

Having the typical error 500 in Symfony2? Well, it is very tipical, not just in Symfony but in Drupal and other web frameworks and CMS. Solving it can be a big headache... if you don't know where to see.

In Drupal it is easy to solve it using show all errors in php (on index.php of Drupal, for example). In Symfony2 you can use this tip:

Go to the root of your app. Then execute a clean cache:


Symfony2: Not a git repository

Ok, you want to install a bundly in Symfony2, and you are going to use git. You go to your root directory... but, here is the problem


{syntaxhighlighter brush: as3;fontsize: 100; first-line: 1; }git submodule add git:// vendor/simplepie{/syntaxhighlighter}

Yes, it's Simplepie bundles for Symfony2. Ok, the error:


{syntaxhighlighter brush: as3;fontsize: 100; first-line: 1; }fatal: Not a git repository (or any of the parent directories): .git{/syntaxhighlighter}