Demo mode This site is not live. It is currently being tested and developed. Nothing on here represents an offer.
← Exit course WEB-301 Full-Stack Web Development with PHP and Laravel
Course progress, 0 of 17 parts done0%

One workstation, every tool

Set up your full-stack workstation

Build the machine before the code

PHP, Composer, PostgreSQL and the tools of the trade

Pick what fits your PC

Linux Mint 22

  • Native Linux
  • PHP from ondrej/php
  • Code name noble

Windows with WSL 2

  • Ubuntu 26.04 via wsl --install
  • PHP from Ubuntu
  • Work in ~/projects

5432

the port PostgreSQL listens on, where psql, pgAdmin and PHP all connect

psql -U walks_app -d mandlas_walks says Peer authentication failed. What fixes it?

  1. Add -h localhost to connect with the password
  2. Make walks_app a superuser
  3. Reinstall PostgreSQL 18
Show the answer

Without -h, psql uses the socket, where peer authentication needs your Linux user name to match the role. With -h localhost it uses TCP, where the role's password is checked.

From install to evidence

  1. Check php -m lists pdo_pgsql
  2. Create walks_app and mandlas_walks
  3. Start php -S on port 8000
  4. Open db-check.php and read the versions

A phpinfo page never goes on a public server, and a password never goes in code, notes or a repository.

Now watch the video

Watch how WSL 2 runs a real Linux kernel, and why projects belong in the Linux file system.

Watch the video