Phalcon PHP on cPanel
Some hosts comes by default with Phalcon Frameworks or lets you enable optionally. A list of hosts that has Phalcon by default can be found here.
Most cPanel shared hosts allows you to change php version, edit php.ini and add extensions. This should enable you to add phalcon.so.
If none of these options are available, ask your hosting provider if is possible to enable Phalcon, otherwise your only option is to switch your hosting.
Installation on cPanel
Login to cPanel
Copy the compatible phalcon.so in your cPanel account on a path outside public_html
Add phalcon.so to php.ini:
Manual installation on cPanel
If the above steps are not available, you could try a manual approach. These steps are basically what cPanel is doing automatically.
- Login to cPanel
- If the PHP version is smaller than 5.6 add the following to .htaccess:
AddType application/x-httpd-php70 .php
- Copy the compatible phalcon.so in your cPanel account on a path outside public_html
- Add phalcon.so to php.ini:
4.1 If php.ini does not take effect, you can try adding it inside public directory of the project. In this case you might want to restrict the access from the web in .htaccess:
<IfModule mod_suphp.c> <Files php.ini> order allow,deny deny from all </Files> </IfModule>
- You can check your configuration anytime by creating a phpinfo.php file with the following:
<?php echo phpinfo();