View this site in English Ver este site em português

Multiple sessions for different instances of Cakephp in the same domain

26 May, 15:13, by zehzinho Tags: ,

Did you know that if you run multiple instances of the same application in Cakephp in the same domain, they will share the same Session? For example, suppose you have instances running at:

www.example.com/instance1 and www.example.com/instance2

If you login in the first instance and access instance2, you’ll see that you will already be logged in. This happens because Cakephp, per default, uses the PHP Session storage mechanism.

If this is not the behaviour you expect, Cakephp allows you to choose from three options for the Session handling method: php (default), cake and database. The current method is stored in the Session.save variable in app/config/core.php.

Changing the method from php to cake will make Cakephp store the Session variables in the app/tmp/sessions directory. If you do it, remember to create and give the appropriate permissions to this directory.

Voilá, that’s all you need to do have separate Sessions for each of your Cakephp instances.

YUI’s core CSS foundation

20 April, 15:12, by zehzinho Tags: ,

I’m developing a new system for my own needs and I want to use the newest tecnologies as part of my learning process. One really nice thing that I’ve found in the Yahoo Developer Network was the Yahoo User Interface Core CSS Foundation. In practice, the foundation is made of three CSS files:

  • The CSS Reset: “removes the inconsistent styling of HTML elements provided by browsers. This creates a dependably flat foundation to built upon.”
  • The CSS Fonts: “provides cross-browser typographical normalization and control while still allowing users to choose and adjust their font size.”
  • and The CSS Base: “applies a style foundation for HTML elements that is consistent for A-grade browsers.”

All this sound very nice to me, since I’m not a CSS expert and I know those guys from Yahoo are. A simple and fast way to get a common look to your websites at least in the most common web browsers.

As a final tip, I also recommend the Grids CSS for those who are not very intimate with CSS and still want to build some simple layouts.

Jjot – Online tool to take notes

02 April, 15:11, by zehzinho Tags:
Today I’ve discovered a very simple tool called Jjot which has the following slogan: “Take notes online, fast”. The tool has been recommended by many people, including those guys from lifehacker.

I’ve just started to use it and it’s the best tool I ever found for notes taking, it’s much better than google notebook. The only feature I miss is the possibility of grouping the noteboards under a parent noteboard. It would help the users to keep the notes even more organized. I’ve sent them an email suggesting this new feature. Let’s see what’s their answer.

The 3rd PHPMS Workshop

29 March, 15:09, by zehzinho Tags:

The 3rd PHPMS¹ Workshop was held here in Campo Grande last Saturday (Mar 27). We had presentations about SEO, WordPress MU and Guilherme Blanco gave two talks about Doctrine, the first one was an overview of the tool and the second integrated doctrine with the Zend Framework.

I couldn’t attend the presentations in the morning, but the presentations in the afternoon were quite nice. We also had a round table about “The PHP programmer skills”, in which I was one of the “guests”.

The PHPMS Workshop was a success, again. More than 40 people were present and I believe that each one of them learned something.

We also had a great  phpinga² in a local pub here in Campo Grande.

Saulo Arruda also posted about the round table (in Portuguese) and here you can find some more pictures.

¹ PHPMS is the local PHP Users Group. “MS” denotes “Mato Grosso do Sul”, the state we live in.

² “PHPinga“s are traditional meetings of the Brazilian PHP community (and also worldwide, I suppose). People usually drink some beer and talk about PHP and future events, among other things :)