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
all of them with:
extension=phalcon.so
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 'phalcon.so' (tried: /usr/lib/php/20170718/phalcon.so (/usr/lib/php/20170718/phalcon.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/phalcon.so.so (/usr/lib/php/20170718/phalcon.so.so: 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.
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?
Thanks.
Updated
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)
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.
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.