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.

Can't get phalcon work with EasyApache 4 in Cpanel

I have searched the forum and seems others too faced similar problem but without finding any solution.

So, cPanel provides an easy way to include phalcon 3.2.2 via EasyApache4 interface in it. I suppose, before releasing, they test it properly since they ask for money to use cPanel and its feature.

Now I installed via easy apached, uploaded my phalcon based webapp and now it doesn't work. If I use PHP-FPM then I get 403 on page and following in php-fpm logs:

 (104)Connection reset by peer: [client 139.x.x.110:1326] AH01075: Error dispatching request to 

If I switch to cgi or fastcgi etc. then I get 500 error on page and following in logs :

      [core:error] [pid 19991:tid 139894894606080] [client 139.x.x.74:58586] End of script output before headers: index.php

I tried a blank / simple project from phalcon to test out, same error on that one too, so I suppose no issue with script I created using phalcon. Its something to do with configuration.

But phpinf() shows phalcon installed .

Can anyone advice ?



2.7k

Can't compile it ether, tried :

  ./install --phpize /opt/cpanel/ea-php70/root/usr/bin/phpize --php-config /opt/cpanel/ea-php70/root/etc/php.ini --arch 64bit
 ./install: line 55: /opt/cpanel/ea-php70/root/etc/php.ini: Permission denied
 php-config is not installed

I can see php-config is available for each version in this system. File "install" is chmod 577 already.



2.7k
Accepted
answer
edited Aug '18

Found solution, the default EA4 phalcon.so is buggy I suppose so you need to compile your own. Was able to compile latest phalcon manually from instruction found here , however, compilation instruction on official docs for phalcon were not working as they work only standard installation. https://forum.phalconphp.com/discussion/14893/set-phpconfig-while-phalcon-install-on-centos

Or simply follow this : https://www.basezap.com/install-phalcon-php-extension-on-cpanel-easyapache4/

Note: Disable Phalcon from EasyApache4 first.