Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jani Hartikainen's Blog:
Handling errors in Zend Framework
Mar 03, 2009 @ 13:54:59

Jani Hartikainen has written up a new post looking at error handling in one of the more popular PHP frameworks - the Zend Framework.

In Zend Framework based applications, error handling is typically done using the error controller, but there are different ways to send the execution to it - some better than others. Let’s look at some ways to trigger the error controller and how to have it handle different error conditions.

He walks through the steps to create the Error controller, change the front controller to use it and add in a few different kinds of actions to handle the various error types that might come up (like "page not found" or "not authorized"). Errors can then be forwarded to each of the actions by the resource the visitor errored from. Of course, he also mentions that exceptions can do something even better - handle the error without all of that messy forwarding around. (There's an example of that version too).

tagged: handle error controller zendframework exception forward action

Link:

Alison Holloway's Blog:
PHP 5.2.2 Setup on Windows
May 16, 2007 @ 16:19:00

In her blog today, Alison Holloway offers a quick tip for developers out there trying to install PHP 5.2.2 on their Windows machine and running into trouble. Maybe it's the same issue?

I've just been setting up PHP 5.2.2 on Windows XP Pro, with Apache 2.0.59. I couldn't get Apache to find the correct php.ini file. It was looking in C:Windows, instead of where I installed PHP. The httpd.conf file told Apache to look in C:Program FilesPHP, but it wasn't. So none of the extensions were loading.

The problem? She wasn't putting in the right kind of slashes into her configuration file. It couldn't find the right path because of it. The issue isn't mentioned in the latest version of the Underground PHP and Oracle Manual (but will be in the future).

tagged: php5 windows setup slashes forward back underground manual php5 windows setup slashes forward back underground manual

Link:

Alison Holloway's Blog:
PHP 5.2.2 Setup on Windows
May 16, 2007 @ 16:19:00

In her blog today, Alison Holloway offers a quick tip for developers out there trying to install PHP 5.2.2 on their Windows machine and running into trouble. Maybe it's the same issue?

I've just been setting up PHP 5.2.2 on Windows XP Pro, with Apache 2.0.59. I couldn't get Apache to find the correct php.ini file. It was looking in C:Windows, instead of where I installed PHP. The httpd.conf file told Apache to look in C:Program FilesPHP, but it wasn't. So none of the extensions were loading.

The problem? She wasn't putting in the right kind of slashes into her configuration file. It couldn't find the right path because of it. The issue isn't mentioned in the latest version of the Underground PHP and Oracle Manual (but will be in the future).

tagged: php5 windows setup slashes forward back underground manual php5 windows setup slashes forward back underground manual

Link:

Nick Halstead's Blog:
Bad code, bad data flow, good idea?
May 15, 2007 @ 14:28:00

While developing a new application in a framework, Nick Halstead came across an "oops" point where he realized that the part of the application he was working on could have been coded better. In this instance, he found a spot where he needed to pass data backwards and forwards through the app without loosing "the flow". His solution? Singletons!

One of these situations occurs when you suddenly that find you don't have access to data you want, or you can't pass back (or forward) data as part of the common flow of your application. [...] The solution was to create a singleton class which uses references to bind a name to a already defined variable.

In his example, he illustrates (and explains) how to use a class he developed (varmap) to handle the assignment/removal/etc of the data to the common Singleton object.

tagged: singleton data flow backward forward framework application singleton data flow backward forward framework application

Link:

Nick Halstead's Blog:
Bad code, bad data flow, good idea?
May 15, 2007 @ 14:28:00

While developing a new application in a framework, Nick Halstead came across an "oops" point where he realized that the part of the application he was working on could have been coded better. In this instance, he found a spot where he needed to pass data backwards and forwards through the app without loosing "the flow". His solution? Singletons!

One of these situations occurs when you suddenly that find you don't have access to data you want, or you can't pass back (or forward) data as part of the common flow of your application. [...] The solution was to create a singleton class which uses references to bind a name to a already defined variable.

In his example, he illustrates (and explains) how to use a class he developed (varmap) to handle the assignment/removal/etc of the data to the common Singleton object.

tagged: singleton data flow backward forward framework application singleton data flow backward forward framework application

Link:

Mike Naberezny's Blog:
Moving Forward
May 17, 2006 @ 17:00:33

Mike Naberezny has both sent an email to the Zend Framework list and posted here a notice that he will be leaving Zend as of next week.

You've probably noticed that there are some new Zenders on the mailing lists. During the next week, they'll begin to take over my day-to-day responsibilities such as administering the SVN accounts. Andi will be sending out a note with more information. For those of you that work with me closely, I'll be sending individual notes letting you know who to contact. Of course, please feel free to email me yourself if you have a specific question.

Mike has been one of the key developers for the Zend Framework from day one, and I know the project will be sad to see him go. He has nothing but a positive outlook for the Framework, and high hopes for his future as an independant contractor. Best of luck, Mike - you will be missed on the project.

tagged: zend framework developer moving forward resign zend framework developer moving forward resign

Link:

Mike Naberezny's Blog:
Moving Forward
May 17, 2006 @ 17:00:33

Mike Naberezny has both sent an email to the Zend Framework list and posted here a notice that he will be leaving Zend as of next week.

You've probably noticed that there are some new Zenders on the mailing lists. During the next week, they'll begin to take over my day-to-day responsibilities such as administering the SVN accounts. Andi will be sending out a note with more information. For those of you that work with me closely, I'll be sending individual notes letting you know who to contact. Of course, please feel free to email me yourself if you have a specific question.

Mike has been one of the key developers for the Zend Framework from day one, and I know the project will be sad to see him go. He has nothing but a positive outlook for the Framework, and high hopes for his future as an independant contractor. Best of luck, Mike - you will be missed on the project.

tagged: zend framework developer moving forward resign zend framework developer moving forward resign

Link:


Trending Topics: