How to turn off MySQL strict mode?

Follow the below mentioned instructions to turn off or to disable the MySQL strict mode. This can be fixed in one of two ways

Method 1. 

Make the following changes in the “my.ini/my.cnf”:

1. Look for the following line , this line will set MySQL strict mode
sql-mode =  "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

2. To disable MySQL strict mode, you can change the above line as follow:
sql_mode="TRADITIONAL,NO_AUTO_CREATE_USER,,NO_ENGINE_SUBSTITUTION"

3. Restart the MySQL service.

Method 2 :
You may be able to run an SQL query within your database management tool such as phpMyAdmin which can normally be found from your web hosting control panel:

SET @@global.sql_mode= '';

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

List all loaded extensions in PHP

Hey we can easily get names of all modules compiled and loaded in the PHP using PHP’s built-in function called  get_loaded_extensions().  This function returns the names of all the modules compiled and loaded in the PHP interpreter.


<?php

print_r(get_loaded_extensions());

?>


Increase The Default Maximum File Upload Size In PHP

If you have a website which allows users to upload their own images then you will need to change the default maximum files size upload.
The PHP default for all file uploads is 2MB, so the server will error if you try uploading a file more than 2MB. This can be a problem if you want users to upload pictures as most pictures now are going to be far more than 2MB.
The idea of putting the file size at a low limit is to help the server save bandwidth, which you will need if you are on a shared hosting account. But if you want to change this you will need access to the PHP.ini file.

PHP.ini

Go to your PHP.ini file and change the parameters upload_max_filesize and post_max_size.
file_uploads = On
upload_max_filesize = 10M //needs to be in {x}M format
post_max_size = 10M
As these changes are being done in the PHP.ini file you will need to restart apache for these changes to come into affect.
Remember that changing the file upload limit will be decided by your hosting company. If you have an upload limit on your account then make sure you don't upload too many images.