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

Sameer Borate's Blog:
Checking your site for malicious changes
Aug 09, 2011 @ 15:04:25

Sameer Borate, in the wake of having security issues with his site, has posted a hint you could use to help detect when something has changed in important files in your application by checking their hash.

Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code [...] was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site. It has now been removed and to prevent any such changes to the .htaccess file in the future, I’ve written a small php script that compares the hash (SHA1) of the two major files that usually get compromised and compare them to the one originally stored.

It's not a preventative measure by any means, but it can help you keep track of if something's changed. Several issues have popped up in the major blogging engines that allow for changes to be made directly to files. These changes result in the sha hash to be different and can be used to trigger a security alert. His sample code shows a basic call to mail an alert, but it could be as complex as you'd like (possibly even logging to a database or the like).

tagged: malicious change sha1 hash sha1file check alert security

Link:

Conor Mac Aoidh's Blog:
OS X: Audio Alerts for PHP Errors
Jun 23, 2010 @ 14:14:13

In a new post to his blog today Conor Mac Aoidh talks about a way he's developed to get audio alerts whenever PHP errors pop up in your scripts using the swatch tool.

Kae posted today about tackling this problem under Linux, but I’ve found that it’s quite a different task under OS X.

It also uses some additional Perl modules (like Date::Calc and Date::Manip) to set up swatch. From there it's just a matter of adding a few lines to a configuration file to watch for the errors and sound the "bell". A few bash scripts will need to be added to correctly start the service too.

tagged: audio alert error swatch perl bash tutorial

Link:

Ivo Jansch's Blog:
Mixins in PHP
Aug 25, 2006 @ 13:02:33

In his latest post today, Ivo Jansch talks about a concpt from Ruby that he likes and wanted to try to implment in PHP - mixins.

Mixins are a way of 'mixing in' functionality of other classes. A kind of 'multiple inheritance' like approach, only without actual inheritance. It is similar to interfaces, but interfaces only tell you that an object must implement certain methods, whereas mixins also provide an implementation.

To help clear it up a bit he links to two articles on the topic. He gives some examples, though, of how it all works by creating a mixin class (Alertable) and the wy to apply it (in the Hello class). The key between the two is the Object class he's created. It allows the two other classes to work with each other without the need for cumbersome includes or passing around objects. All methods are magically available to the Hello object.

Of course, it's not a perfect implementation because PHP just can't do some things, but he includes a few of these things to watch out for in using this method.

tagged: mixin ruby php5 class alert multiple inheritance mixin ruby php5 class alert multiple inheritance

Link:

Ivo Jansch's Blog:
Mixins in PHP
Aug 25, 2006 @ 13:02:33

In his latest post today, Ivo Jansch talks about a concpt from Ruby that he likes and wanted to try to implment in PHP - mixins.

Mixins are a way of 'mixing in' functionality of other classes. A kind of 'multiple inheritance' like approach, only without actual inheritance. It is similar to interfaces, but interfaces only tell you that an object must implement certain methods, whereas mixins also provide an implementation.

To help clear it up a bit he links to two articles on the topic. He gives some examples, though, of how it all works by creating a mixin class (Alertable) and the wy to apply it (in the Hello class). The key between the two is the Object class he's created. It allows the two other classes to work with each other without the need for cumbersome includes or passing around objects. All methods are magically available to the Hello object.

Of course, it's not a perfect implementation because PHP just can't do some things, but he includes a few of these things to watch out for in using this method.

tagged: mixin ruby php5 class alert multiple inheritance mixin ruby php5 class alert multiple inheritance

Link:

Jim Plush's Blog:
The End of alert() - MyBic 0.6.2 AJAX Released
Apr 05, 2006 @ 12:06:46

Jim Plush has release the latest version of his My-BIC Ajax/PHP framework today - version 0.6.2 - which sees the end of alerts() for debugging.

First, he notes that My-BIC has its own SourceForge project and can be found here. The current site will still be kept up to date as well.

Secondly, the bigger change - the removal of alerts() for the debugging messages in applications. They've been replaced by a list of items with expandable labels. Here's an example of this new feature.

He makes the suggestion for a possible use of this new tool too - remote debugging by having a user/customer see the debug information and give you the results.

tagged: my-bix ajax framework end alert 0.6.2 my-bix ajax framework end alert 0.6.2

Link:

Jim Plush's Blog:
The End of alert() - MyBic 0.6.2 AJAX Released
Apr 05, 2006 @ 12:06:46

Jim Plush has release the latest version of his My-BIC Ajax/PHP framework today - version 0.6.2 - which sees the end of alerts() for debugging.

First, he notes that My-BIC has its own SourceForge project and can be found here. The current site will still be kept up to date as well.

Secondly, the bigger change - the removal of alerts() for the debugging messages in applications. They've been replaced by a list of items with expandable labels. Here's an example of this new feature.

He makes the suggestion for a possible use of this new tool too - remote debugging by having a user/customer see the debug information and give you the results.

tagged: my-bix ajax framework end alert 0.6.2 my-bix ajax framework end alert 0.6.2

Link:


Trending Topics: