Install the Alternative PHP Cache (APC)

Hits: 1683  

The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code.

yum install php-pear
yum install php-devel httpd-devel
yum groupinstall ‘Development Tools’
yum groupinstall ‘Development Libraries’
pecl install apc

Install JSON on linux

Hits: 6359  

Have the fun with json….

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.

# yum -y install php-pear

# pecl install json

# vi /etc/php.d/json.ini

# service httpd restart

Trim and remove empty key & value in php array

Hits: 1516  

Here is the PHP function that will remove empty key => value in PHP array…

function array_trim($sv)
$s = 0;
$svn = null;
$c = count($sv);
for($i = 0; $i < $c; $i++)
if($sv[$i] != “”){
$svn[$s++] = trim($sv[$i]);
return $svn;

$svarray = array(‘   ‘, ‘svlinux’, ‘svnlabs’, ‘lamp’, ”);
$svarray = array_trim($svarray);
echo ‘<pre>’;
echo ‘</pre>’;


[0] => svlinux
[1] => svnlabs
[2] => lamp

CakePHP in svnlabs

Hits: 2199  
CakePHP in svnlabs
CakePHP in svnlabs

CakePHP is the rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It follows design patterns like MVC and ORM, CakePHP reduces development costs and helps developers write less code.

Features of CakePHP:
– Extremely Simple.
– Active, Friendly Community.
– Flexible License.
– Clean IP
– Best security, authentication, and session handling.
– Compatible with PHP versions 4 and 5.
– Integrated CRUD for database interaction
– Application scaffolding
– Code generation
– MVC architecture
– Flexible ACL
– Data Sanitization
– Flexible Caching
– Request dispatcher with custom URLs
– Built-in validation.
– Helpers for AJAX, JavaScript, HTML Forms and more
– Email, Cookie, Security, Session, Request Handling etc.
– Localization

CakePHP Console

# ./cake bake all

# ./cake bake model models -app /var/www/cakeproject/app
# ./cake bake controller models -app /var/www/cakeproject/app scaffold admin
# ./cake bake view models -app /var/www/cakeproject/app