Skip to content

Chapter 2 of 38

Environment Setup

Configure XAMPP, LAMP, WAMP, PHP CLI, extensions, and development settings.

32 minutes 10 quick checksBy Subha Prasad
Lesson 2 of 38Course navigation

Lesson content

Read, practise, then check your understanding

XAMPP is a cross-platform local bundle, LAMP targets Linux, and WAMP targets Windows. Containers or separate services can better match production. Development and production configuration must remain distinct.

Practical example

<?php
echo PHP_VERSION, PHP_EOL;
echo php_ini_loaded_file(), PHP_EOL;

Verify with php -v, php -m, and php --ini. The built-in php -S 127.0.0.1:8000 -t public server is local-only. Display errors locally, log them in production, install only required extensions, and keep configuration, vendor internals, and uploads outside the public document root.

Knowledge check

Answer every question correctly to complete this chapter.

Which statement best describes XAMPP?
Which PHP term matches this description: A cross-platform Apache, MariaDB, PHP, and Perl development bundle.
Which statement best describes LAMP?
Which PHP term matches this description: A Linux, Apache, MySQL/MariaDB, and PHP stack.
Which statement best describes WAMP?
Which PHP term matches this description: A Windows, Apache, MySQL/MariaDB, and PHP stack.
Which statement best describes php.ini?
Which PHP term matches this description: The primary PHP runtime configuration file.
Which statement best describes development server?
Which PHP term matches this description: PHP's local-only built-in server started with php -S.

0 of 10 checks passed

Your progress is saved on this device.

Environment Setup | PHP Lesson | Subha Prasad