Last few scribblings
- How MyPhoneExplorer helps Android / HTC / Droid / X10 owners
- 01-Sep-2010
- The Book of Five Rings by Miyamoto Musashi
- 08-Apr-2010
- Really Old Stable Joomla :-)
- 19-Mar-2010
- Check link popularity based on ranking (Google PageRank, Alexa, etc)
- 18-Mar-2010
- Free CakePHP E-Book - Super Awesome Advanced CakePHP Tips
- 18-Mar-2010
- Xmouse on Windows 7
- 01-Mar-2010
- Happy Birthday Alexander!
- 10-Feb-2010
- 1st Kyu (Iwama-Ryu)
- 03-Feb-2010
- To all those ..
- 24-Dec-2009
- Netgear EVA9150 Digital Entertainer Elite
- 05-Dec-2009
jonjo.se
piglets.org
Alain's Jabberbox
Ads by Google
The Local
Categories
Archives
Top Exits
en.wikipedia.org (231)
www.sevenforums.com (30)
www.joho.se (27)
www.pseudocoder.com (27)
www.homrighausen.com (19)
www.sevenforums.com (30)
www.joho.se (27)
www.pseudocoder.com (27)
www.homrighausen.com (19)
Popular Entries
- JoomlaFCK - FCKeditor for Joomla (27618)
- QuadraPop high score 2007-01 (22034)
- PuTTY with Tabs (17080)
- Serendipity Blog Software Update! (11879)
- Aikido 3D (11776)
- Cool cooling of your laptop (10944)
- Where in the world is Rod Jackson? (9143)
- Looking for that re-usable Wiki engine code (8932)
- Sony Ericsson P900 Theme: JoHo Orange (8384)
- Samsung LE-40F86BD, sweet rock 'n' roll (8171)
Freakonomics
Blog Administration
Coding, building, tweaking
Thursday, March 18. 2010
Free CakePHP E-Book - Super Awesome Advanced CakePHP Tips
There are a few books out for CakePHP development. The main problem with them is that they're fairly old. There's also a book on the way (2010) that has not yet been released. And then there's Matt Curry's completely free CakePHP book for those that have managed to grasp the basics of CakePHP and want a guide to somewhat more advanced topics.One can only congratulate Matt on a great idea and implementation; and what's not to like about a free book about CakePHP development?
An introduction to the book here: www.pseudocoder.com/free-cakephp-book/
Matt Curry's original blog post about it here: www.pseudocoder.com/archives/2009/05/13/free-cakephp-e-book-super-awesome-advanced-cakephp-tips/
The book's direct download link is here: www.pseudocoder.com/Super_Awesome_Advanced_CakePHP_Tips.pdf
More about CakePHP can of course be found on www.cakephp.org
Matt has also released a number of CakePHP plugins and code snippets here github.com/mcurry.
Thanks Matt!
Thursday, April 30. 2009
Preventing access to backup PHP~ files in Apache
There are a number of ways to go around this, of course. One way is to configure a separate directory for each user where Emacs stores its backup files, and then make that directory readable only by the user.
Why is this a problem? Well, if you're using Emacs to quickly modify PHP applications' configuration files, like the database configuration file, you'll leave a trail of .php~ files. These files are typically not parsed by the PHP processor, instead they are handled by the text file handler in Apache. Meaning, if I enter the url http://myverycoolsite.com/secret.conf.php~, Apache will gladly display its actual contents, just like if you were editing the file.
This can be prevented by using the
<Files ~ "\.(html\~|htmls\~|php\~|phps\~|php3\~|php4\~)$">
Order allow,deny
Deny from all
</Files>
Perhaps not the most elegant of solutions, but it works. It will result in an "Forbidden" response from Apache. Check out the Apache documentation for more details on this directive.
You can go back to sleep now :-)
Friday, January 30. 2009
Nullifying pointers in PHP
Using pointers in PHP is quite useful at times; but it can also leave you dumbstruck with serious debugging on your hands. Consider this construct:CODE:
for ($i = 0; $i < 10; $i++)
{
$p1 = null;
if ($Buffer [$i]['type'] == 'scanthis'])
{
$p1 =& $Buffer [$i]['data'];
}
..
if ($p1 != null)
..
}//for
This will in effect dereference and overwrite a given ['data'] array member of $Buffer if ['scanthis'] evaluates to true. But I still want to use "null" as an indicator to whether or not to do something.
So I replace the above with:
CODE:
for ($i = 0; $i < 10; $i++)
{
unset ($p1); <--
$p1 = null;
if ($Buffer [$i]['type'] == 'scanthis'])
{
$p1 =& $Buffer [$i]['data'];
}
..
if ($p1 != null)
..
}//for
This will destroy $p1, but not what it's pointing to, and then it sets $p1 to null, just like before.
This is obvious when you look at it, and there are a number of other ways to accomplish what I describe above, but it had me stumped for a while :-)
Saturday, April 7. 2007
Delphi for PHP
So Borland (or CodeGear) finally realized the web was a place where old Delphi developers may hang around on, and decided to release Delphi for PHP (!). I haven't looked at the product myself, other than screenshots, but it sounds like someone at Borland or CodeGear got their flashbulb working a bit too late. Had this product been out a few years ago, it might have been an interesting package. As an IDE and framework platform, it may still have some merit, in particular for "quick and dirty" needs. And, I suppose, for someone who has spent a lot of time working with Delphi/Kylix and want to publish "generic PHP apps" without having to learn too many new things in order to do so, Delphi for PHP may be a good solution.Having worked with Turbo Pascal since version 2.x (yes, I'm that old), and then Borland Pascal, Object Pascal, Delphi, Turbo C/C++, Borland C/C++, I would probably have been interested in Delphi for PHP, five years ago. But I'd say it takes a lot more than a revamped Delphi interface sporting PHP code, to get people with tools like ZDE and all the available PHP frameworks, to switch their development environment.
TASM anyone? Or perhaps Microsoft will now release MASM for PHP. Another hotseller might be Sidekick for the Web! :-)
I wish CodeGear the best of luck, and I hope this will bring forth even more competent PHP developers.
Other related links:
Delphi Wiki: http://delphi.wikia.com
Slashdot: Delphi for PHP released
CodeGear: Delphi for PHP
First impressions: Tim Anderson’s ITWriting
Other impressions: The Joel on Software Discussion Group
InfoWorld: CodeGear extends Delphi for PHP, Vista, AJAX
Professional PHP: Delphi for PHP
Thursday, March 1. 2007
SwiftMailer 3
Early versions of Swift were comparable to PHPMailer. Swift has since evolved and matured into a fully-fledged object-oriented mailing solution. Compared with PHPMailer, the interface for Swift is both tighter and more intuitive."
So describes Chris Corbyn his Swift or SwiftMailer project for PHP. I've been using it since version 2.x and can happily recommend it to any serious PHP developer out there (in stating this, I'm by no means claiming to be a serious PHP developer of course :-). Chris provides for both PHP4 and PHP5 compliant packages.
SwiftMailer is more than just a replacement for PHPmailer, XpertMailer, and other similar packages. Version three sports a much more flexible plugin architecture.
Do you PHP? Do it Swiftly.
You'll find SwiftMailer on www.swiftmailer.org.


