16 Nov 2016
##Installing Mysql client for php in ubuntu
sudo apt-get update
sudo apt-get install mysql-client php5-mysql
After executing these commands you have to restart your server which executes the php .If you are using apache restart apache or else if you are using nginx and php-fpm restart php-fpm.
20 Sep 2014
1). Installation of AWS-php sdk
There is a autoload file that’s capable of autoloading all of the classes in any of the libraries of aws. To use it, just add the following line to your code’s bootstrap process.
require '/path/to/aws-autoloader.php';
2). Starting an Ec2 Instance
<?php
require '/path/to/aws-autoloader.php' ;
use Aws\Ec2\Ec2Client ;
//Initiating
$client = Ec2Client :: factory ( array (
'key' => 'YOUR_AWS_ACCESS_KEY_ID' ,
'secret' => 'YOUR_AWS_SECRET_ACCESS_KEY' ,
// OR: 'profile' => 'my_profile',
'region' => 'YOUR_EC2_INSTANCE_REGION'
));
//Starting
$result = $client -> startInstances ( array (
// InstanceId is required
'InstanceIds' => array ( 'YOUR_INSTANCE_ID' )
));
?>
3). Stopping an Ec2 Instance
<?php
require '/path/to/aws-autoloader.php' ;
use Aws\Ec2\Ec2Client ;
//Initiating
$client = Ec2Client :: factory ( array (
'key' => 'YOUR_AWS_ACCESS_KEY_ID' ,
'secret' => 'YOUR_AWS_SECRET_ACCESS_KEY' ,
// OR: 'profile' => 'my_profile',
'region' => 'YOUR_EC2_INSTANCE_REGION'
));
//Stopping
$result = $client -> stopInstances ( array (
// InstanceIds is required
'InstanceIds' => array ( 'YOUR_INSTANCE_ID' )
));
?>
12 May 2014
Was shocked when adblock showed that it blocked ads on flipkart.What ads on flipkart turned off adblock and was surprised to see this