Skip to content

SoapClient is enabled, but Class SOAPClient does not exist #777

@jangaehler

Description

@jangaehler

I need PHPSoap in my Docker project and wanted to activate it now. The module is loading, phpinfo also shows it to me. But when I call var_dump(class_exists("SOAPClient")) I get a false. I tried all attempts from thread #315 , but nothing worked.
Some people say you have to install php-soap, which I can't do because php-soap has no installation candidate, others say it's not necessary.

Any ideas?

PHPInfo:

Soap Client	enabled
Soap Server	enabled
Directive	Local Value	Master Value
soap.wsdl_cache	1	1
soap.wsdl_cache_dir	/tmp	/tmp
soap.wsdl_cache_enabled	1	1
soap.wsdl_cache_limit	5	5
soap.wsdl_cache_ttl	86400	86400

My Dockerfile:


ENV ACCEPT_EULA=Y
ENV APACHE_DOCUMENT_ROOT /app
RUN a2enmod rewrite

RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf

RUN mkdir /usr/share/man/man1

COPY config/php.ini /usr/local/etc/php/

ARG MSSQL_DRIVER_VER=5.2.0

# Install the PHP Driver for SQL Server & jre for swagger-codegen
RUN apt-get update -yqq \
        && apt-get install -y apt-transport-https gnupg graphviz libzip-dev libxml2-dev \
        && curl -s https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
        && curl -s https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \
        && apt-get update -yqq \
        && ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales default-jre \
        && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
        && locale-gen

# Install via Pecl(PHP) package management        
RUN pecl install -f pdo_sqlsrv-${MSSQL_DRIVER_VER} sqlsrv-${MSSQL_DRIVER_VER} xdebug zip \
        && docker-php-ext-install soap \
        && docker-php-ext-enable pdo_sqlsrv sqlsrv xdebug zip

# Set xdebug
ENV XDEBUGINI_PATH=/usr/local/etc/php/conf.d/xdebug.ini
COPY config/xdebug.ini /tmp/xdebug.ini
RUN cat /tmp/xdebug.ini >> $XDEBUGINI_PATH

# vhost
COPY config/vhost.conf /etc/apache2/sites-enabled/vhost.conf

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions