Before you begin, ensure you have the following installed on your system:
- Visual Studio Code (VS Code)
- Laragon
- PHP (included with Laragon)
- VS Code PHP extension (e.g., PHP Intelephense or PHP Debug)
-
Download and Install Laragon:
- Go to Laragon's official website and download the latest version.
- Install and launch Laragon.
-
Start Laragon Services:
- Open Laragon and click Start All to run Apache and MySQL.
- Ensure Laragon is running by visiting
http://localhost
in your browser.
-
Install PHP Extension:
- Open VS Code.
- Go to Extensions (Ctrl + Shift + X).
- Search for "PHP Intelephense" and install it.
-
Set the PHP Executable Path:
- Open VS Code Settings (Ctrl + ,).
- Search for
php.executablePath
. - Set the value to Laragon's PHP path, typically:
(Replace
"php.executablePath": "C:/laragon/bin/php/php-8.x.x-Win/php.exe"
8.x.x
with your installed PHP version.)
- Open your PHP project folder in VS Code.
- Open the Terminal (Ctrl + `).
- Run the following command:
php -S localhost:8000
- Open your browser and go to
http://localhost:8000/your_script.php
.
- Place your PHP files inside
C:/laragon/www/
. - Open Laragon and click Menu > Apache > Reload.
- Open your browser and access the script at
http://localhost/your_script.php
.
If your activities are stored in folders like Activity #1
, Activity #2
, etc.:
- Move them to
C:/laragon/www/
. - Open your browser and navigate to
http://localhost/Activity1/
(replace with the correct folder name).
If you successfully run the Bootstrap Activity Compilation, you should see an output similar to this:
- If you get an error, make sure Laragon is running.
- Check the PHP version by running:
php -v
- Ensure your script files have the
.php
extension.