Monday, January 18, 2021

phpLiteAdmin : No option visible to create / rename / delete database

If you have installed phpLiteAdmin in your Apache but you are unable to see the options to create / rename / delete database. Here is the solution for you.

Solution :

Your php code of  phpLiteAdmin does not have sufficient permission to show these options. You need to change the owner of the folder phpLiteAdmin.

If you have installed phpLiteAdmin in CentOS, your httpd user is apache, change the owner of the folder.

chown -R apache:apache phpLiteAdmin
If you have installed phpLiteAdmin in Ubuntu, your apache user is www-data, change the owner of the folder.
chown -R www-data:www-data phpLiteAdmin

If you have installed phpLiteAdmin in Lampp/Xampp, your apache user is daemon, change the owner of the folder.

chown -R daemon:daemon phpLiteAdmin

Now open again phpLiteAdmin in the browser. You should be able to see all options.

You can also try with 777 permission to the folder phpLiteAdmin but this is not a good practice to give full permissions to a folder of Document Root.

AWS S3 Copy Error - Connection was closed before we received a valid response from endpoint URL

 aws s3 cp error :


Error : upload failed: ./file.txt to s3://bucketname/file.txt Connection was closed before we received a valid response from endpoint URL: "https://bucketname.s3.amazonaws.com/file.txt"
Solution :

You are getting this error because you did not configure your aws bucket region in your ec2 instance. 

I did not get this error every time. When my bucket was in Mumbai region (ap-south-1), I did not need to configure bucket region in my ec2, I got this error when one of my bucket was in North California (us-west-1) region but it is a good practice if you configure your bucket region always.

Configure aws with region.

aws configure

It will ask for access key and secret key. If you have then you can enter, if you do not have like you attached the role with your ec2 instance, then you can skip it by simply pressing return key.

Now it will ask 'Default region name'. This is the attribute for that you are configuring aws. Check your bucket's region and enter here.

Example : If your bucket is in North California then your region will be us-west-1.

Skip the 'Default output format' and try to copy again using `aws s3 cp` command.

You should not get the same error again.