Top 5 security flaws within websites and how to prevent them

So we’re now into 2014 and websites are starting to become way more advanced by implementing new technologies such as AJAX, fancy web forms and even web sockets. However, little do webmaster’s realise that they’re opening a space for huge security flaws within their websites / web applications / web services for malicious hackers to take advantage of.

Read more at http://joel-murphy.com/top-5-security-flaws-within-websites-and-how-to-prevent-them/

 

Fatal error: Class ‘DOMDocument’ not found

I was moving a WP from a host to another, and using the WordPress Importer while loading the XML of the export “Fatal error: Class ‘DOMDocument’ not found“.

We have two solutions

  • Install the php-xml package on your server.
  • Replace in file parsers.php in plugin wordpress-importer at class WXR_Parser_SimpleXML

Replace in file parsers.php in plugin wordpress-importer at Class WXR_Parser_SimpleXML

Change

$dom = new DOMDocument;
$old_value = null;
if ( function_exists( 'libxml_disable_entity_loader' ) ) {
$old_value = libxml_disable_entity_loader( true );
}
$success = $dom->loadXML( file_get_contents( $file ) );
if ( ! is_null( $old_value ) ) {
libxml_disable_entity_loader( $old_value );
}if ( ! $success || isset( $dom->doctype ) ) {
return new WP_Error( 'SimpleXML_parse_error', __( 'There was an error when reading this WXR file', 'wordpress-importer' ), libxml_get_errors() );
}$xml = simplexml_import_dom( $dom );
unset( $dom );

For:

$xml = simplexml_load_file($file);

Displaying charts in tabs

I have two amcharts on different tabs. A stock chart to be place on #chartdiv and a pie chart to be placed on #chartdivpie. This is how I solved my problem.

My custom css – to overwrite bootstrap –

#chartdivpie { width: 1138px; height: 500px; }
.tab-content .tab-pane {
   position: absolute;
   top: -9999px;
   left: -9999px;
   display: inline;
}
.tab-content .tab-pane.active {
    position: inherit !important;
}

JQuery call

$('#myTab a').click(function (e) {
      e.preventDefault()
        $(this).tab('show');
        chart.invalidateSize();
        chart.write('chartdiv');
    })

 

See the discussion here http://stackoverflow.com/questions/10013408/amcharts-doesnt-display-chart-for-initially-hidden-divs/22289182#22289182

DigitalOcean – redesigned

DigitalOcean’s home page has been redesigned!

Its always to keep a historic of some of the  webpages of services that lead the way and some how mark us. DigitalOcean is one of them….
As MediaTemple… who remember that mediatemple.com and mediatemple.net were different on their business target? I do!

Actually I have 3 droplets @ DigitalOcean.
F*cking faster that those VPSs with CPanels, etc etc etc.

Continue reading DigitalOcean – redesigned

Getty Images – 35 million photos for free

We can now use 35 million photos for free on our non-commercial works.

01_Search_Results

The world’s largest photo library, Getty Images, is to allow the bulk of its 35 million images to be reproduced online for free. The move, which Getty says is to help adjust to “the new realities” of social media, is aimed primarily for those publishing on social media feeds and blogs.

Read more at http://www.independent.ie/tablet/technology/getty-images-embraces-the-future-with-plans-for-free-use-of-photographs-30070479.html

02_ADP

03_Modal