News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Harun Yayli's Blog:
oci_bind_by_name maxlength is not so optional
0 comments :: posted Friday May 09, 2008 @ 13:45:44
voice your opinion now!

Harun Yayli came across a slight problem in his development using the oci_bind_by_name function for one of his queries:

If you think that the maxlength parameter in the documentation of oci_bind_by_name is optional, see this example and think again.

His sample code gave him a "can bind a LONG value only for insert into a LONG column..." error from his Oracle database. His fix was to add that length parameter (his max column length) and all was well. One of his comments (from cj) helps to explain things a bit more:

It makes senses that a length would be required because when the oci_bind_by_name() call is made, there is no data in $$key (a.k.a. $a, $b or $c). Without a length passed, PHP tells the DB to expect a single byte string.
tagged with: ocibindbyname maxlength optional error oracle


Stefan Priebsch's Blog:
Turning errors into exceptions
0 comments :: posted Wednesday April 30, 2008 @ 12:53:35
voice your opinion now!

In a recent blog entry Stefan Priebsch shows how to take an error thrown by your script and turn it into an exception (to make things like catchable fatal errors).

While I would personally prefer an exception to be thrown in the first place, it is pretty easy to convert errors to exceptions in PHP.

His example is pretty simple - you set a custom error handler in your script that pulls in the error information and tosses an exception based on the error number the handler is given. Then you can use the try/catch method to see if your script has tossed an exception of the fatal error type. Nice simple solution to handle an interesting little problem.

tagged with: error exception convert try catch fatal errorhandler

DevShed:
Creating an Error Handling Module for a PHP 5 File Uploader
0 comments :: posted Wednesday April 02, 2008 @ 16:38:58
voice your opinion now!

On DevShed today, they continue their look at uploading files in PHP with the addition of some error handling features for their current script.

In this third tutorial of the series, I'm going to show you how to incorporate a brand new error checking module into the file uploading PHP script created in the last article.

They show the basic method - uploading with no error checking - before showing how much help adding in an error checking component to watch for things like files that are too large, invalid file choices and problems writing the file on the server side.

tagged with: php5 error handler file upload tutorial module

David Coallier's Blog:
PHP Quebec Hindering the PHP Project development?
0 comments :: posted Monday March 17, 2008 @ 11:15:13
voice your opinion now!

On a bit more controversial note, David Coallier has posted about a rather unpleasant experience he had at this year's PHP Quebec conference - in his own words:

As many of you know, this time of the year is usually the PHP Quebec conference and many php internals and international speakers fly to Montreal to speak. [...] This morning (2008/13/03) I saw Lukas on IRC and we said "Hey let's meet around 1pm to discuss about the PHP TestFest"

He met Lukas at the hotel, in the lounge of the hotel, not attending any of the talks. As he sits there talking to the others, a PHP Quebec staff member walks out and hands him a bill (for around 450 CAD) for attending the conference. After a little checking - both with fellow user group members and with the hotel staff as to the validity of this behavior, he could only assume that it was some "money driven" attempt on the PHP Quebec conference's side to get what they could.

Be sure to check out the comments for some other views from the community.

tagged with: development phpquebec2008 project charge error

Nick Halstead's Blog:
Programming Tips #9 "debug_backtrace"
0 comments :: posted Monday February 11, 2008 @ 10:33:00
voice your opinion now!

Nick Halstead continues the "Programming Tips" series on his blog today with tip number nine (a very handy tip indeed) - using debug_backtrace from Larry Garfield.

Despite the proliferation of debugging tools, especially real-time debuggers, "debugging by print statement" remains the most common form of debugging in most programming languages.

An example of its use is included by way of a debug() function that returns the message it a bit friendlier format.

tagged with: debugbacktrace error debug programming tip

Jonathan Snook's Blog:
Easier Static Pages for CakePHP 1.2
0 comments :: posted Tuesday February 05, 2008 @ 08:44:00
voice your opinion now!

Jonathan Snook has posted about a method he's using to make the creation/use of static pages in a CakePHP application (or website) simpler.

Traditionally in a CakePHP application, to do static pages you have two options: use the built-in Pages controller or set up an empty action in a controller.

Feeling that neither of these two options met how he wanted things to work, Jonathan (and Nate Abele) developed a class that extends the error handler in the CakePHP framework to handle "missing" actions and controllers. This means that, if an unknown controller/action combo is called, this script will check in its correct location (in the structure of the site) and try to find it to render it.

tagged with: cakephp framework static page error handle missing controller action


release security code developer zendframework PEAR job application package releases ajax cakephp conference PHP5 database mysql zend framework book pecl

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework