Sending Email with attachments in Laravel 5.5 using and PHP & JQuery

Introduction: Hello Dear Reader,In this post, I am going to demonstrate detailed steps of how to send email to user’s email id with the files that were submitted by the…

Read more »

How to run php artisan queue:listen in background on Ubuntu or Linux machine

Steps:1. Login to ubuntu machine using putty or any other ssh client2. Run command: sudo -s3. Run command: cd /opt/lamp/htdocs/<Laravel project directory name>4. Run command: sudo vi start-laravel-project-name-queue.sh5. Click “i”…

Read more »

Laravel 5.5 php artisan migrate error in Ubuntu: SQLSTATE[HY000] [2002] Connection refused

How I got this error?Ans: I was running php artisan migrate command in /opt/lampp/htdocs/project_dir What was the error? ubuntu@ip-ip_addr:/opt/lampp/htdocs/project_dir$ php artisan migrateIn Connection.php line 664: SQLSTATE[HY000] [2002] Connection refused (SQL:…

Read more »

Ubuntu or Linux Error: Unable to access XAMPP MySQL from /opt/lampp/bin/mysql

Here’s the complete article on the solution with baby steps:How to link php from XAMPP installation to use php command from user or any other directory in Ubuntu or Linux

Read more »

How to link MySQL from XAMPP (/opt/lampp/bin) to use mysql command from any directory in Ubuntu or Linux

Assumption: I assume that you have already installed XAMPP in your Ubuntu OR Linux machine.If not, then you may follow this link to do so: https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/ and https://www.devopsschool.com/blog/how-to-link-php-from-xampp-installation-to-use-php-command-from-user-or-any-other-directory-in-ubuntu-or-linux/ NOTE: I also…

Read more »

Ubuntu or Linux error: Error: EACCES: permission denied, mkdir ‘/opt/lampp/htdocs/node_modules/node-sass/vendor’

How I got this error:I got this error while running command: npm install in one of my project directory located at /opt/lamoo/htdocs What was the Error: root@ip-ip-address:/opt/lampp/htdocs/[projectName]# npm install ]…

Read more »

How to install latest version of nodejs in Ubuntu or Linux

Steps:1. Login to Ubuntu or Linux machine using ssh client like putty 2. Run command: sudo -s3. Run command: sudo apt-get install curl4. Run command: curl -sL https://deb.nodesource.com/setup_12.x | sudo…

Read more »

How to setup SSH keys on Ubuntu/ Linux

Introduction:If you want to clone a repository from gitlab, github or bitbucket in your Ubuntu machine then you may need to setup SSH Keys in ubuntu and add that key…

Read more »

How to install composer in Ubuntu or Linux machine

To install Composer on your Ubuntu or Linux system, perform the following steps: 1. Check if you have PHP installed and configured properly. If not then please follow this arcticle…

Read more »

How to link php from XAMPP installation to use php command from user or any other directory in Ubuntu or Linux

Assumption:I assume that you have already installed XAMPP in your Ubuntu OR Linux machine.If not, then you may follow this link to do so: https://www.devopsschool.com/blog/installing-xampp-7-4-xxx-on-ubuntu/ How I got the error:After…

Read more »

How to keep putty SSH connections alive

Introduction: This article describes how to keep SSH connections alive. If you experience problems when using SSH, such as dropped or unresponsive connections, you may need to adjust some settings…

Read more »

npm error on Linux: Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x

Environment:Linux 64-bitLaravel 5.5Node.js 12.x How I got this error:I made some changes in one of the js file of my project. Hence, I needed to rebuild the JS part of…

Read more »

Git Error: How do I remove files saying “old mode 100644 new mode 100755” from unstaged changes in Git?

How I got this error:I had to take a pull in my project directoryI tried to take the pull by running the below commandscd <My Project Directory>sudo git pull The…

Read more »

PHP Laravel Error: Trying to access array offset on value of type null

Environment:Laravel Version: 5.5PHP Version: 7.4.0 Error stack trace:Message: Trying to access array offset on value of type null Sample code that gave me error:$filterConfig = $request->get(‘filterConfig’, null);$showAll = $filterConfig[‘show’][‘all’] ===…

Read more »

How to clear laravel.log in PHP Laravel

laravel.log is a file that collects all the Log messages by default into it Sometimes you need to truncate this log file for troubleshooting the application Command to be used…

Read more »

Ubuntu, Linux, Unix vi error: swap file .swp already exists

Command that gave me error:vi .env or vi <any file name that starts with a “.” that means it’s a hidden file> Error: Swap file .env.swp already existsor Swap file…

Read more »

How to configure Laravel 5.5 with Bootstrap 4

Bootstrap 3 to bootstrap 4.3.1 upgrade in Laravel 5.5 Note: Laravel 5.5 uses bootstrap 3 by default Steps involved in the upgrade Open gitbash in the home directory of the…

Read more »