Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phalcon can only be compiled with zephir build on Ubuntu 18.04 #13376

Closed
dschissler opened this issue May 11, 2018 · 4 comments
Closed

Phalcon can only be compiled with zephir build on Ubuntu 18.04 #13376

dschissler opened this issue May 11, 2018 · 4 comments

Comments

@dschissler
Copy link
Contributor

dschissler commented May 11, 2018

Installation hangs on Ubuntu 18.04 when compiling from tarball using the ./install method. However it does compile with zephir builid using latest zephir. I tested that Phalcon\Version::get() works.

Ubuntu 18.04 uses PHP 7.2 and GCC 7.3.0.

@glaucomonteiro
Copy link

I was able to install it using the ./install method, but had to do this:

Create a file in /etc/php/7.2/mods-available called phalcon.ini with the content as:
extension=phalcon.so

Then run the command:
ln -s /etc/php/7.2/mods-available/phalcon.ini /etc/php/7.2/cli/conf.d/50-phalcon.ini

Doing this it will create a symbolic link to the file you just created, to be loaded with priority 50, or in other words, it will be the last extension loaded so you should not have any conflicts when starting the php service.

@dschissler

This comment was marked as abuse.

@sergeyklay
Copy link
Member

This issue was moved to phalcon/packagecloud#27

@sergeyklay
Copy link
Member

Implemented.

root@c94f22d87b2c:/# php -v
PHP 7.2.8-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jul 25 2018 10:52:19) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.8-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
root@c94f22d87b2c:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
root@c94f22d87b2c:/# curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh | sudo bash
Detected operating system as Ubuntu/bionic.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/phalcon_stable.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.
root@c94f22d87b2c:/# apt-cache policy php7.2-phalcon
php7.2-phalcon:
  Installed: (none)
  Candidate: 3.4.0-5+php7.2
  Version table:
     3.4.0-5+php7.2 500
        500 https://packagecloud.io/phalcon/stable/ubuntu bionic/main amd64 Packages
root@c94f22d87b2c:/# apt install php7.2-phalcon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  php7.2-mysql php7.2-sqlite3 php7.2-pgsql php7.2-memcached
The following NEW packages will be installed:
  php7.2-phalcon
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,233 kB of archives.
After this operation, 5,035 kB of additional disk space will be used.
Get:1 https://packagecloud.io/phalcon/stable/ubuntu bionic/main amd64 php7.2-phalcon amd64 3.4.0-5+php7.2 [1,233 kB]
Fetched 1,233 kB in 4s (285 kB/s)         
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package php7.2-phalcon.
(Reading database ... 24205 files and directories currently installed.)
Preparing to unpack .../php7.2-phalcon_3.4.0-5+php7.2_amd64.deb ...
Unpacking php7.2-phalcon (3.4.0-5+php7.2) ...
Setting up php7.2-phalcon (3.4.0-5+php7.2) ...

Creating config file /etc/php/7.2/mods-available/phalcon.ini with new version
root@c94f22d87b2c:/# php -r 'echo Phalcon\Version::get() , PHP_EOL;'
3.4.0
root@c94f22d87b2c:/# php --ri phalcon

phalcon


Web framework delivered as a C-extension for PHP
phalcon => enabled
Author => Phalcon Team and contributors
Version => 3.4.0
Build Date => Jul 28 2018 20:05:02
Powered by Zephir => Version 0.10.10-d1b4cc68d9

Directive => Local Value => Master Value
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.events => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.orm.column_renaming => On => On
phalcon.orm.not_null_validations => On => On
phalcon.orm.exception_on_failed_save => Off => Off
phalcon.orm.enable_literals => On => On
phalcon.orm.late_state_binding => Off => Off
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.ignore_unknown_columns => Off => Off
phalcon.orm.update_snapshot_on_save => On => On
phalcon.orm.disable_assign_setters => Off => Off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants