Increase maximum query size max_allowed_packet for MySQL

Some case we have to change the maximum query size of MySQL using max_allowed_packet Variable. Solution of this thing is the solution for “MySQL server has gone away” Error.

1. Open my.ini or my.cnf file under MySQL part under th WAMP Folder.
2. Search max_allowed_packet variable. If variable not found, just add it.
3. change the value as need. For example, to set 1GB,
   max_allowed_packet=1073741824
  or
   max_allowed_packet=1G
4.Now Restart MySQL Server.

 

MySQL server has gone away

Increase maximum query size max_allowed_packet for MySQL- MySQL has gone away error

For this “MySQL server has gone away” error, above method is the solution.

 

NOTE:
1. Until the MySQL server restarts, set the value globally. For example, to set 1GB
    SET GLOBAL max_allowed_packet=1073741824;
2. Check the current MySQL server maximum query size,

    SHOW VARIABLES LIKE 'max_allowed_packet';

Posted in Wamp | Leave a comment

Step to delete a File or Folder in Python

Sometime we have to delete a file or folder/directory in python. Either its empty or contain anything, please find the following steps,

Step to delete a File or Folder in Python

To remove a file:
os.remove()

To remove an empty directory/folder:
os.rmdir()

To remove a directory and all its contents:
shutil.rmtree()

Posted in General, Python | Leave a comment

[INSTALL_FAILED_ALREADY_EXISTS] Error when install or update APK-package

When you are going to install or re-install or update your APK-Package with your old data keep, please do the following things,

Just use -r flag for that.

For example,

adb install -r myapp.apk

Extra

1) you may use this '-r' flag, even a new APK install.

2) Don’t want to keep or override data of existing apk means, then don’t use this flag.

Posted in Android, Android Application, Update | Leave a comment

cURL error 60: SSL certificate: unable to get local issuer certificate

In Wamp server you will get following error by lot of times (like charge a credit card).

cURL error 60: SSL certificate: unable to get local issuer certificate
cURL error 60: SSL certificate: unable to get local issuer certificate - steptoinstall.com
You may try like restarting the Server, ssl_module enabled, php_curl enabled,.. but sill you get the same cURL problem, Please do following simple things,

Step 1: Download

You can download the cacert.pem file from here.
After download, extract that and get the clean format file.

Step 2. Place the cacert.pem

Please put that cacert.pem file in correct place.

D:\xampp\php\extras\ssl\cacert.pem

Step 3. Edit php.ini file

Open your php.ini file from following location
D:\xampp\php\php.ini
And add line like following,

curl.cainfo = “C:\xampp\php\extras\ssl\cacert.pem”

Step 4. Start Server

Then Start/Restart your webserver.

Now you solved the cURL error 60: SSL certificate: unable to get local issuer certificate Problem.

cURL error 60: SSL certificate: unable to get local issuer certificate

Posted in cURL, Error, local server, Wamp | Leave a comment

Perl module Error: Can’t locate Foo.pm(module) in @INC

When you are going to Install Perl’s module like Foo.pm, datetime.pm, expect.pm, etc., you may get following error,
Can't locate (module) in @INC
Perl module Error Can't locate Foo.pm(module) in @INC - Steptoinstall.com

For this Error,
If you are using CPAN, For new installing module use like following code,

perl -MCPAN -e 'install Chocolate::Belgian'

For UNIX

If you are using ActivePerl, the Perl Package Manager(PPM) is enough. It’s same like CPAN.

Posted in Wamp | Leave a comment