Get an AI summary of this page
Prerequisites
XAMPP/MAMP/LAMP Server
A XAMPP/MAMP/LAMP server is necessary for running PHP Laravel on a local server, If XAMPP/MAMP/LAMP server not installed on your computer, refer to the following links for installation guides on various operating systems.
To run application you need to download web server.
- For Mac systems download MAMPP or XAMPP Server.
- For Windows systems download MAMPP or XAMPP Server.
- For Linux systems download LAMPP or XAMPP Server.
MAMPP Server you can download it from https://www.mamp.info/en/mamp/ for Windows/Mac.
XAMPP Server you can download it from https://www.apachefriends.org/download.html for Windows/Linux/Mac
PHP Version
PHP Version >= 8.2
To Verify the php version on server installed or not, enter the following command into your terminal or command line.
php -v
If you haven't installed it, make sure to install it first.
PHP Extensions
- gd PHP Extension
- ctype PHP Extension
- curl PHP Extension
- fileinfo PHP Extension
- json PHP Extension
- mbstring PHP Extension
- OpenSSL PHP Extension
- pcre PHP Extension
- pdo PHP Extension
- tokenizer PHP Extension
- pdo_mysql PHP Extension
- pdo_sqlite PHP Extension
- xml PHP Extension
- zip PHP Extension
- grpc PHP Extension (Required for Firebase connectivity)
Info: To enable these extensions, edit your php.ini file and uncomment the respective lines. Restart your server after making changes.
Composer
Composer is essential for Laravel applications, If Composer is not installed on your computer, refer to the following links for installation guides on various operating systems.
For Fixit Admin
- Node.js Version = 20.x.x
- Node.js is essential for designing Laravel applications. If Node.js is not installed on your computer, follow the steps below to install it.
Install Node.js and npm
- Visit the official Node.js website https://nodejs.org/en and Download the recommended version for your operating system.
- Open a command prompt or terminal and Run the following commands to verify the installation
node -v
Common Issues & Solutions
Issue: Laravel throws errors related to missing PHP extensions (e.g.,
gd, mbstring, curl).
Solution: Enable the required PHP extensions in your php.ini file.
For example:
extension=gd
extension=mbstring
extension=curl
Restart your server after making changes. For more details, refer to
Install or enable PHP Extension Ubuntu:
click here.
Install or enable PHP Extension XAMPP:
click here
Install or enable PHP Extension MAMP:
click here
Issue: Composer installation fails due to missing dependencies or incorrect PHP configuration.
Solution: Ensure your system meets the requirements for Composer. If the installation fails, refer to the official Composer documentation or this How install composer?.
Issue: Errors occur due to an incompatible Node.js version (e.g., version < 20.x.x).
Solution: Use a Node.js version manager like nvm to install and switch to Node.js version 20.x.x. Run the following commands:
nvm install 20
nvm use 20
For more help, refer to this StackOverflow thread.
Issue: Errors occur due to incorrect or missing configuration in the
.env file.
Solution: Ensure your .env file is properly configured with the
correct database credentials, app URL, and other settings. Example:
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database
DB_USERNAME=root
DB_PASSWORD=
For more details, refer to the Laravel Configuration Documentation.
Issue: Running npm install fails due to network issues or permission
errors.
Solution: Clear the npm cache and try again:
npm cache clean --force
npm install
If the issue persists, refer to Troubleshooting npm install Errors.