Symfony Headache pt.1

Ok since I had a very frustrating day with symfony, I have decided to make a Symfony Headache series. In these series, I’ll point some problems in Symfony and give my solution.

What made me do this? I have spent a WHOLE DAY trying to solve Forbidden problem accessing one of symfony applications. I can’t explain how furious I was, after I found the explanation to my problem.

I’m using /home/user/public_html folder for web sites, and then map them into virtual hosts. Somehow, I did not know that my flags for other users are unusual, or at least different from flags on my other computer, and did not check them. Apparently, my /home directory, didn’t have right permissions, so Apache could not ‘read’ my web sites.

So, if there is any possibility that you did not check /home permissions, check it! You need to have at least rx flags for other users, on your web directory, for Apache to read it.

😦 bye

Using Komodo Editor Symfony plugin

This would be the continuance of the PHP Symfony Editor post.

This time, I’m going to tell you something about this particular plugin for Komodo Editor. I think you can use it in Komodo IDE, but I’m not quite sure.

Anyway, you can download it here.

When you download file with the kpz extension, you have to open toolbox in Komodo Editor, and select import kpz package. You can import it from the URL also.

When you finish importing and open the menu in the toolbox, you’ll see shortcuts to symfony commands. There is a little problem here, or at least it was for me.

Since I use centralized Symfony installation, and also work on GNU/Linux, accessing symfony commands with symfony wont do the job. Also there is the problem with the configure->database shortcut.

First things first!

To work around first problem, I did next:

Created symfony.sh file in my home and typed next code: php5 /var/www/symfony-1.4/data/bin/symfony $*

With it, I’m sure that running the symfony.sh, I will be running script of centralized Symfony installation. $* is for all arguments that are passed to my symfony.sh. Then I make it executable with chmod u+x, but you can make it executable for all users on system. Then, you have to make soft link in /usr/bin pointing to the symfony.sh script. Basically, with this, you can be in any directory and still be able to run symfony command, which will run the symfony.sh script. This way, following any of komodo editor shortcuts, you will be accessing reall symfony commands.

Second thing is that, when you try to do configure->database you’ll get this output:

Task “configure:database” is not defined.

This is because, database command is not positioned in the project directory, and is trying to run symfony command, which is not available if you do not have created project. This thing is easy, you just right click on this shortcut, and type %p in Start in edit.

These are the problems I found, while testing this plugin. I did not test every command, so if you get some error, I’d be glad to hear the problem.

Bye!