Flash cards
Why does a full-stack developer in this course work in Linux?
Show the answer
The servers that run PHP applications are Linux, so developing on Linux gives the same case-sensitive file names, permissions, paths and packages as the server.
What does wsl --install do, and which Linux does it install in November 2026?
Show the answer
It turns on the Windows features WSL needs and installs Ubuntu, which is Ubuntu 26.04 LTS. Run it in PowerShell as administrator, then restart.
On WSL, where do your projects belong, and why not /mnt/c?
Show the answer
In ~/projects in the Linux file system. Under /mnt/c every file operation crosses a slow bridge, permissions misbehave and file watchers miss changes.
Linux Mint 22 is called zena. Which code name do Ubuntu-based repositories need?
Hint: Look in /etc/os-release.
Show the answer
noble, the code name of Ubuntu 24.04, which Mint 22 is built on. It is in UBUNTU_CODENAME in /etc/os-release.
Where does PHP 8.5 come from on Mint 22, and on Ubuntu 26.04?
Show the answer
On Mint 22, from the ondrej/php PPA, because Ubuntu 24.04 has PHP 8.3. On Ubuntu 26.04, from Ubuntu's own packages.
Why install php8.5-cli rather than the php8.5 package?
Show the answer
The php8.5 and php packages also install the Apache web server, which a development machine does not need.
Which commands show PHP's version, its extensions and its settings files?
Show the answer
php -v for the version, php -m for the loaded extensions, and php --ini for php.ini and the conf.d files.
How do you know the Composer installer you downloaded is genuine?
Show the answer
Compare its SHA-384 hash with the checksum Composer publishes at composer.github.io/installer.sig, and run it only if they match.
Why install postgresql-18 rather than postgresql?
Show the answer
The plain postgresql package means the newest version, which from the PGDG repository will be PostgreSQL 19. Naming 18 keeps the course's version.
What does psql do when you give no role or database?
Show the answer
It connects as a role named like your Linux user, to a database of the same name, through the Unix socket.
Name the psql meta-commands to list databases, connect, list tables, list roles and quit.
Show the answer
\l, \c followed by a database name, \dt, \du and \q.
Why must walks_app own mandlas_walks?
Show the answer
Since PostgreSQL 15, ordinary roles cannot create tables in another role's database by default. The owner can, so the application gets what it needs and no more.
Peer compared with scram-sha-256 authentication?
Show the answer
Peer, for socket connections, allows a role only if your Linux user has the same name. scram-sha-256, for TCP to localhost, checks the role's password.
Write the PDO DSN for the Walk Office's database.
Show the answer
It starts pgsql: and lists host=localhost, port=5432 and dbname=mandlas_walks, separated by semicolons. The user walks_app and the password are given separately.
What is ~/.pgpass, and what does it need?
Show the answer
A file of host:port:database:user:password lines that libpq reads for psql and PHP. It is ignored unless its permissions are 600.
What does php -S localhost:8000 -t stack-check do?
Show the answer
Starts PHP's development server on port 8000, serving the stack-check folder. It is for development only, never a public network.
What does could not find driver mean?
Show the answer
PHP's pdo_pgsql extension is not loaded. Install php8.5-pgsql, check php -m, and restart the server.
psql --version says 18. Does that prove the server is PostgreSQL 18?
Show the answer
No. It is the client's version. Run SHOW server_version in psql, or check pg_lsclusters, for the server.