Explore information related to laravel


WordPress error "Failed to open stream" - Fix it Now ?


This article covers methods to resolve WordPress error "Failed to open stream".

Basically, this WordPress error triggers when WordPress is unable to load a file mentioned in website code.


To fix this WordPress error:

1. First of all Login to the Dashboard of the site. At left bar of the page users can see Settings Button. Click on the button Settings. Finally click on the button Permalinks.

2. Make all the corrections to make it 'Failed to Open Stream Error' free. After making the changes Click on the button Save Changes.

Read More



Date Time in Laravel and PHP with Carbon


This article covers how to manage date/time easily in Laravel and PHP with Carbon. Basically, Carbon is a package that helps us to deal with date/time in Laravel and PHP in a much easier and systematic manner.

Working with date and time in PHP is not the easiest or most clear of tasks. We have to deal with strtotime, formatting issues, lots of calculations, and more.


Carbon provides some nice functionality to deal with dates in PHP such as:

1. Dealing with timezones

2. Getting current time easily

3. Converting a datetime into something readable

4. Parse an English phrase into datetime (first day of January 2016)

5. Add and Subtract dates (+ 2 weeks, -6 months)

6. Semantic way of dealing with dates


Carbon is already included in Laravel so there's no need to go and add it with Composer.

Whenever we need to use Carbon, we can import it like so:

<?php

use Carbon\Carbon;

After importing you can do a lot with this great package.

Read More



ModSecurity failed to open the audit log file error


This article will guide you on methods to resolve the error 'ModSecurity failed to open the audit log file' which occur as a result of a missing log files or due to improper permissions.

1. Setting ownership to www-data:www-data and file permissions from 600 to 660 will fix this problem.

2. Ensure that the permissions are properly configured on these files.

Execute the command below:

chmod 0644 /etc/apache2/logs/error_log

chmod 0600 /etc/apache2/logs/modsec_audit.log

The modsec log files are assigned 0600 permissions by default, whereas the error_log is assigned 0644 permissions by default.

3. mkdir permission denied signifies that the user you're running the mkdir as, doesn't have permissions to create new directory in the location you specified. 

You should use ls command on the higher level directory to confirm permissions.

4. The mkdir command by default gives rwx permissions for the current user only. To add read, write, and execute permission for all users, add the -m option with the user 777 when creating a directory.

Read More



Vue js authentication using vue-router


This article will guide you on how to set up Vue.js authentication using vue-router. If we couple Vue.js with vue-router, we can build high-performance applications.

To run a Vue application:

1. Open the package.json file and add the following:

[...]
"scripts": {
    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
    "start": "npm run dev",
    "server": "node server/app",
    "build": "node build/build.js"
  },
[...]

2. We added the server script to help us start up the node server. Now, run the following command to start the server:

npm run server

3. Then create another terminal instance and run the Vue app like this:

npm run dev

This will build all the assets and start the application. You can open the link it shows you to see the application.

Read More



Laravel error 403


This article will guide you on tips to resolve Laravel error 403 which occurs mainly due to bad permissions, improper ownerships and incorrect .htaccess file. 

The 403 Forbidden error is an #HTTP status code which means that accessing the page or resource you were trying to reach is absolutely forbidden for some reason. 

To fix #WordPress #403 #forbidden #error:

1. Create a Backup. Most of the time, you are not responsible for the errors that occur on your WordPress website hosting server.

2. Check . htaccess File.

3. Deactivate All Plugins. Login to your WordPress admin dashboard and navigate to Plugins - Installed Plugins.

Read More



Configure and Use Microsoft SQL Server Management Studio


This article will guide you on how to setup SQL server management studio. SQL Server Management Studio is a free #Windows #application to configure, manage, and administer Microsoft SQL Server (#MSSQL). 

SSMS is available only as a 32-bit application for Windows.

To get SQL Server Management Studio:

1. Go To Start Menu>Programs>Microsoft SQL Server Tools 18> Microsoft #SSMS 18. 

2. Below 'Connect to Server' screen will appear. 

3. Server Name defaults to the name selected while installing MS SQL server. 

4. Server type: This is an option to select one out of four available MS SQL services option.

To Enable remote connections to your SQL Server:

i. Open #SQL Server Management Studio.

ii. Right-click your server's name and select Properties.

iii. Tick the checkbox Allow remote connections to this server.

iv. Select OK.

Read More



Imagick php install


This article will guide you on how to install #Imagick #PHP #extension. Imagick is the most popular PHP extension which helps to create edit convert, and/or manipulates images. ImageMagick is a free and open source, feature-rich, text-based and cross-platform image manipulation tool used to create, edit, compose, or convert bitmap images. It runs on #Linux, #Windows, #Mac Os X, iOS, Android OS, and many other operating systems.

