 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Josh Adell: Serializing Data Like a PHP Session
by Chris Cornutt May 02, 2013 @ 09:11:33
In this new post Josh Adell looks at working with PHP sessions and how you can manually encode data to look as if it came from the normal session handling.
If you have ever popped open a PHP session file, or stored session data in a database, you may have noticed that this serialization looks very similar to the serialize function's output, but it is not the same. Recently, I needed to serialize data so that it looked like PHP session data (don't ask why; I highly suggest not doing this if it can be avoided.) It turns out, PHP has a function that encodes data in this format: session_encode.
Unfortunately, this method doesn't take arguments - it just outputs the encoded version of the current session data. So, he came up with his own encode/decode methods that use the PHP session, extract the serialized string and return it.
voice your opinion now!
serialize data session string unserialize
SitePoint.com: What Happened when we Talked PHP with the Experts
by Chris Cornutt April 15, 2013 @ 09:05:56
On SitePoint.com today they've posted the transcript of a "Talk with the Experts" session they did with Lorna Mitchell (instructor of their recent OOP sessions). The transcript includes questions and answers to those in attendance as well as some good links and advice.
Last Thursday I broke with tradition slightly and ran a Talk with the Experts session in the evening (down under), making it a bit more time-zone friendly for our UK audience. It also meant that I was able to swap my usual coffee for a wine, which probably made the session run a bit more smoothly. The subject was PHP and our expert was Lorna Mitchell, tutor of Object-oriented PHP and co-author of PHP Master: Write Cutting-edge Code.
The transcript starts with a collection of some of the links provided during the discussion and then runs through the entire conversation. There's some good advice in there, especially if you're relatively new to the world of PHP object-oriented programming.
voice your opinion now!
expert lornamitchell oop sitepoint transcript session
PHPMaster.com: 8 Practices to Secure Your Web App
by Chris Cornutt February 04, 2013 @ 12:56:40
PHPMaster.com has posted a new article with some high level security tips and reminders for PHP developers when wanting to help prevent issues with their applications. The article provides eight tips, each with a brief description.
When it comes to application security, in addition to securing your hardware and platform, you also need to write your code securely. This article will explain how to keep your application secure and less vulnerable to hacking.
The good practices they recommend include input data validation, protecting against XSS attacks, preventing SQL injections, protecting session data, proper error handling and protecting included files. There's some good reminders here, but it barely scratches the surface of effectively protecting your application. These tips are the "low hanging fruit" for securing your app, so be aware that there's more things to worry about than just these eight.
voice your opinion now!
secure application tips xss csrf sqlinjection file session error include
PHPRefresh.com: Managing Sessions and State with PHP
by Chris Cornutt January 11, 2013 @ 10:25:15
In this new tutorial on the PHPRefresher.com site, Anand Godar walks you through just about all of the session functionality that comes with PHP and includes some code snippets for explanation.
Due to the fast evolution of Web programming, the stateless nature of the HTTP protocol brought many problems to certain Web applications that required maintaining their state across several HTTP requests. This demanded a rapid development of several mechanisms aimed at tackling this issue through diverse methods. Then a session management emerged as a direct response to the above mentioned problem, and currently this mechanism is being used by PHP developers worldwide, in cases where a Web application needs to keep track of its "state" during the occurrence of different HTTP requests.
The article starts off with the basics of sessions - what they are, how they're handled and created by PHP - and moves into the specific functions and their use. He talks about starting/ending sessions, their IDs, caching, module handling and working directly with the session cookie (if it exists).
voice your opinion now!
session tutorial introduction functions
Ben Ramsey: Writing an Effective Talk Proposal
by Chris Cornutt December 03, 2012 @ 10:25:32
if you've ever considered contributing to a PHP (or any other technology conference) but weren't sure about how to even get started writing up a proposal for a session, you should check out this recent post from Ben Ramsey with a good guide (and some advice experienced speakers could use too).
Earlier today, I was asked "Any tips on how to write a proposal for a major conf?" I've never shared tips on this, and since the calls for proposals for Sunshine PHP and Midwest PHP both end tomorrow, I thought it would be a good idea to share my approach to writing conference proposals. Remember those standard, five-paragraph essays you used to write in high school? Remember how you thought they sucked and wouldn't provide any practical benefit to your life? Well, it turns out they do have some redeeming qualities.
He suggests that this "five paragraph essay" format helps you not only come up with a more fleshed out, full idea but also can provide you with the abstract to submit to the conference (possibly the first paragraph). He mentions the need for a "hook" and finishing off with an opinion that's the basis of the talk. He also has a reminder of a few things - don't talk down, don't use negative language and try not to use absolutes.
voice your opinion now!
talk proposal conference suggestion opinion session
PHPMaster.com: 5 More PHP Security Vulnerabilities
by Chris Cornutt November 13, 2012 @ 14:42:02
On PHPMaster.com there's a continuance of a previous article about security in PHP applications talking about a few more considerations when trying to make things secure.
In a previous article, I talked about some common security vulnerabilities that can affect your PHP web application. But there are other things besides those ten (okay, seven) attacks to think about when you're developing. And so, this article offers a compendium of miscellaneous things that are security related; things you should do, things you shouldn't do, things that other people might try to do, whatever it takes to make an article long enough for my editor to be satisfied with it.
He talks some about the settings that you might need to tweak in your "php.ini" server-side configuration file, some hints on filtering data (like using filter_input) and what to watch out for with error reporting. He also mentions session fixation and the protection of user data and passwords to keep them out of the hands of would-be attackers.
voice your opinion now!
security vulnerability tutorial phpini filterinput session fixation user
|
Community Events
Don't see your event here? Let us know!
|