Docker Community Forums

Share and learn in the Docker community.

Compilation error when installing interbase php extension


(Megsmegs) #1

I am trying to install php interbase extension with RUN apt-get update && docker-php-ext-install interbase. However I get this error on build:

In file included from /usr/src/php/ext/interbase/interbase.c:35:0:
/usr/src/php/ext/interbase/php_ibase_includes.h:24:19: fatal error: ibase.h: No such file or directory
 #include <ibase.h>
                   ^
compilation terminated.
Makefile:181: recipe for target 'interbase.lo' failed
make: *** [interbase.lo] Error 1
The command '/bin/sh -c apt-get update && docker-php-ext-install interbase' returned a non-zero code: 2

Does anyone have a suggestion on how I can resolve this? I need to access a firebird database.

This is my docker file:

FROM wordpress

ENV DEBIAN_FRONTEND noninteractive

#xdebug
RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_host=10.200.10.1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini

#soap
RUN echo "allow_url_fopen=on" >> $PHP_INI_DIR/conf.d/php.ini
# install the PHP extensions we need
RUN apt-get update && apt-get install -y \
        libpng12-dev \
        libjpeg-dev \
        libxml2-dev \
        libmcrypt-dev \
        libmhash2 \
        libc6 \
        php5-mcrypt \
        php-pear \
        php-http-request \
        zlib1g \
        bzip2 \
        lib32z1 \
    && rm -rf /var/lib/apt/lists/* \
    && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
    && docker-php-ext-install gd mysqli opcache mcrypt soap

# WordPress CLI
RUN curl -L "https://github.com/wp-cli/wp-cli/releases/download/v1.0.0/wp-cli-1.0.0.phar" > /usr/bin/wp && \
    chmod +x /usr/bin/wp


VOLUME /var/lib/firebird/2.5/data
VOLUME /var/lib/firebird/2.5/backup
VOLUME /var/lib/firebird/2.5/system
VOLUME /etc/firebird/2.5
VOLUME /home/run



#Install firebird
RUN \
  apt-get update && \
  apt-get install -y firebird2.5-super && \
  sed -ri 's/RemoteBindAddress = localhost/RemoteBindAddress = /g' /etc/firebird/2.5/firebird.conf && \
  apt-get clean && \
  rm -rf /var/lib/apt/lists/*


#Install GD library that astro app requires
RUN apt-get update && apt-get install -y libgd2-dev

WORKDIR "/usr/lib/x86_64-linux-gnu"
RUN ln -s libfbclient.so.2 libfbclient.so
RUN ldconfig
WORKDIR "/"

#needed for php to use firebird database
#RUN apt-get update && apt-get install php5-interbase
#RUN export C_INCLUDE_PATH=/usr/include/firebird
RUN apt-get update && docker-php-ext-install interbase

# forward logs to docker log collector
RUN ln -sf /dev/stdout /var/log/firebird/firebird2.5.log

#turn off php error reporting
RUN echo "display_errors=off" > $PHP_INI_DIR/conf.d/php.ini
RUN echo "file_uploads = On" >> $PHP_INI_DIR/conf.d/php.ini
RUN echo "memory_limit = 64M" >> $PHP_INI_DIR/conf.d/php.ini
RUN echo "upload_max_filesize = 64M" >> $PHP_INI_DIR/conf.d/php.ini
RUN echo "post_max_size = 64M" >> $PHP_INI_DIR/conf.d/php.ini
RUN echo "max_execution_time = 600" >> $PHP_INI_DIR/conf.d/php.ini

VOLUME /var/lib/firebird/2.5/data
VOLUME /var/lib/firebird/2.5/backup
VOLUME /var/lib/firebird/2.5/system
VOLUME /etc/firebird/2.5
VOLUME /home/run

RUN a2enmod headers

(Scebotari66) #2

I am getting the same error on a Linux.
@megnicholas did you manage to solve this issue?