To use Imagick with PHP in your server, you can easily achieve it with the following #command:

sudo apt-get install php-imagick.

php -m | grep imagick.

sudo service apache2 restart.

Read More



Laravel Contact Form to Send Emails with SendGrid


This article will guide you on steps to follow to create a #Laravel contact form to send #emails with the help of SendGrid.

#SendGrid manages all of the technical details, from scaling the infrastructure to #ISP outreach and reputation monitoring to whitelist services and real time analytics.

To integrate with SendGrid's #SMTP #API:

1. Create an API Key with at least "Mail" permissions.

2. Set the server #host in your email client or application to smtp.sendgrid.net.

3. Set your username to apikey.

4. Set your password to the API key generated in step 1.

5. Set the #port to 587.

Read More



Data Loss through Partial loss of keys in Azure Cache for Redis


This article will guide you on the different methods to fix data loss in #Azure #Cache for #Redis which can happen due to a number of reasons like Redis instance failure, incorrect #database selection, and so on. 

Redis server saves all its data to HDD from time to time, thus providing some level of persistence. It saves data in one of the following cases: automatically from time to time. when you manually call BGSAVE command.

Redis does not use #tables, and stores data in #memory, and is not limited by the hard #disk I / O speed when reading and writing #data, so the speed is extremely fast.

Read More



How to monitor Azure Cache for Redis


This article will guide you on how to monitor Azure Cache for Redis. Azure Cache for #Redis uses #Azure Monitor to provide several options for monitoring #cache instances. These include view metrics, pin #metrics charts to the Startboard, customize the date and time range of monitoring charts, and so on.

To Use Azure Redis Cache:

1. Log into Azure port, go to #Databases >> Redis Cache.

2. Create a news Redis Cache.

3. Get the Access Keys to connect with the newly created Redis Cache.

4. Install the #StackExchange. 

5. You can add Redis Cache connection string into the appsettings.

Read More



Deploying Kohana PHP application on Debian


This article will guide you on how to deploy Kohana on #Debian. Kohana offers powerful event handling, multiple session drivers, simple database abstraction using #SQL helpers, and libraries that transparently handle external APIs. Its generous BSD license lets developers use and modify the framework to build commercial applications.

The #AppDynamics platform provides full, code-level visibility into the performance of your PHP application built on the Kohana framework. With rapid installation and the most scalable #architecture in the industry, AppDynamics solutions help you deploy your #applications more quickly and with more confidence.

Read More



Deploy Laravel using Nginx on Ubuntu


This guide will help to set up Laravel with #Nginx on #Ubuntu 16.04. Laravel is the most popular, free, and open-source #PHP #framework in the world, known for its expressive and elegant syntax.
To move laravel project from localhost to production server, do:
1. Zip your #laravel app files.
2. Export your app's #database then set it up on your server.
3. After you have uploaded your laravel app files, open the . env file found on the root.
4. That's it!, now check your live #site.

Read More



Set Up Laravel Nginx and MySQL with Docker Compose


This article will guide you on how to set up #Laravel, #Nginx, and #MySQL with #Docker Compose. When using a #LEMP application stack, for example, with PHP, Nginx, MySQL and the Laravel framework, Docker can significantly streamline the setup process.
Docker Compose has further simplified the development process by allowing developers to define their #infrastructure, including application services, #networks, and volumes, in a single file. Docker Compose offers an efficient alternative to running multiple docker container create and docker container run #commands.

Read More



Working with Database Configuration in Laravel


This article will guide you on steps to set up #development and testing databases for Laravel by using database migrations and #seeders. Database migration means moving your data from one platform to another. To run #laravel migrations, first you have to configure your #database connection, and then you use Artisan, Laravel's #command line interface, to install the migrations table and run, revert, create. This command causes #Artisan to create a special table in your database to keep track of what #migrations have already been executed.

Read More



How To Connect to a Redis Database Different ways to do it


This article will guide you on the steps to connect to a #Redis #database using different commands like redis-cli using #commands.

Running redis-cli followed by a command name and its arguments will send this command to the Redis instance running on localhost at port 6379. You can change the host and #port used by redis-cli, just try the --help option to check the usage information.

Read More



Troubleshoot Redis errors


This article will guide you on the steps to #troubleshoot #Redis #error by using several #commands that help us to troubleshoot and #debug its issues.

Read More



How to optimize azure cache for redis


Factors such as memory pressure, high CPU usage, Bandwidth limitations, and Server loads on server side can result in poor performance of Azure Cache for Redis and the Server in general.

Read More



Setup redis on centos 7


The Process of Installing Redis and Setting its Firewall on Centos 7.

Read More



Solve SQL server error 3729


Recently, we have seen rising cases of SQL related issues which our Server Experts have provided support in solving them.

Read More




For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com






Focus on your business, not your servers.

Click Here to Learn More