> For the complete documentation index, see [llms.txt](https://pixelstrap.gitbook.io/go-cab/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pixelstrap.gitbook.io/go-cab/laravel-configuration/localhost-configuration.md).

# Localhost Configuration

### **Local Server Installation**

{% hint style="danger" %}
Note:

1. Establishing a local server is a mandatory prerequisite for the successful installation of  GoCab. Ensure that you configure the local server before initiating the installation process.
2. If you are Installing Application on the internet server you no need to worry about server like XAMPP or MAMPP, ensure your server must support with PHP & MySQL
   {% endhint %}

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/> for Windows/Mac, For Mac OS installation steps are [here](https://courses.cs.washington.edu/courses/cse154/19sp/resources/assets/servers/mamptutorial_mac.html) and For Windows installation steps are [here](https://courses.cs.washington.edu/courses/cse154/19su/resources/assets/servers/mamptutorial_pc.html)

XAMPP Server you can download it from <https://www.apachefriends.org/download.html> 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**

{% hint style="warning" %}
Note: You can skip these steps if XAMPP is already installed on your
{% endhint %}

Click [here](https://dev.to/honorezemagho/xampp-installation-step-by-step-on-macos-4hi2) 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.

<figure><img src="/files/8p6ob7eKll6qHs4FmGGu" alt=""><figcaption></figcaption></figure>

3. In the application folder, open the etc folder and find the my.cnf file where MySQL settings are stored.
4. Right-click in the **my.cnf** file to open it in a Text Editor.<br>

<figure><img src="/files/S359lWH54On8yJhI6owj" alt=""><figcaption></figcaption></figure>

5. In the Text Editor, find max\_allowed\_packet and increase 100M, to allow a maximum data size 100M sent to the MySQL server.

<figure><img src="/files/gek5hb2X3ciG6ItJUze3" alt=""><figcaption></figcaption></figure>

6. Similarly, find **wait\_timeout** to extend the MySQL connection idle time to 3000

<figure><img src="/files/nYreyWbgpo0PhHnn83MO" alt=""><figcaption></figcaption></figure>

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

**XAMPP Configuration In Windows**

**Install XAMPP**

{% hint style="warning" %}
Note: You can skip these steps if XAMPP is already installed on your system.
{% endhint %}

Click [here](https://ngonyoku.medium.com/how-to-install-xampp-a47f0787d9b6#:~:text=Choose%20the%20directory%2FFolder%20that,Click%20Next.) 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.

<figure><img src="/files/h8CJHqgeCwVtYIo9zEwy" alt=""><figcaption></figcaption></figure>

5. 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.

<figure><img src="/files/CHFZohS904aSQFOATBez" alt=""><figcaption></figcaption></figure>

6. Click **config** in the MySQL section.
7. Open the **my.ini** file. This file controls MySQL database.
8. 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

<figure><img src="/files/qQWDIqP6TfIdsme7mTBZ" alt=""><figcaption></figcaption></figure>

9. 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)**

{% hint style="warning" %}
Note: You can skip these steps if LAMP is already installed on your system.
{% endhint %}

Click [here](https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-22-04) 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:

```html
sudo systemctl restart apache2
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pixelstrap.gitbook.io/go-cab/laravel-configuration/localhost-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
