Questions

Find answers to frequently asked development questions. For information about Better Stack products, explore our docs.

/
Popular searches:

Where can I find error log files for PHP?

PHP stores error logs in /var/log/apache2 if PHP is an apache2 module. Shared hosts are often storing log files in your root directory /log subdirectory. If you are using cPanel...

Questions · Better Stack ·  Updated on October 5, 2023

Where are PostgreSQL logs stored?

PostgreSQL stores logs in the log files. Depending on your system, you can find the logs at the following locations: Ubuntu On Ubuntu and Ubuntu-like systems, the PostgreSQL log is stored in the /v...

Questions · Better Stack ·  Updated on October 5, 2023

Where are PHP logs stored?

PHP stores error logs in /var/log/apache2 if PHP is an apache2 module. Shared hosts are often storing log files in your root directory /log subdirectory. If you are using cPanel...

Questions · Better Stack ·  Updated on November 23, 2022

Where are MySQL logs stored?

The official distributions for individual UNIX/Linux platforms are typically script-based, with little or no interactive configuration during installation. Some installation packages (including Yum...

Questions · Better Stack ·  Updated on November 23, 2022

MySQL/Writing file error (Errcode 28)

If you have received an MySQL error with the error code and don’t know what the code means, you can use the perror command to display the text explanation of the error code. perror 28 Output: OS er...

Questions · Better Stack ·  Updated on November 23, 2022

Log all queries in MySQL

In MySQL, it is possible to log all queries that were executed. You can view them as a table or file. Output query history into a table To output executed queries into a table, run the following My...

Questions · Better Stack ·  Updated on November 23, 2022

How to show the last queries executed on MySQL?

In MySQL, it is possible to show the last queries that were executed. You can view them as a table or file. Output query history into a table To output executed queries into a table, run the follow...

Questions · Better Stack ·  Updated on October 5, 2023

How to log PostgreSQL queries?

If you would like to log all PostgreSQL queries into a file, you can do that by changing few settings int the configuration file Open the data/postgresql.conf file and change the following settings...

Questions · Better Stack ·  Updated on November 23, 2022

How to Get the Query Executed in Laravel 5

By default, the query log is disabled in Laravel 5: Don’t worry, you can enable the query log by running the following: // enable query log DB::enableQueryLog(); Then you can display the log like t...

Questions · Better Stack ·  Updated on November 23, 2022

How to enable MySQL Query Log?

MySQL query log stores the history of executed queries. This history is stored in a log file. On busy servers, this file ca grow very large. To enable the query log, put the following line into&nbs...

Questions · Better Stack ·  Updated on November 23, 2022

How to do error logging in CodeIgniter (PHP)

Code igniter has logging capabilities built-in. Make sure you do the following: Make your /application/logs folder writable In /application/config/config.php set the following: ...

Questions · Better Stack ·  Updated on November 23, 2022

Warning: Remote Host Identification Has Changed

What does it mean You may wonder what WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED error means. SSH connection uses keys, files stored on the computer, to authenticate the server and the client....

Questions · Better Stack ·  Updated on October 11, 2023

How to Start Docker Containers Automatically After a Reboot?

Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker restarts. Restart policies ensure that linked containers are started...

Docker
Questions · Better Stack ·  Updated on October 11, 2023

How to ping Docker container from another container by name?

The feather of accessing or pinging containers from other containers using their name rather than their IP address comes out of the box with docker networks. For this, you will need two (or more) c...

Docker
Questions · Better Stack ·  Updated on November 9, 2023

How to pass environment variables to a Docker container?

It is always a good practice to separate the app from its configuration. It is not a good idea to have a database login credential defined as variables in the code of the application. This is why w...

Docker
Questions · Better Stack ·  Updated on October 11, 2023

How to fix docker: Got permission denied while trying to connect to the Docker daemon socket

This error may appear when running docker commands and it is caused by insufficient privilages. Solution To resolve the problem, you need to do the following: Create a docker group sudo groupadd do...

Docker
Questions · Better Stack ·  Updated on November 9, 2023

How do I disable ipv6 on Ubuntu 20.04

To disable IPv6 on your Ubuntu 20.04 system, open the /etc/sysctl.conf file in your favorite text editor and put the following lines at the end of the file: net.ipv6.conf.all.disableipv6 = 1 net.ip...

Questions · Better Stack ·  Updated on October 11, 2023

Error Permission denied (publickey) when I try to ssh

This error appears when trying to SSH into a server. The publickey in the brackets after the error message is misleading. One reason might be wrong configuration in sshd_config file and the second ...

Questions · Better Stack ·  Updated on October 11, 2023

Copy SSH key to clipboard

An SSH key is usually stored in the form of a file. To copy an SSH key to your clipboard, you can use one of the following options: Option 1 - Copy from terminal The first option is to print the ke...

Questions · Better Stack ·  Updated on October 11, 2023

502 bad gateway Nginx

If you are getting the 502 bad gateway error when accessing a Nginx server, here are a few solutions: Check if Nginx is running To check if Nginx is running run the following command: systemctl sta...

Nginx
Questions · Better Stack ·  Updated on November 9, 2023

Where does node.js store logs?

Node.js doesn’t store logs in the file. Logs are printed into the STDERR and output is printed into the STDOUT. However, you can change that when you runt the javascript code from the shell and red...

Logging
Node.js
Questions · Better Stack ·  Updated on November 16, 2022

Where does Linux store my syslog?

Linux has a special directory for storing logs. This directory contains collected logs from the operating system itself, services and other applications running on the system. The actual location d...

Linux
Logging
Questions · Better Stack ·  Updated on October 11, 2023

Where can I find the IIS log?

You can find your IIS log file in the following directory: %SystemDrive%\inetpub\logs\LogFiles If the directory doesn’t exist in your system, try looking in the following directory %SystemDrive%\Wi...

Questions · Better Stack ·  Updated on November 9, 2023

Where can I find the error logs of NGINX, using FastCGI and Django?

By default Nginx stores its error logs in the /var/log/nginx/error.log file and access logs in the /var/log/nginx/access.log. To change the location of the log files, configure the following direct...

Django
Nginx
Questions · Better Stack ·  Updated on October 11, 2023

Understanding access log columns in Nginx

The NGINX logs the activities of all the visitors to your site in the access logs. Here you can find which files are accessed, how NGINX responded to a request, what browser a client is using, IP a...

Questions · Better Stack ·  Updated on October 11, 2023

Reading syslog output on a Mac

Same as Linux, MacOS saves system logs into a syslog file. This location of the syslog is /var/log/system.log. On newer MacOS versions, you will find the log at /private/var/log/system.log You can ...

Logging
Questions · Better Stack ·  Updated on October 11, 2023

Log.INFO vs. Log.DEBUG

When logging, logged messages are differentiated by their importance. In most logging frameworks we differentiate the following levels of importance: DEBUG - Lowest level. Fine-grained statements c...

Logging
Questions · Better Stack ·  Updated on October 11, 2023

Log analyzer tools for IIS web server logs

IIS webserver logs each and every access into a log file. To better understand the data from the log, little help is needed in the form of a log analyzer. Log analyzer is a software that allows you...

Questions · Better Stack ·  Updated on November 6, 2023

How to view syslog in Ubuntu?

Linux has a special directory for storing logs. This directory contains collected logs from the operating system itself, services and other applications running on the system. The actual location d...

Ubuntu
Questions · Better Stack ·  Updated on October 11, 2023

How to view log output using docker-compose run?

You can start Docker compose in detached mode and attach yourself to the logs of all containers later. If you're done watching logs you can detach yourself from the logs output witho...

Docker
Questions · Better Stack ·  Updated on October 11, 2023

How to access Redis log file?

As many other services, Redis stores its log in the special log file. The location of the Redis log depends on the type of the installation. With a default apt-get installation on Ubuntu ...

Logging
Questions · Better Stack ·  Updated on October 11, 2023

Where Are Docker Images Stored on the Host Machine?

If you want to have a quick look at where is Docker storing your Docker images, you can use the docker info command: docker info Output: ... Storage Driver: Docker Root Dir: /var/lib/docker ... ...

Docker
Questions · Better Stack ·  Updated on October 5, 2023

Should I Use Vagrant or Docker for Creating an Isolated Environment?

This depends on what exactly you want to do. The short answer would be that if you want to manage virtual machines, you want to use Vagrant. If you want to build and run an application environment,...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Run a Docker Image as a Container?

Docker runs processes in isolated containers. A container is a process that runs on a host. The host may be local or remote. When an operator executes docker run, the container process that ru...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Remove Old and Unused Docker Images?

Since the docker version 1.13 you can use the docker prune command to remove all dangling data such as containers stopped, volumes without containers, and images with no containers. To remove dangl...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Remove Old Docker Containers?

You may have found docker rm command to remove a docker container. However, this works only for a single container and it would be very painful to run this command for every non-running docker cont...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How Do I Pass Environment Variables to Docker Containers?

It is always a good practice to separate the app from its configuration. It is not a good idea to have a database login credential defined as variables in the code of the application. This is why w...

Docker
Questions · Better Stack ·  Updated on October 5, 2023

How to Mount a Host Directory in a Docker Container?

If you want to mound a host directory in a Docker container, you have to main ways to do that: Using the ADD command: The simplest way is to use the dockers ADD command as shown below: ADD . /path/...

Docker
Questions · Better Stack ·  Updated on October 5, 2023

How to List Containers in Docker?

Running containers If you want to list all the running docker containers, you can use the docker container ls command, which takes the following form: docker container ls This command is valid on a...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

Solved: The Input Device Is Not a TTY

If you try to execute a command inside the docker using the Jenkins or jus try to use the -it option in the docker run command, you will get the following error: the input device is not a TTY How t...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Include Files outside of Docker’s Build Context?

You may have ended up in a situation where you wanted to include a file from outside of Docker's build context using the ADD command, but the ADD command requires the path to be within the build co...

Docker
Questions · Better Stack ·  Updated on October 5, 2023

How to Remove a Docker Image?

To remove one or more specific images, you can use the docker rmi command. How to list all images If you want to list all the images before removing any, you can do they by running the following co...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How To Deal With Persistent Storage (e.g. Databases) In Docker?

The best way to deal with persistent data storage (such as a database) in Docker is to use Docker’s volume API (for docker 1.9.0 or newer) or use data-only containers for older versions of Docker. ...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How Do I Get into a Docker Container’s Shell?

If you want to explore containers file system it simply wan to get an access to containers shell, you can use one of the following options Using the docker exec command Docker version 1.3 or newer ...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Execute Multiple Commands in Docker-Compose?

It is possible to define and run multiple commands in the docker-compose.yml file. To execute multiple commands using Docker-Compose, structure the file in the following way: ... services: app: ...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

Docker How to Change Repository Name or Rename Image?

Docker image Docker image name and tag are just an alias to a docker image id that looks similar to this d583c3ac45fd. If you want to change the name, run the following command: docker image tag ol...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Get a Docker Container’s Ip Address from the Host?

By default, the container is assigned an IP address for every Docker network it connects to. And each network is created with a default subnet mask, using it as a pool, later on, to give away the I...

Docker
Questions · Better Stack ·  Updated on March 16, 2023

How to Force Docker to Clean Build an Image?

When executing docker pull or docker run command, the daemon first checks for a similar image in the local machine by comparing the digests of the image. If it finds a match, the daemon simply crea...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Fix Docker Permission Denied Issue?

If you are struggling with the Docker permission denied error, we have prepared a quick fix for you. Step 1 - Create a docker group The first step is you create a docker group if you haven’t done i...

Docker
Questions · Better Stack ·  Updated on August 1, 2022

How to Explore Docker Container’s File System?

If you want to explore the Docker container’s file system, you can use on of the following methods. Using the docker exec command Docker version 1.3 or newer supports the docker exec command. This ...

Docker
Questions · Better Stack ·  Updated on February 4, 2023

Thank you to everyone who
makes this possible!

Here is to all the fantastic people that are contributing and sharing their amazing projects: Thank you!