Installation 1. Installing MySQL 5 sudo apt-get install mysql-server mysql-client 2. Installing Apache2 sudo apt-get install apache2 3. Installing PHP5 sudo apt-get install php5 libapache2-mod-php5 sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl sudo apt-get install php5-xcache 4. Restart Apache sudo /etc/init.d/apache2

Sometimes you need to convert a json string to CSV in PHP. For example we want to get the names Norrmalm and Liljeholmen (cities names at Sweden) from the following json string: ‘{“Norrmalm”:”502″,”Liljeholmen”:”491″}’; Here is the simplest solution: $jsonStr='{“Norrmalm”:”502″,”Liljeholmen”:”491″}’; $csv = str_replace(array(‘[‘,’]’), ”, json_encode(array_keys(json_decode($jsonStr, true)))) echo $csv; It will print out : “Norrmalm”,”Liljeholmen” How it

When you create PHPUnit tests for your models in Yii using netbeans you may encounter this problem PHP Fatal error: Class ‘CActiveRecord’ not found.. The easiest solution is to include the following at the top of the model class, for example if the class is User then your code should look like $yii=’/opt/lampp/htdocs/yii/framework/yii.php’; require_once($yii); class

In my previous post I demonstrated how to install Yii Rights extension easily and quickly. We commented out the code for checking superuser given below. Now to address this issue simply edit file /modules/rights/components/RAuthorizer.php and comment out the lines near line no 304 and 305. //if( $superusers===array() ) // throw new CHttpException(403, Rights::t(‘core’, ‘There must

When you make the user login to your website via a social network like facebook and the user is directed by CHybridAuth to the social network (facebook). Then the user has two choices to either allow or cancel the access to your app. If the user happens to cancel the access then the class Endpoint