Stay logged in with PHP Sessions

Building own applications

When you love building everything yourself and dont want to depend on frameworks you most likely came across the need of building a login system that has the capability to let the user stay logged in into your site.

The straight forward way would be to use PHP build in _SESSION System to store login information. But this session system has a garbage collection which cleans the session data from time to time.

STAY LOGGEDIN!

First of all what you can do to lower that effect is to set the garbage interval very high:

session.gc_maxlifetime = 65535

Think this will solve your problem? Nope.

Continue reading Stay logged in with PHP Sessions

8 Resources to pass the ZCE / ZCPE 5.5 exam successfully

Do you love PHP as much as I do? So then you want to become a ZCE and have a solid proof, that you can code in this language? Become a Zend Certified Engineer? No wait, Zend recently changed the name of its former certifcate program “ZCE” (for PHP 5.3) ZCPE for PHP 5.5 which means that you will be a Zend Certfied PHP Engineer. Not that it matters, the new ZCPE exam is not really harder to pass than the exams before. It just includes the “new” PHP Features which wern’t there in the ZCE exam.

Continue reading 8 Resources to pass the ZCE / ZCPE 5.5 exam successfully

Force PHP to show all errors

Many times I came across the question why the errors in PHP don’t show up and only a blank pages is served. It can be very annoying when developing a huge app and when you want to test something.

Sometimes errors won’t even appear when you set all directives to the right values. For example when writing something before “namespace”. (Exception the “declare” keyword.)

Continue reading Force PHP to show all errors