← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 170
  1. ## When to use a self-signed certificate A self-signed certificate is signed by its own key rather than a trusted CA.

  2. `memory_limit` is the maximum amount of memory a single PHP script is allowed to allocate.

  3. ## About the error The visitor sees `ERR_SSL_PROTOCOL_ERROR` or "SSL handshake failed", and nginx logs an SSL error.

  4. ## About the error Running `php artisan migrate` on a fresh install against older MySQL throws: ```bash SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes ``` It almost always fails on the `user…

  5. An expired certificate takes a site down hard — every visitor sees [your connection is not private](/your-connection-is-not-private).

  6. ## About the error Connecting over SSH fails with: ```bash Permission denied (publickey). ``` The server only accepts public-key authentication, and none of the keys your client presented matched an entry in the account's `authorized_keys`.

  7. ## See what Docker is using Before deleting anything, check where the space has gone: ```bash docker system df ``` This breaks down disk usage by images, containers, local volumes and build cache. ## Prune everything unused at once `docker system prune` r…

  8. ## About the error The full message is: ```bash RuntimeException: No application encryption key has been specified. ``` Laravel uses the `APP_KEY` to encrypt cookies, sessions and anything you pass through the `Crypt` facade.

  9. ## Searching inside files with grep While [find](/find-files-linux-command) locates files by their name or metadata, `grep` searches what's *inside* them.

  10. ## About the error ```bash ERROR 1040 (HY000): Too many connections ``` MySQL allows a fixed number of simultaneous client connections (`max_connections`, default 151).

  11. ## Why the command line is worth it If you write code or touch a server, the terminal is unavoidable, and honestly that's a good thing.

  12. What is an SSH key

    ## How SSH keys work An SSH key comes as a **pair**: a private key and a public key.

  13. ## About the error ```bash fatal: not a git repository (or any of the parent directories): .git ``` Git commands operate on a repository, identified by a `.git` directory.

  14. When a query gets slow, the cause is almost always a missing index.

  15. ## What the AWS CLI is for Clicking through the AWS Console is fine for poking around, but the moment you want to script anything, list buckets quickly, or copy files to S3, the AWS CLI is the tool.

  16. ## Connecting with ssh SSH is how I reach almost every server I work with.

  17. ## About the error Starting a server fails with one of these: ```bash bind() to 0.0.0.0:80 failed (98: Address already in use) # nginx Error: listen EADDRINUSE: address already in use :::3000 # Node [ERROR] Can't start server: Bind on TCP/IP port: Address…

  18. ## About the error ```bash !

  19. Changing the port is not real security on its own — see [optimizing web application and server security](/optimize-web-application-security) for the controls that matter — but it dramatically reduces the volume of drive-by login attempts.

  20. ## About the error The visitor gets a [502 Bad Gateway](/502-bad-gateway-nginx) and the nginx error log explains why: ```bash upstream sent too big header while reading response header from upstream ``` nginx reserves a fixed-size buffer for the response…

  21. MySQL performance tuning is measure-then-change, not copy-pasting a `my.cnf` you found in a forum.

  22. ## About the error ```bash ERROR 1698 (28000): Access denied for user 'root'@'localhost' ``` You're certain the password is correct, yet `mysql -u root -p` is rejected.

  23. ## Working with tar archives `tar` bundles many files and directories into a single archive file, optionally compressed.

  24. ## Open a shell inside a container The most common use of `docker exec` is getting a shell in a running container.

  25. ## Finding files with find When I need to track down a file and don't know exactly where it lives, `find` is the workhorse.

  26. 403 Forbidden in nginx

    ## About error 403 A `403 Forbidden` is returned when nginx successfully locates the request but is not allowed to serve it.

  27. ## About the error You'll see one of these two variants: ```bash SQLSTATE[HY000] [2002] Connection refused SQLSTATE[HY000] [2002] No such file or directory ``` This is different from a [1045 Access denied](/sqlstate-hy000-1045-access-denied-for-user) erro…

  28. ## Why a new script says "Permission denied" You write a script, try to run it, and Linux throws this at you: ```bash $ .

  29. ## About the error You'll see it from almost any program that tries to write: ```bash write error: No space left on device ``` It means the filesystem you're writing to is full.

  30. ## Preview first with a dry run `git clean` permanently deletes files that Git is not tracking.

  31. ## Checkout a tag A tag points at a specific commit, usually a release.

  32. ## Talking to APIs from the terminal When I'm building or debugging an API, `curl` is the first tool I reach for.

  33. ## About the error The full message looks like this: ```bash PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) ``` The number `134217728` is the limit in bytes, in this case 128 MB.

  34. ## Update vs upgrade: the part everyone confuses The single most common mix-up with `apt` is thinking `update` installs new software.

  35. ## About the error In a Laravel application the full message reads something like: ```bash SQLSTATE[HY000] [1045] Access denied for user 'forge'@'localhost' (using password: YES) ``` `using password: YES` means a password was sent but rejected.

  36. Laravel is fast out of the box, but the default development setup leaves a lot on the table.

  37. Compression is one of the cheapest performance wins you can ship.

  38. ## About the error ```bash PHP Fatal error: Maximum execution time of 30 seconds exceeded ``` PHP caps how long a single script may run with the `max_execution_time` setting (default 30 seconds for web requests).

  39. OPcache is one of the biggest speedups available to a PHP app, and it costs you almost nothing to turn on.

  40. ## About error 502 A `502 Bad Gateway` is returned by nginx when it is acting as a reverse proxy and receives an invalid response from the upstream server it forwards requests to.

  41. Caching is the cheapest performance win you have after indexing.

  42. ## When a port is stuck You try to start your dev server and Linux tells you the port is taken.

  43. ## What a CSR contains A Certificate Signing Request bundles the details of the certificate you want — your domain name and organisation info — and your **public** key, all signed by your **private** key.

  44. ## About the error You'll find a line like this in your log, or on screen with debug enabled: ```bash file_put_contents(/var/www/storage/logs/laravel.log): Failed to open stream: Permission denied ``` The path varies, it might be `storage/framework/views`,

  45. ## About the error Unlike most errors, this one is quiet.

  46. If you're not sure what an SSH key is or how it works, start with [what is an SSH key](/what-is-an-ssh-key).

  47. ## About the error ```bash fatal: refusing to merge unrelated histories ``` Introduced in Git 2.9, this is a guard rail.

  48. ## About the error In Laravel the message reads: ```bash SQLSTATE[42S02]: Base table or view not found: 1146 Table 'my_app.users' does not exist ``` The query is valid SQL, but the table it names isn't present in the database you're connected to. ## Why do

  49. ## What curl is `curl` is the Swiss Army knife for talking to anything over a URL from your terminal.

  50. ## Start your services Run from the directory containing your `compose.yaml` (or `docker-compose.yml`): ```bash docker compose up ``` This creates and starts every service defined in the file, and streams their logs to your terminal.