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