🚀 Installing Eventmie on LAMPP — Enabling PHP GMP and Fixing Server Issues
🧩 Introduction
Eventmie is a powerful Laravel-based event management system, but setting it up on a LAMPP stack (Linux + Apache + MySQL + PHP) can present a few tricky issues — especially with PHP extensions like GMP, BCMath, or other dependencies.
In this guide, you’ll learn how to install Eventmie properly, enable PHP’s GMP extension, and fix common server-side problems step-by-step. This walkthrough also helps you debug related environment conflicts and Composer extension errors.
⚙️ What Is PHP GMP and Why You Need It
GMP (GNU Multiple Precision) is a PHP extension for performing high-precision arithmetic. Many Laravel packages used by Eventmie (like token or encryption libraries) rely on it.
Without GMP, you might see errors such as:
PHP Fatal error: Uncaught Error: Call to undefined function gmp_init()
To ensure your installation runs smoothly, let’s go through enabling it properly.
🧠 Step 1: Check GMP Status in Your LAMPP PHP
Run the following command to verify if GMP is active in your LAMPP PHP binary:
/opt/lampp/bin/php -m | grep gmp
If it returns gmp, you’re good.
If not, confirm the correct PHP configuration file:
/opt/lampp/bin/php -i | grep "Loaded Configuration File"
You should see:
Loaded Configuration File => /opt/lampp/etc/php.ini
🛠️ Step 2: Enable the GMP Extension in php.ini
Open the correct php.ini file:
sudo nano /opt/lampp/etc/php.ini
Then add or uncomment these lines:
extension_dir="/opt/lampp/lib/php/extensions/no-debug-non-zts-20220829"
extension=gmp
Save and restart LAMPP:
sudo /opt/lampp/lampp restart
Then verify:
/opt/lampp/bin/php -m | grep gmp
🧩 Step 3: Build GMP If It’s Missing
If gmp.so isn’t found, you’ll need to build it manually.
🧱 Install prerequisites:
sudo apt-get update
sudo apt-get install -y build-essential autoconf pkg-config libgmp-dev
🧩 Rebuild GMP for LAMPP’s PHP:
cd /tmp
PHPV=$(/opt/lampp/bin/php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION.".".PHP_RELEASE_VERSION;')
wget https://www.php.net/distributions/php-$PHPV.tar.gz
tar xf php-$PHPV.tar.gz
cd php-$PHPV/ext/gmp
/opt/lampp/bin/phpize
CPPFLAGS="-I/usr/include/x86_64-linux-gnu" LDFLAGS="-L/usr/lib/x86_64-linux-gnu" ./configure --with-php-config=/opt/lampp/bin/php-config --with-gmp
make -j$(nproc)
sudo make install
Once built, add this line to php.ini:
extension=gmp
Restart again:
sudo /opt/lampp/lampp restart
🧾 Step 4: Verify GMP Installation
✅ CLI Check:
/opt/lampp/bin/php -r 'var_dump(function_exists("gmp_init"));'
Expected output:
bool(true)
✅ Apache Check:
Create a file /opt/lampp/htdocs/phpinfo.php:
<?php phpinfo(); ?>
Then open it in your browser:http://localhost/phpinfo.php
Scroll down to confirm GMP appears as an enabled extension.
🧮 Step 5: Fix Common PHP Extension & Composer Issues
During installation, you may see Composer errors like:
moneyphp/money requires ext-bcmath * -> missing from your system
Fix it the same way:
Enable BCMath
In php.ini, ensure:
extension=bcmath
Then restart:
sudo /opt/lampp/lampp restart
Re-run Composer:
composer install
If it succeeds — you’re good to go.
💡 Step 6: Ensure Correct PHP Binary (LAMPP vs System)
LAMPP often installs PHP in /opt/lampp/bin/php, but the system may use /usr/bin/php.
Check which one you’re using:
which php
If it points to /usr/bin/php, switch to LAMPP’s PHP:
echo 'export PATH=/opt/lampp/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Now verify again:
which php
Should return:
/opt/lampp/bin/php
🧰 Step 7: Useful Server & Debugging Commands
| Task | Command |
|---|---|
| Restart LAMPP | sudo /opt/lampp/lampp restart |
| View PHP version | /opt/lampp/bin/php -v |
| Check running MySQL/MariaDB | `ps aux |
| Check open ports | `ss -ltnp |
| View PHP errors | tail -f /opt/lampp/logs/php_error_log |
| Check active VirtualHosts | apachectl -S |
🏗️ Step 8: VirtualHost & SSL Fix (Optional)
If you are hosting Eventmie on a subdomain, create a proper VirtualHost configuration:
HTTP Config (/opt/lampp/etc/extra/httpd-vhosts.conf)
<VirtualHost *:80>
ServerName events.example.com
DocumentRoot "/opt/lampp/htdocs/eventmie/public"
<Directory "/opt/lampp/htdocs/eventmie/public">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
HTTPS Config (/opt/lampp/etc/extra/httpd-ssl.conf)
<VirtualHost *:443>
ServerName events.example.com
DocumentRoot "/opt/lampp/htdocs/eventmie/public"
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/events.example.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/events.example.com/privkey.pem"
</VirtualHost>
Then restart Apache again.
🔍 Step 9: Git & Deployment Tips
If you face a divergent branch warning, choose a merge strategy:
git config pull.rebase false # Merge (default)
git config pull.rebase true # Rebase
git config pull.ff only # Fast-forward only
Run again:
git pull
✅ Final Setup Checklist
| Check | Status |
|---|---|
| ✅ GMP extension enabled | ✔ |
| ✅ BCMath extension enabled | ✔ |
| ✅ Composer installs successfully | ✔ |
| ✅ Apache uses LAMPP PHP | ✔ |
| ✅ VirtualHost configured correctly | ✔ |
| ✅ PHP Info verified | ✔ |
🧠 Key Takeaways
- Always verify the PHP binary used by Apache and CLI before enabling extensions.
- Rebuild GMP using LAMPP’s
phpizeandphp-configfor version compatibility. - Enable BCMath, GMP, and intl early to avoid Composer build issues.
- Use
phpinfo()for confirmation andphp -mfor CLI verification. - Restart LAMPP every time you edit
php.inior install a new module. - Keep your VirtualHost and SSL configuration clean and minimal.
🎯 Conclusion
Installing Eventmie on LAMPP isn’t difficult — it just requires careful handling of PHP’s environment and extensions. Once GMP and other dependencies are configured correctly, Eventmie runs perfectly on your server with secure and stable performance.
If you’re still facing issues after following these steps, recheck the php.ini path, extension directory, and Composer logs — these are usually the main culprits.

I’m Abhishek, a DevOps, SRE, DevSecOps, and Cloud expert with a passion for sharing knowledge and real-world experiences. I’ve had the opportunity to work with Cotocus and continue to contribute to multiple platforms where I share insights across different domains:
-
DevOps School – Tech blogs and tutorials
-
Holiday Landmark – Travel stories and guides
-
Stocks Mantra – Stock market strategies and tips
-
My Medic Plus – Health and fitness guidance
-
TrueReviewNow – Honest product reviews
-
Wizbrand – SEO and digital tools for businesses
I’m also exploring the fascinating world of Quantum Computing.