Thursday, January 29, 2026

How to allow higher MB file uploads by increasing size in server php.ini

1) Check php version using the command:

                            php -v


2) Make sure server is using apache php or php cli by using the below command

                        sudo systemctl status


3) Check if any php-fpm is running. else

            sudo nano  /etc/php/8.4/cli/php.ini


4) Edit php.ini and change these values from 2M to 10 or 20 M

                    upload_max_filesize = 10M 

                    post_max_size = 10M


4. Restart web server:

                    sudo systemctl restart php8.4-fpm

                     sudo systemctl restart apache2

Monday, January 26, 2026

Get Gmail App Password for email notification through laravel app

 

First, you need to create an App Password from your Google Account:

    Go to your Google Account: https://myaccount.google.com/

    Click on "Security" in the left menu

    Enable "2-Step Verification" if not already enabled

    Go back to Security → 2-Step Verification

    Scroll down to "App passwords"

    Select "Mail" and "Other (Custom name)"

    Enter a name like "Laravel App"

    Click "Generate"

    Copy the 16-character password (no spaces)

     

     Update .env file with the following info:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-16-char-app-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="your-email@gmail.com"
MAIL_FROM_NAME="${APP_NAME}"



     

     

     

     

Friday, January 23, 2026

How to change git origin for repo after making a copy of the repo

 1) Locally  run the following commands for the existing repo:

                        git remote -v

This will help us find the current remote origin

2) Set remote origin to the new repo:

                    git remote set-url origin git@gitlab.com:folder/repo.git

3) Locally ensure that it is in the correct branch

                    git checkout import-main

4) if activities were done in a new branch, merge it with the current branch "import main"

                                                  git merge main

5) push the code to the git


                        git push