Jun 1, 2015

Solved phpbrew problem with posix function not found

This morning apache complained to me that:

  posix_geteuid() function not found

So weird, because I installed this php version definitely with posix enabled, via phpbrew.

So I installed again:

sudo -s
phpbrew init -c config.yaml
phpbrew install 5.3.29 +dev (i have predefined a dev shortcut in the config file for convenience)
...
phpbrew switch 5.3.29
exit
sudo service apache2 restart

Not working....

So I decided to do it manually instead, guessing the config file not configuring phpbrew very fitting.


phpbrew install 5.3.29 +default +mysql +pdo +apxs2=/usr/bin/apxs2 +dba +filter +gettext +iconv +mcrypt +openssl +posix +session +soap +sqlite +gd -- \
--with-libdir=lib/x86_64-linux-gnu --with-gd=shared --enable-gd-natf --with-jpeg-dir=/usr --with-png-dir=/usr

This time the installed php version working.

So my guess is correct.

ps, the content in my config.yaml:

variants:
    dev:
        bcmath:
        bz2:
        calendar:
        cli:
        ctype:
        dba:
        dom:
        fileinfo:
        filter:
        gettext:
        ipc:
        iconv:
        json:
        mbregex:
        mbstring:
        mhash:
        mcrypt:
        mysql:
        openssl:
        pdo:
        posix:
        session:
        soap:
        sqlite:
        gd:
          - --with-libdir=lib/x86_64-linux-gnu
          - --with-gd=shared
          - --enable-gd-natf
          - --with-jpeg-dir=/usr
          - --with-png-dir=/usr
extensions:
    dev:
        xdebug: stable
        yaml: stable
        curl: stable
        gd: stable

1 comment:

  1. libraries before php installation:

    sudo apt-get install apache2-dev
    sudo chmod -R oga+rw /usr/lib/apache2/modules
    sudo chmod -R oga+rw /etc/apache2

    sudo apt-get install libxml2-dev
    sudo apt-get install libbz2-dev
    sudo apt-get install libmcrypt-dev
    sudo apt-get install libreadline-dev
    sudo apt-get install libxslt1-dev

    phpbrew install 5.6.16 +default +mysql +pdo +apxs2=/usr/bin/apxs2 +dba +filter +gettext +iconv +mcrypt +openssl +posix +session +soap +sqlite +gd -- --with-libdir=lib/x86_64-linux-gnu --with-gd=shared --enable-gd-natf --with-jpeg-dir=/usr --with-png-dir=/usr

    ReplyDelete