İçeriğe geç
KAMPANYA Kurumsal Web Paketi — $499'dan başlayan fiyatlar Web & Logo Tasarımı · Kurumsal E-posta · LiteSpeed + CloudLinux · Imunify360 Güvenlik · cPanel Yönetim · 3 Gbps DDoS Koruması 00 Gün 00 Saat 00 Dk 00 Sn
AIOR

How to Activate the GMP Extension in DirectAdmin — Preparing XenForo Push

Sektör topluluğu — sorularınız, deneyimleriniz ve duyurularınız için.

How to Activate the GMP Extension in DirectAdmin — Preparing XenForo Push

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
895
Reaction score
2
Points
18
Age
40
Location
Turkey
Website
aior.com
1/3
Thread owner

GMP Uzantısı Neden Gerekli?​

GMP (GNU Multiple Precision Arithmetic Library) büyük tamsayı işlemleri için kullanılan, XenForo ve birçok modern web uygulaması tarafından özellikle push notification altyapısında gerekli kılınan bir PHP uzantısıdır. Web Push Protocol kapsamında VAPID anahtar üretimi ve şifreleme adımları büyük modüler aritmetik gerektirir; bu işlemler GMP olmadan ya çok yavaş çalışır ya da hiç çalışmaz.

DirectAdmin kontrol paneli kullanan sunucularda GMP, CustomBuild aracı üzerinden tek komutla derlenip eklenebilir. Bu rehber AlmaLinux/CloudLinux + DirectAdmin kombinasyonunda XenForo için pratik bir yol gösterir.

Ön Kontroller​

Sunucunuza root kullanıcısı ile SSH bağlantısı kurun. Mevcut PHP sürümünü ve etkin uzantıları doğrulayın:

Code:
php -v
php -m | grep -i gmp

İkinci komut hiçbir çıktı vermiyorsa GMP henüz etkin değildir; eklemek için aşağıdaki adımları takip edin.

CustomBuild ile GMP Etkinleştirme​

DirectAdmin'in CustomBuild dizinine gidin ve GMP'yi yapı yapılandırmasına ekleyin:

Code:
cd /usr/local/directadmin/custombuild
./build set_php gmp yes
./build php_gmp

İkinci komut PHP'yi yeniden derleyerek GMP uzantısını derler ve yükler. İşlem sunucu donanımına bağlı olarak 1-3 dakika sürer. CustomBuild birden fazla PHP sürümü yönetiyorsa varsayılan sürüm için derleme yapar; başka sürümler için aynı işlem ./build php_d komutu sonrası çalıştırılır.

Doğrulama​

İşlem bittikten sonra GMP'nin yüklü olduğunu kontrol edin:

Code:
php -m | grep -i gmp

Çıktıda "gmp" görüyorsanız uzantı başarıyla aktif olmuştur. Multi-PHP setup'da hesabınızın kullandığı sürüm için kontrol etmek üzere /usr/local/php82/bin/php -m | grep gmp gibi spesifik bir path da kullanabilirsiniz.

XenForo'da Push Notification'ı Aktive Etme​

XenForo Admin Panel > Setup > Options > Notifications altında Push Notifications bölümüne gidin. GMP yüklü olmadan bu bölüm devre dışı görünür veya hata verir; doğru derleme sonrası seçenek açılır.

VAPID anahtar çiftini "Generate" butonu ile üretin ve kaydedin. Public key push abonelik istemcilerine gönderilirken private key sunucuda saklı kalır. Kullanıcılar artık bildirim almayı kabul ettiklerinde tarayıcılarına push iletisi alabilir.

Olası Sorunlar​

"Configure: error: gmp.h not found": ./build update çalıştırıp custombuild içeriklerini yenileyin. Derleme tamamlandığı halde uzantı görünmüyor: PHP-FPM servislerini (systemctl restart php-fpm) yeniden başlatın. CloudLinux LVE ortamında her hesabın kendi PHP süreci olduğundan değişikliğin yansıması için cPanel benzeri LVE restart gerekebilir.

Üretim Önerileri​

Push notification trafiği genellikle düşük bant genişlikli ancak yüksek istek hızlıdır. Web sunucunuzun keep-alive ve rate-limiting ayarlarını sandık verisi (queue) ile entegre ederken dikkatlice kurgulayın. AIOR olarak XenForo barındırma müşterilerimize hem GMP gibi gerekli uzantılarda hem de push altyapısı yapılandırmasında destek veriyoruz.


Why GMP Is Required​

The GMP (GNU Multiple Precision Arithmetic Library) PHP extension is needed for big-integer math. Modern web apps — including XenForo's push notification subsystem — rely on it for VAPID key generation and the cryptographic primitives of the Web Push Protocol. Without GMP these operations either run prohibitively slowly or refuse to run at all.

On servers running DirectAdmin, GMP can be enabled in a single command via CustomBuild. This guide covers the practical flow for AlmaLinux/CloudLinux + DirectAdmin running XenForo.

Pre-flight​

SSH into your server as root. Confirm your current PHP version and loaded extensions:

Code:
php -v
php -m | grep -i gmp

If the second command returns nothing, GMP isn't loaded yet — follow the steps below to enable it.

Enabling GMP via CustomBuild​

Switch into the CustomBuild directory and enable GMP in the build configuration:

Code:
cd /usr/local/directadmin/custombuild
./build set_php gmp yes
./build php_gmp

The second command rebuilds PHP and compiles GMP support. Build time is typically 1-3 minutes depending on hardware. If CustomBuild manages multiple PHP versions, it builds for the default version; repeat the same step for other versions you need (e.g. via ./build php_d).

Verification​

After the rebuild, verify GMP is loaded:

Code:
php -m | grep -i gmp

If you see "gmp" in the output, the extension is active. In multi-PHP setups, you can target a specific binary with /usr/local/php82/bin/php -m | grep gmp.

Activating Push Notifications in XenForo​

Head to XenForo Admin Panel > Setup > Options > Notifications and find the Push Notifications section. Before GMP is enabled, this section either appears disabled or throws an error; after the rebuild, the option becomes available.

Generate the VAPID key pair via the "Generate" button and save. The public key is shared with subscribing browser clients; the private key stays on your server. Users who opt in will then receive push messages directly in their browser.

Common Issues​

"Configure: error: gmp.h not found": run ./build update first to refresh CustomBuild sources. Build completes but extension still missing: restart your PHP-FPM service (systemctl restart php-fpm). On CloudLinux LVE every account has its own PHP process, so an LVE-style restart may be required for the change to take effect on individual accounts.

Production Tips​

Push notification traffic is low-bandwidth but bursty (many small requests). Tune your web server's keep-alive and rate-limiting settings carefully when wiring this into a queue or worker pipeline. As AIOR, we help XenForo hosting customers with both the extension setup and the push notification rollout itself.
 

Forum statistics

Threads
891
Messages
898
Members
27
Latest member
AIORAli

Members online

No members online now.

Featured content

AIOR
AIOR TEKNOLOJİ

Tüm ihtiyaçlarınız için Teklif alın

Hosting · Domain · Sunucu · Tasarım · Yazılım · Mühendislik · Sektörel Çözümler

Teklif al

7/24 Destek · Anında yanıt

Back
Top