We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Installing on cPanel

I'm triying to install Phalcon on cPanel with following repository.

https://github.com/thecpaneladmin/EA-PhalconPHP

cd /usr/src
wget https://github.com/thecpaneladmin/EA-PhalconPHP/archive/master.zip
unzip -d /var/cpanel/easy/apache/custom_opt_mods/ master.zip
/scripts/easyapache

Phalcon extension not listed on EasyApache ssh or interface.

GitHub Issue: https://github.com/thecpaneladmin/EA-PhalconPHP/issues/5

What/How can i do? Any ideas?

Did you do the last step too?

From here, select Phalcon from the list of PHP modules. The module will be loaded from /usr/local/lib/php.ini.

Maybe you have your own custom php.ini?

if none of these work, you can compile phalcon.so for the current php and major kernel version, put it somewhere on the server and add the extension in php.ini. I'm doing it this way and it works without problems.

This should work for most cPanel hosts

 https://github.com/magnxpyr/phalcon.so

can u check php.ini file exists in /usr/local/lib/

ls -a /usr/local/lib/


58.1k
edited Mar '16

I can't select because of not listed on PHP modules.

Checked php.ini location and file location is correct:

Loaded php.ini: /usr/local/lib/php.ini



58.1k
edited Mar '16

/usr/local/lib/php.ini

Yes, exist.

Do you use CGI, FastCGI, or suPHP?

/usr/local/lib/php.ini

Yes, exist.



58.1k

I tried you 2nd solution:

extension = "/usr/local/lib/php/extensions/phalcon.so-php5.4/phalcon.so"

Restarted apache but extension not installed.



58.1k

I dont know :) but cgi-fcgi configuration exists on php info.

Do you use CGI, FastCGI, or suPHP?

/usr/local/lib/php.ini

You can use (on centos) apachectl -M, you'll show what modules are enabled:

apachectl -M

ex: output fastcgi_module (shared)

I dont know :) but cgi-fcgi configuration exists on php info.

Do you use CGI, FastCGI, or suPHP?

/usr/local/lib/php.ini



58.1k
edited Mar '16
  • core_module (static)
  • authn_file_module (static)
  • authn_default_module (static)
  • authz_host_module (static)
  • authz_groupfile_module (static)
  • authz_user_module (static)
  • authz_default_module (static)
  • auth_basic_module (static)
  • cache_module (static)
  • mem_cache_module (static)
  • include_module (static)
  • filter_module (static)
  • deflate_module (static)
  • log_config_module (static)
  • logio_module (static)
  • env_module (static)
  • expires_module (static)
  • headers_module (static)
  • unique_id_module (static)
  • setenvif_module (static)
  • version_module (static)
  • proxy_module (static)
  • proxy_connect_module (static)
  • proxy_ftp_module (static)
  • proxy_http_module (static)
  • proxy_scgi_module (static)
  • proxy_ajp_module (static)
  • proxy_balancer_module (static)
  • ssl_module (static)
  • mpm_prefork_module (static)
  • http_module (static)
  • mime_module (static)
  • status_module (static)
  • autoindex_module (static)
  • asis_module (static)
  • info_module (static)
  • suexec_module (static)
  • cgi_module (static)
  • negotiation_module (static)
  • dir_module (static)
  • actions_module (static)
  • userdir_module (static)
  • alias_module (static)
  • rewrite_module (static)
  • so_module (static)
  • bwlimited_module (shared)
  • suphp_module (shared)
  • security2_module (shared)

You can use (on centos) apachectl -M, you'll show what modules are enabled:

apachectl -M

ex: output fastcgi_module (shared)

edited Mar '16

your host runs PHP under suPHP

nano /etc/php5/apache2/php.ini

add -> extension=phalcon.so and restart apache

  • core_module (static)
  • authn_file_module (static)
  • authn_default_module (static)
  • authz_host_module (static)
  • authz_groupfile_module (static)
  • authz_user_module (static)
  • authz_default_module (static)
  • auth_basic_module (static)
  • cache_module (static)
  • mem_cache_module (static)
  • include_module (static)
  • filter_module (static)
  • deflate_module (static)
  • log_config_module (static)
  • logio_module (static)
  • env_module (static)
  • expires_module (static)
  • headers_module (static)
  • unique_id_module (static)
  • setenvif_module (static)
  • version_module (static)
  • proxy_module (static)
  • proxy_connect_module (static)
  • proxy_ftp_module (static)
  • proxy_http_module (static)
  • proxy_scgi_module (static)
  • proxy_ajp_module (static)
  • proxy_balancer_module (static)
  • ssl_module (static)
  • mpm_prefork_module (static)
  • http_module (static)
  • mime_module (static)
  • status_module (static)
  • autoindex_module (static)
  • asis_module (static)
  • info_module (static)
  • suexec_module (static)
  • cgi_module (static)
  • negotiation_module (static)
  • dir_module (static)
  • actions_module (static)
  • userdir_module (static)
  • alias_module (static)
  • rewrite_module (static)
  • so_module (static)
  • bwlimited_module (shared)
  • suphp_module (shared)
  • security2_module (shared)

You can use (on centos) apachectl -M, you'll show what modules are enabled:

apachectl -M

ex: output fastcgi_module (shared)



58.1k
Accepted
answer

I couldnt install with cPanel.

Installed successfull via SSH according to following document: https://docs.phalcon.io/en/latest/reference/install.html#linux-solaris

Thanks



47.7k

Please be aware that when you rebuild using easyapache3/4 then you will have to reinstall phalcon.

It is also possible to write script in /scripts/posteasyapache that installs phalcon.

An example of untested unofficial script that was given and can live in /scripts/posteasyapache:

if [ ! -d "/usr/src/phalcon" ]; then

mkdir /usr/src/phalcon

fi

cd /usr/src/phalcon

[ ! -e "master.zip" ] && wget https://github.com/phalcon/cphalcon/archive/master.zip

[ ! -e "cphalcon-master" ] && unzip master.zip

cd cphalcon-master/ext &&

phpize &&

./configure', '--with-php-config=/usr/local/bin/php-config &&

make install || exit 1

grep -q phalcon.so /usr/local/lib/php.ini || echo extension=phalcon.so | tee -a /usr/local/lib/php.ini


47.7k
edited Sep '16

Also please note that when Cpanel is installed the RPM Distributions will fail to install at time of writing.

The name of the php dependencies for RPM Distributions in Cpanel which uses easyapache are appended with "ea" for easyapache and at time of writing this is currently not handled by the RPM Distributions.