globeLocalhost Configuration

Local Server Installation

triangle-exclamation

To run application you need to download web server.

  1. For Mac systems download MAMPP or XAMPP Server.

  2. For Windows systems download MAMPP or XAMPP Server.

  3. For Linux systems download LAMPP or XAMPP Server.

MAMPP Server you can download it from https://www.mamp.info/en/mamp/arrow-up-right for Windows/Mac, For Mac OS installation steps are herearrow-up-right and For Windows installation steps are herearrow-up-right

XAMPP Server you can download it from https://www.apachefriends.org/download.htmlarrow-up-right for Windows/Linux/Mac

Note: For demonstration we are using here XAMPP Server configuration for Mac/Window and for Linux we are using here LAMP Server. In all the servers have MySQL extensions. No need to download third party MySQL.

XAMPP Configuration In Mac OS

Install XAMPP

circle-exclamation

Click herearrow-up-right to Install XAMPP for Mac OS.

After installing XAMPP, here are a few steps you might want to consider.

  1. Open the XAMPP control panel to manage localhost server.

  2. Click Open Application Folder in the XAMPP control panel.

  1. In the application folder, open the etc folder and find the my.cnf file where MySQL settings are stored.

  2. Right-click in the my.cnf file to open it in a Text Editor.

  1. In the Text Editor, find max_allowed_packet and increase 100M, to allow a maximum data size 100M sent to the MySQL server.

  1. Similarly, find wait_timeout to extend the MySQL connection idle time to 3000

  1. Save the modified my.cnf file, then go back to the XAMPP control panel and restart the server.

XAMPP Configuration In Windows

Install XAMPP

circle-exclamation

Click herearrow-up-right to Install XAMPP for Windows OS.

After installing XAMPP, here are a few steps you might want to consider.

  1. Open the XAMPP Control Panel.

  2. Click config in the Apache section. This allows you to manage apache server.

  3. In the Apache section, choose "Select PHP (php.ini)."

  4. In the php.ini file, find max_execution_time and increase value to max_execution_time=3000 for extended execution time.

  1. Find the extension=gd in php.ini. Remove the semicolon (;) at the beginning of the line to enable the GD extension. This is necessary for image processing in PHP.

  1. Click config in the MySQL section.

  2. Open the my.ini file. This file controls MySQL database.

  3. In the my.ini file, find max_allowed_packet. Increase its value 100M to handle larger data packets. For example, set it to max_allowed_packet=100M for bigger data transfers

  1. Once you've made all these changes in both Apache and MySQL, you'll need to restart XAMPP to apply the changes.

LAMP Configuration In Ubuntu

Install LAMP (Linux, Apache, MySQL, PHP)

circle-exclamation

Click herearrow-up-right to Install LAMP for Ubuntu OS.

After installing LAMP, here are a few steps you might want to consider.

  1. Use a text editor to open the PHP configuration file. By default, you'll find it at /etc/php/8.2/fpm/php.ini.

  2. Inside the php.ini file, find the following keys and increase their values as shown below:

    • max_execution_time = 30 to 3000

    • max_input_time = 30 to 3000

    • memory_limit = 16M to 100M

    • post_max_size=2M to 100M

    • upload_max_filesize = 2M to 100M

  3. Save the php.ini file after making these changes.

  4. Restart the Apache server using the following command:

Last updated