thecpaneladmin / EA-PhalconPHP

EasyApache Custom Opt Mod for PhalconPHP Framework
http://www.thecpaneladmin.com/php-phalcon-module-for-cpanel-easyapache/
GNU General Public License v2.0
20 stars 5 forks source link

Phalcon needs to be recompiled if PHP version is upgraded #4

Closed 01i closed 8 years ago

01i commented 8 years ago

When I first installed Phalcon using EA3 I had PHP version 5.5 installed, I just needed to update a few things with my server, so ran EA3 again, and Phalcon no longer works.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0

Googling this error brings up responses saying that Phalcon needs to be recompiled when PHP is upgraded. EA3 did the initial compilation of Phalcon, but I assume it using the original library that it compiled under 5.5, rather than compiling a fresh copy of falcon using the version of PHP (5.6) that EA3 just upgraded to.

The EA3 module either needs to recompile Phalcon every time (just in case PHP has been updated), or (preferably) recompile Phalcon when EA3 is doing a PHP upgrade.

vanessavasile commented 8 years ago

This is normal for most compiled PECL plugins

01i commented 8 years ago

It's normal to have to manually recompile plugins that you installed yourself, but not those that were originally compiled during an EA install. For something that was installed by EA, it should be recompiled automatically during an EA update if required.

vanessavasile commented 8 years ago

I've looked into this, and while it's true that extensions compiled through EA should be retained in upgrades, unfortunately it's not something that I can resolve on the side of the plugin. The plugin itself only denotes how the module is compiled once it is enabled. EasyApache is what decides what plugins should be compiled. With that said, when you upgraded to 5.5 or 5.6, did you make sure Phalcon was still selected? I just ran an update on a test server and the extension was compiled when I moved from 5.5 to 5.6.

01i commented 8 years ago

Phalcon was definitely still selected in EA3 during the upgrade, the entire upgrade was identical to the previous EA3 build, with exception of upgrading to PHP 5.6 and enabling the Intl php extension. Did you did your test using Easy Apache 3 or 4?

vanessavasile commented 8 years ago

I was able to reproduce the issue when going from 5.4 to 5.5, and I see it's caused by the fact that the extension is being compiled before PHP is, thus it's installing for the wrong version. I have a patch I'm testing, I'll update you shortly.

vanessavasile commented 8 years ago

I just pushed the update - you'll need to re-clone the extension down to your server and run EA again.