DEV Community


Posted on • Updated on

How to reinstall phalcon switching from php 7.1 to php 7.2

Hello, I have a trouble using php and phalcon and this is my story. I installed in a server php 7.1 and phalcon 3.4.5 and phalcon-dev-tools in a server with Ubuntu 16.

So, now, we have issues from dependencies installed, in this case is Cross-Origin error header using Twilio, from composer.json file. The only way to resolve this is upgrade php 7.2 (because Twilio doesn't launch error when I was writing code in localhost).

After upgrade php, I create the following files

$ vim /etc/php/7.2/apache2/conf.d/30-phalcon.ini
$ vim /etc/php/7.2/fpm/conf.d/30-phalcon.ini
$ vim /etc/php/7.2/cli/conf.d/30-phalcon.ini
Enter fullscreen mode Exit fullscreen mode

all of them with:
Enter fullscreen mode Exit fullscreen mode

Then, I delete vendor directory, next I typed composer install to install dependencies from composer.json; and finally, in my console displays the following message:

root@starnet-clks:/var/www/clicksseeker/server# composer install
PHP Warning:  PHP Startup: Unable to load dynamic library '' (tried: /usr/lib/php/20170718/ (/usr/lib/php/20170718/ cannot open shared object file: No such file or directory), /usr/lib/php/20170718/ (/usr/lib/php/20170718/ cannot open shared object file: No such file or directory)) in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Enter fullscreen mode Exit fullscreen mode

So, finally, in conclusion, I have to reinstall phalcon from my server and reinstalling again. Someone have a guide with steps to reinstall phalcon and phalcon-dev-tools in ubuntu?



To update phalcon, I had to go to ~/cphalcon/build directory (This is the phalcon repository downloaded from github cphalcon page, I switch to 3.4.x branch), then I had to type the following command ./install if you doesn't have privileges type sudo ./install.

Top comments (2)

dakujem profile image
Andrej Rypo

You really shoud invest the time and upgrade to 7.4 at least, if you are not able to jump right to 8.0.
Forget about 7.2, it's dead already.

8 is the way to go with any new projects.

See supported php versions.

dhernandez90 profile image

Thanks for your great reply, Unfortunately, in my job have afraid to upgrade projects; the project, in phalcon 3.4.5, is not using migrations, all database is updated in a hardcoded way.