Follow Me:

Friday 28 October 2016

PHP sessions default timeout


We are settind the Session Time out in Php as mentioned as below:

session.gc_maxlifetime = 1440
(1440 seconds = 24 minutes)

Friday 7 August 2015

Differences between InnoDB and MyISAM 

   In MySQL, major difference of InnoDB and  MyISAM are given below. MyIsam is supporting the table level locking in database. But InnoDB is supporting the row level locking in the database. MyIsam is supporting the FULL TEXT SEARCH functionality and InnoDB also supporting the FULL TEXT SEARCH after MySQL Version of 5.6.4.

 

 MyISAM Engine : 

1. It supporting Table-level Locking
2. It supports FULLTEXT SEARCH functionality
3. It is designed for need of speed
4. It is not supporting foreign key constraints
5. It is storing the data as its tables, data and indexes in diskspace using separate three different files formats. (table.FRM, table.MYD, table.MYI)
6. It is not supporting transactions [ We can't COMMIT and ROLLBACK the comments ]
7. It recovering data by using Requires full repair/rebuild of indexes/tables
8. It is storing the data as no ordering format

INNODB Engine : 

1. It is supporting Row-level Locking
2. After MySQL Version 5.6.4 ,Supporting FULL TEXT SEARCH functionality
3. It is designed for maximum performance when processing high volume of data
4. It is supporting foreign key constraints
5. It is supporting transactions [ We can COMMIT and ROLLBACK the comments ]
6. It stores data as tables and indexes in a tablespace
7. It is Auto recovery from crash via replay of logs
8. It is stored the data row as primary key order


Tuesday 21 July 2015

CwebP Unsupported Color Conversion Request:

    When i am creating WebP images, that time triggering the error as "cwebp unsupported color conversion request, Error Could not be process file".

 Error: 

    $imageName  = "ilikekaraikudi.jpg";
    $webpimgName  = "ilikekaraikudi.webp";
 
   cwebp -q 0 ".$imageName." -o ".$webpimgName.
   Unsupported color conversion request
   Error! Could not process file ilikekaraikudi.jpg
     
   Error! Cannot read input picture 

 

  Solution:

    we can try converting to RBG color-space via ImageMagick (convert) or any other image-editor tool.

    exec("convert -colorspace RGB ".$imageName." ".$webpimgName . " ");

Related Posts:

   1. how to create webp image in php
   2. fedex shipping integration
   3. 413 “Request Entity Too Large” error with uploading a file

   4. How to blink text in html for various browsers
   5. Difference between cookies and sessions in php

 

Thursday 16 July 2015

WebP:

    WebP is an image file type that was created in 2010 and is created by Google. This image format provides lossless and lossy compression to images on the server. Big social media websites are using WebP image process are Google, Facebook and EBay.
 
  WebP images natively supporting to the following browsers are Chrome, Opera, Opera Mini, Android Browser and Chrome for Android browsers only. It is not supported any other browsers like Firefox, IE and Safari,etc.

 


    WebP lossless image files are 26% smaller than PNGs.
    WebP lossy images files are 25-34% smaller than JPEG images at equivalent SSIM index.
    WebP supports lossless transparency (also known as alpha channel) with just 22% more bytes.

WebP images creating process in php:

you can use following php commands,to get the webp images

$imgName     =   "codingslovers.jpg";
$webPName   =   "codingslovers.webp";

Syntax:

 cwebp [quality qualitypercentage] [source image] -o [destination]

exec("cwebp -q 0 ".$imgName." -o ".$webPName." ");

Another Method:

exec("convert -colorspace RGB ".$imgName." ".$webPName . " ");

Exec : executes the given command in php

http://php.net/manual/en/function.exec.php

Advantages of WebP:

Smaller file size
Different compression algorithm
Smoother color gradations
Alpha channel mask

Disadvantages of WebP:

Weak browser support
Artifacting has plastic appearance
Poor exporting interface

Browserwise WebP Performance: