← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 170
  1. ## About the error The page returns a 500 and the nginx error log shows: ```bash rewrite or internal redirection cycle while internally redirecting to "/index.php" ``` nginx tried to resolve a request, that resolution pointed at another location, which po…

  2. ## About the error ```bash PHP Warning: Undefined array key "email" in /var/www/app.php on line 12 ``` You read `$array['email']` but that key doesn't exist.

  3. ## About the error ```bash Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379] ``` (Or the phpredis equivalent.)

  4. ## Why rsync instead of scp When I need to move a directory between machines, my first instinct used to be `scp`.

  5. ## About the error ```bash SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction ``` InnoDB uses row-level locks.

  6. ## Why you need the Command Line Tools On a fresh Mac, most developer tooling won't work until you install the Xcode Command Line Tools.

  7. ## About the error ```bash Cannot connect to the Docker daemon at unix:///var/run/docker.sock.

  8. ## About the error ```bash git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. ``` You're connecting to GitHub over SSH, and GitHub rejected the authentication because none of the keys your client offered matches a…

  9. ## Why you want SSH keys Typing a password every time you connect to a server gets old fast, and passwords are the weaker link anyway.

  10. ## The formats, quickly Before converting, it helps to know what you actually have: - **PEM** — Base64 text, starts with `-----BEGIN CERTIFICATE-----`.

  11. ## About the error The message reads: ```bash curl: (60) SSL certificate problem: unable to get local issuer certificate ``` curl connected over TLS but couldn't build a trust chain from the server's certificate up to a root certificate it knows.

  12. You usually clear the Redis cache after a deploy, when stale data is being served, or while debugging locally.

  13. ## Two different IP addresses There's a catch that trips people up: your machine has two kinds of IP address.

  14. When a request is slow, the database is usually to blame, and the database is usually slow because of a missing index or a query written in a way the optimizer can't use.

  15. ## How nginx rate limiting works nginx rate limiting has two parts: you define a **zone** that tracks request rates per client in the `http` block, then **apply** that zone to the locations you want to protect.

  16. ## About the error In the browser console you see something like: ```bash Access to fetch at 'https://api.example.com/users' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the r…

  17. ## What is OpenClaw?

  18. We assume you already have provisioned a Ubuntu server, ready to get going. ## Install PostgreSQL If you haven't already installed PostgreSQL on your server, execute these commands to install it from the official repository: ```bash sudo apt install -y po…

  19. ## Enable OPcache Using the OPcache PHP extension is one of the most significant (and easy) things you can do to improve PHP performance.

  20. ## What is JIT (Just In Time) compiling?

  21. ## Detect bots using nginx First we need to detect if the current visitor's user agent indicates it is a bot.

  22. ## Detecting Googlebot It's very easy to detect the Googlebut using the user agent in nginx, here we use the `map` directive to set the variable `$googlebot` to `yes` or keep it empty depending on the given user agent: ```bash map $http_user_agent $google…

  23. ## How `try_files` works This directive makes use of a fallback system.

  24. ## Deploying with zero downtime Of course you want to deploy your PHP applications without any interruptions for your visitors and users.

  25. The most important step: To get going with this, first [create a full backup of your MySQL database](/backup-mysql-databases-single-file) to make sure you don't loose any data!

  26. To keep everything as secure as possible, it is advised to make use of the best new practices and to let go of old and crumbling technology.

  27. ## The error and problem Sometimes you can encounter this error when executing a `rm .

  28. ## MySQL backup bash script A clear and simple bash script to export all MySQL databases on your server into separate `.SQL` files.

  29. ## About error 413 The error with response code 413 shows up as "Request Entity Too Large" in the error logs of nginx and "Payload Too Large" in the developer console of your browser.

  30. ## First: Optimize deliverability First things first, make sure your [sending email technically correct following these tips](/improving-email-deliverability).

  31. On servers with not a lot of [RAM memory](/how-much-memory-on-ubuntu) (< 1 GB) it's recommended to add some extra swap space in case a server needs a little bit more memory to keep everything going and to prevent it runs out of memory and can't continue p…

  32. ## MySQL backup bash script A clear and simple bash script to export all MySQL databases on your server into a single backup file, excluding databases you don't want to backup.

  33. The easiest way to see all installed, used, free and available RAM memory on your Ubuntu server is using the `free` command, we use the `-h` parameter for human readable sizes: ```bash free -h ``` This outputs for example: ``` total used free shared buff/…

  34. Simple little command to get all the CPU cores active on your machine running on Ubuntu: ```bash nproc --all ``` That's it!

  35. ## Why is that?

  36. ## What is an environment variable Laravel has a `config` folder that contains all configuration files in one place, to change a configuration you could change the value in the code, or change it inside the `.env` when it has an environment variable as the

  37. Out of the box Laravel has a wide variety of events that are fired inside your application by default.

  38. ## How to clear all caches at once To clear all caches at once, Laravel has a specific optimize command that can clear every major cache in the application.

  39. If you want to know which Ubuntu version your server is running, simply execute the following command using the command line: ```bash lsb_release -a ``` If you want to get a more specific output, so you only get one of the lines output by the command abov…

  40. ## What is a Content Security Policy (CSP) A Content Security Policy (CSP) is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks.

  41. ## What are Server Side Includes (SSI) Server Side Includes (SSI) is a simple scripting language used on web servers to include content dynamically in web pages.

  42. ## Developing Composer packages locally During development I regularly need to install Composer packages from a Git repository on my local machine.

  43. ## Root cause of the error We have a lot of servers running on [Digitalocean](https://m.do.co/c/0801ad4bd810) that sends email using an email service provider like Postmark or Mailgun.

  44. Laravel Valet

    ## What is Laravel Valet?

  45. ## Install using Homebrew and PECL If you have PHP installed using [Homebrew](https://brew.sh), you previously could also install PHP extensions using `brew` itself.

  46. Laravel can encrypt cookies automatically using the `\App\Http\Middleware\EncryptCookies::class` middleware.

  47. ## MySQL backup bash script A clear and simple bash script to export all MySQL databases on your server into separate `.SQL` files.

  48. ### Backup existing databases (don't skip) Don't skip this part, it can save you a lot of trouble when something goes wrong!

  49. ## What is CSRF?

  50. When you're sending email from your website or web app, nothing is more frustrating when you get notified by your customers that your emails aren't delivering or ending up in the junk folder.