|
Sponsored Link
|
In a new post today C. Sadeesh Kumar has a quick tip to help your script detect file types without having to rely on the extension to be correct.In most web applications today, there is a need to allow users to upload images, audio and video files. Sometimes, we also need to restrict certain types of files from being uploaded - an executable file being an obvious example. Security aside, one might also want to prevent users from misusing the upload facility, e.g. uploading copyrighted music files...
Joris de Wit has a (very) quick post about a handy tip he found about switching layouts easily with Twig in his Symfony2-based application - a handy ternary sort of switch that can detect when something's an Ajax request.I just learned about the 'app' global variable in twig. It's very handy for loading a special layout for ajax requests.The "app" variable allows you get get back at some of the settings of your application and check on special things like the isXMLHttpRequest in his example. For more...
In a new post Stas Malyshev has shared some code for an OAuth provider he's written up to work specifically with Zend Framework applications.Zend Framework has pretty good OAuth consumer implementation. However, it has no support for implementing OAuth provider, and it turns out that there aren't many other libraries for it. Most examples out there base on PECL oauth extension, which works just fine, with one caveat - you have to have this PECL extension installed, while ZF implementation does not...
Many large web services nowadays support 2-step verification to enhance the security for their users. With 2-step verification you have to supply a one-time-token besides your usual username/password so in case someone steals your password it won't help them much, because they don't have (hopefully) the device which provides this one-time-token for you. You may know this from your bank or even enabled it on Google Apps, Facebook or Amazon.
The main point about 2-step verification is that something else...
Michelangelo van Dam is back today with the next part of his "Quality Assurance in PHP Projects" series, the third part of his look at PHPUnit, the popular PHP-based unit testing software.Time for the third part on unit testing with phpunit in my Quality Assurance on PHP projects series. In part one we started writing unit tests for a simple game of tic-tac-toe. In part two we started converting our unit tests into actual code and moved our general unit test code for grids into a Grid focussed unit test....
As mentioned by CodeIgniter.com Phil Sturegon has posted a wrapup of this year's CICON2011 (CodeIgniter conference, US-side) that happened in New York on the 20th.CICON2011 happened and it was awesome. We had 100 CodeIgniter nerds in the same place - which is the biggest collection of CI nerds since 54 at CICON2010 in the UK, but this event was so much better. We had a whole load of announcements that have changed the way the framework is contributed to and improved the whole community for the better....
Latest PEAR Releases:
XML_RPC 1.5.5
DB 1.7.14
Zend Framework has pretty good OAuth consumer implementation. However, it has no support for implementing OAuth provider, and it turns out that there aren't many other libraries for it. Most examples out there base on PECL oauth extension, which works just fine, with one caveat - you have to have this PECL extension installed, while ZF implementation does not require that.
So I went ahead and wrote some code that allows to easily add OAuth provider to your ZF-based or ZF-using application. That should...
Time for the third part on unit testing with phpunit in my Quality Assurance on PHP projects series. In part one we started writing unit tests for a simple game of tic-tac-toe. In part two we started converting our unit tests into actual code and moved our general unit test code for grids into a Grid focussed unit test. In this part, we're looking at how we can optimize the tests for our players.When we look at our initial tests for players, we only focussed on two things: each player has a symbol and...
Sometime debugging PHP applications isn't as easy as just pointing your IDE directly at the server and starting to work. Derick Rethans has a new post talking about one such situation, remote debugging with a firewall in between you and the remote machine with XDebug.
The PHP debugging extension Xdebug has "remote" debugging capabilities for single-step debugging PHP applications. This works by setting your favourite IDE into listening mode and instructing Xdebug (with one of the handy browser extensions...
Kevin Schroeder has a suggestion for developers out there - you should hit F5 more often:The best developers hit "Refresh"? No. Well, yes, but that's not what I was referring to. F5 is what you hit in Zend Studio/PDT to "Step Into" during a debug session. A LOT of developers just look at an API, or code completion, write to it, commit, deploy and they're done. I have found that the best developers not only build to the API, whatever it is, but also watch the API at work.In his opinion, he's never met...
Christian Weiske has a new post to his blog looking at a feature of PHP that's very useful yet doesn't seem to be widely used - phar archives. His post introduces you to phar and includes the good and the bad about their use.It is possible to pack an entire PHP web application up in one single file and run it without unpacking it. This files usually have a .phar extension, which is an acronym for PHp ARchive, loosely based on jar (Java ARchive). [...] With PHP 5.3.0, the Phar extension is an official...
On PHPBuilder.com today Jason Gilmore has a new tutorial showing you how to gets started with the FuelPHP framework, a relatively new framework-on-the-block that will feel familiar for users of CodeIgniter and Kohana.As it happens, there are even frameworks available for those developers wishing to take advantage of the very latest PHP features such as closures and namespaces. Two such solutions are the aforementioned fat-free microframework and another relative newcomer called Fuel. Although only about...
Popular posts from PHPDeveloper.org for the past week:PHPClasses.org: Top 10 Wrong Ideas About PHP That You Should Get Right
PHP.net: PHP 5.3.7 Released!
Lee Blue's Blog: What's The Best PHP Framework?
Dzone.com: Object Calisthenics
SkyTechGeek.com: 10 Exceptional Tools For Website Testing
Tutorialzine.com: Building a Website with PHP, MySQL and jQuery Mobile, Part 1
Jason Gilmore's Blog: How I Learned to Stop Worrying and Love Zend_Form
Working Software Blog: Escaping single and double quotes for use...
It is possible to pack an entire PHP web application up in one single file
and run it without unpacking it.
This files usually have a .phar extension, which is an acronym
for PHp ARchive, loosely based on jar (Java ARchive).
The PEAR installer has been
distributed since ages as a single .phar file, thanks to the
PHP_Archive package.
With PHP 5.3.0, the Phar extension
is an official part of PHP.
Shipping your applications as Phar thus is safe since 5.2 has reached
its EOL already....
Remote Debugging PHP with a Firewall in the Way
London, UK
Thursday, August 25th 2011, 21:42 BST
The PHP debugging extension Xdebug has "remote" debugging capabilities for single-step debugging PHP applications. This works by setting your favourite IDE into listening mode and instructing Xdebug (with one of the handy browser extensions for example) to initiate debugging. When Xdebug is instructed it tries to make a connection to the IP address and port number that are configured in php.ini. On this IP...
I imagine the title of this post is probably on the minds of all three of the regular readers of this blog (or probably not, since you probably figured this was on the slow road to just another abandoned WordPress blog). Well, as often in the case, life gets in the way, and in this caseA more soA my professional life than anything (though having an additional little one in the picture certainly didn't help). Let me recap my last few months:
Got an incredible promotion to become the Community Manager at...
Related to this other post about content security policies in PHP sites, DashExamples.com has a quick new post about what you'll need to add to your application to implement a policy of your own.Content Security Policy(CSP) is a mechanism in the browser that restricts what content will be requested and run by the browser. CSP does this by passing in a specific response header that tells the browser what resources (images, javascript, css, frames, etc) can be requested and accepted to execute. There are...
In this recent post to Theme.fm they have a guide to deploying your WordPress site (or really any sort of PHP-driven site) with Capistrano. There's some WordPress specific bits in there, but it's a good overall guide to deployment with this handy tool.I'm not a Capistrano expert (yet) and in this post I'll try to give you an overview how to set it up and how to deploy WordPress applications (websites) in seconds. We'll work with only one server today but the principles in deploying to two or more are...
In a new post to his blog Robert Basic takes a brief look at importing Symfony2 security settings from a bundle he's been creating back into the main configuration.I started to work on/figuring out the security part in Symfony2 and one part where the docs fail so far is to explain how to import security settings from a bundle. Once I put some thinking into it, it's pretty easy actually. Simply import the needed security file in your main config file.His trick is to use the "imports" key in his YAML...
|
|