Aşağıda, CloudLinux + DirectAdmin üzerinde PHP 7.3 altında Phalcon 3.4.5'i kaynaktan kurmak ve etkinleştirmek için adım adım rehber bulunmaktadır. CloudLinux varsayılan olarak Phalcon 3.4.5'i sağlamadığı için, kendi .so dosyamızı derleyip CloudLinux PHP Selector üzerinden etkinleştireceğiz. Son olarak, eklentinin belirli bir kullanıcı (örneğin sikayetler) için nasıl etkinleştirileceğini göstereceğiz; farklı kullanıcıların farklı modüllere ihtiyacı olduğunda gereklidir.
1. CloudLinux ile yüklü PHP 7.3 (örneğin alt-php73)
2. alt-php73 için devel paketini kurun (henüz kuruluysa yok)
Code:
yum install alt-php73-devel
3. Sistemde geliştirme araçlarına (gcc, make) sahip olun
Code:
yum groupinstall "Development Tools"
4. Phalcon 3.4.5'i İndirin ve Derleyin
Bir build dizinine gidin:
Code:
cd /usr/local/src
5. Phalcon 3.4.5 repo'sunu klonlayın
Code:
git clone -b v3.4.5 --depth=1 https://github.com/phalcon/cphalcon.git
6. İlgili alt dizine girin
(Phalcon 3.x için sıklıkla build/php7/64bits):
Code:
cd cphalcon/build/php7/64bits
7. CloudLinux'un alt-php7.3 phpize'ını kullanın
Code:
/opt/alt/php73/usr/bin/phpize
8. Doğru php-config'i işaret ederek configure
Code:
./configure --with-php-config=/opt/alt/php73/usr/bin/php-config
9. Derleyin
Code:
make
10. Oluşan .so'yu alt-php73 modules dizinine kopyalayın
Code:
cp -rp modules/*.so /opt/alt/php73/usr/lib64/php/modules/phalcon.so
11. INI Dosyasını Oluşturun
CloudLinux, özel eklenti config dosyalarını şuraya koymayı önerir:
Code:
/opt/alt/php73/etc/php.d.all/
Oraya phalcon.ini oluşturun (veya düzenleyin):
Code:
nano /opt/alt/php73/etc/php.d.all/phalcon.ini
Code:
extension=phalcon.so
12. Domain'in alt-php73 Kullandığından Emin Olun
Domain'iniz (örneğin sikayetlerim.com) gerçekten alt-php73'te değilse eklentiyi görmez. DirectAdmin'de:- Domain Setup'a (veya kullanıcı kontrol panelindeki "PHP Selector"a) gidin.
- O domain için PHP 7.3 (alt-php73) seçin.
- AddHandler … php82 içeren bir .htaccess varsa kaldırın veya php73'e değiştirin.
13. En önemli adım — Belirli Bir Kullanıcı İçin Phalcon'u Etkinleştirin
Global etkinleştirmiyorsanız veya seçici şekilde belirli kullanıcılar için etkinleştirmek istiyorsanız:
Code:
selectorctl -u KULLANICIADI -v 7.3 -e phalcon
Code:
selectorctl -u sikayetler -v 7.3 -e phalcon
Code:
selectorctl -u sikayetler -v 7.3 -g | grep phalcon
14. Final Kontrol: phpinfo()
Kullanıcının document root'unda bir phpinfo.php oluşturun:
Code:
<?php
phpinfo();
?>
15. Tarayıcıda yükleyin
Doğrulayın:
- PHP Version 7.3.x ... alt-php73.
- Phalcon eklenti listesinde görünür.
phpinfo()'da Phalcon 3.4.5 görüyorsanız tamamdır!
Below is a step-by-step guide for installing Phalcon 3.4.5 from source and activating it under CloudLinux + DirectAdmin on PHP 7.3. Because CloudLinux does not ship Phalcon 3.4.5 by default, we'll compile our own .so and then enable it via CloudLinux PHP Selector. Finally, we'll show how to enable the extension specifically for a user (e.g., sikayetler), which is sometimes necessary when different users need different modules.
1. Have PHP 7.3 installed via CloudLinux (e.g., alt-php73)
2. Install the devel package for alt-php73 if not already installed
Code:
yum install alt-php73-devel
3. Have development tools (e.g., gcc, make) on the system
Code:
yum groupinstall "Development Tools"
4. Download and Compile Phalcon 3.4.5
Go to a build directory:
Code:
cd /usr/local/src
5. Clone the Phalcon 3.4.5 repo
Code:
git clone -b v3.4.5 --depth=1 https://github.com/phalcon/cphalcon.git
6. Enter the relevant subdirectory
(often build/php7/64bits for Phalcon 3.x):
Code:
cd cphalcon/build/php7/64bits
7. Use CloudLinux's alt-php7.3 phpize
Code:
/opt/alt/php73/usr/bin/phpize
8. Configure pointing to the correct php-config
Code:
./configure --with-php-config=/opt/alt/php73/usr/bin/php-config
9. Compile
Code:
make
10. Copy the resulting .so to the alt-php73 modules directory
Code:
cp -rp modules/*.so /opt/alt/php73/usr/lib64/php/modules/phalcon.so
11. Create the INI File
CloudLinux recommends placing custom extension config files in:
Code:
/opt/alt/php73/etc/php.d.all/
So create (or edit) the phalcon.ini there:
Code:
nano /opt/alt/php73/etc/php.d.all/phalcon.ini
Code:
extension=phalcon.so
12. Make Sure the Domain Uses alt-php73
If your domain (e.g., sikayetlerim.com) is not truly on alt-php73, it won't see the extension. In DirectAdmin:- Go to Domain Setup (or "PHP Selector" in the user's control panel).
- Select PHP 7.3 (alt-php73) for that domain.
- If there's a .htaccess with AddHandler … php82, remove it or change to php73.
13. The most important step — Activate Phalcon for a Specific User
If you don't enable it globally, or you want to selectively enable it for certain users:
Code:
selectorctl -u USERNAME -v 7.3 -e phalcon
Code:
selectorctl -u sikayetler -v 7.3 -e phalcon
Code:
selectorctl -u sikayetler -v 7.3 -g | grep phalcon
14. Final Check: phpinfo()
Create a phpinfo.php in the user's document root:
Code:
<?php
phpinfo();
?>
15. Load it in a browser
Confirm:
- PHP Version 7.3.x ... alt-php73.
- Phalcon shows up under the extension list.
If you see Phalcon 3.4.5 in phpinfo(), you're all set!
Last edited: