Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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/
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

edited Mar '16

/usr/local/lib/php.ini

Yes, exist.

Do you use CGI, FastCGI, or suPHP?

/usr/local/lib/php.ini

Yes, exist.

I tried you 2nd solution:

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

Restarted apache but extension not installed.

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

edited Mar '16
  • core_module (static)
  • authnfilemodule (static)
  • authndefaultmodule (static)
  • authzhostmodule (static)
  • authzgroupfilemodule (static)
  • authzusermodule (static)
  • authzdefaultmodule (static)
  • authbasicmodule (static)
  • cache_module (static)
  • memcachemodule (static)
  • include_module (static)
  • filter_module (static)
  • deflate_module (static)
  • logconfigmodule (static)
  • logio_module (static)
  • env_module (static)
  • expires_module (static)
  • headers_module (static)
  • uniqueidmodule (static)
  • setenvif_module (static)
  • version_module (static)
  • proxy_module (static)
  • proxyconnectmodule (static)
  • proxyftpmodule (static)
  • proxyhttpmodule (static)
  • proxyscgimodule (static)
  • proxyajpmodule (static)
  • proxybalancermodule (static)
  • ssl_module (static)
  • mpmpreforkmodule (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)
  • authnfilemodule (static)
  • authndefaultmodule (static)
  • authzhostmodule (static)
  • authzgroupfilemodule (static)
  • authzusermodule (static)
  • authzdefaultmodule (static)
  • authbasicmodule (static)
  • cache_module (static)
  • memcachemodule (static)
  • include_module (static)
  • filter_module (static)
  • deflate_module (static)
  • logconfigmodule (static)
  • logio_module (static)
  • env_module (static)
  • expires_module (static)
  • headers_module (static)
  • uniqueidmodule (static)
  • setenvif_module (static)
  • version_module (static)
  • proxy_module (static)
  • proxyconnectmodule (static)
  • proxyftpmodule (static)
  • proxyhttpmodule (static)
  • proxyscgimodule (static)
  • proxyajpmodule (static)
  • proxybalancermodule (static)
  • ssl_module (static)
  • mpmpreforkmodule (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)



6.4k
Accepted
answer

I couldnt install with cPanel.

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

Thanks



21.2k

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


21.2k
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.