Drupal 10 .module file ext can't be executed after using registry.redhat.io/rhel9/php-82 image
I have used a based image of registry.redhat.io/rhel9/php-82 image
which include
Apache Server 2.4
and
PHP 8.2 version with php-fpm
I have copied a existing drupal 10.3 Project to image
It ran smoothly for debian image:
FROM php:8.x.xx-apache
However, when I finished deployment and try to browser the page.
It turns out with PHP Exception
The website encountered an unexpected error. Try again later.
Error: Call to undefined function Drupal\views\Routing\views_add_contextual_links() in Drupal\views\Routing\ViewPageController->handle() (line 63 of core/modules/views/src/Routing/ViewPageController.php).call_user_func_array(Array, Array) (Line: 123)
and views_add_contextual_links() is from official drupal core, which a defined function for views.module
\core\modules\views\views.module
I have tried all httpd.conf and .htaccess of root path but in vain.
How can I check if there is any config issue of these problem?
Dockerfile:
FROM registry.redhat.io/rhel9/php-82
USER root
COPY ./vtc-cpe-web-new .
RUN mkdir -p /opt/app-root/src/web/admission
RUN echo "<?php echo phpinfo(); " > /opt/app-root/src/web/index.php
RUN mkdir -p /etc/httpd/sites-available /etc/httpd/sites-enabled
RUN yum update -y && \
yum install -y php-devel
RUN yum install php-pear -y
ORACLE oci
RUN mkdir /opt/oracle \
&& cd /opt/oracle
ADD instantclient_19_22.zip /opt/oracle
ADD .deps/instantclient-basic-linux.x64-21.12.0.0.0dbru.el9.zip /opt/oracle
ADD .deps/instantclient-sdk-linux.x64-21.12.0.0.0dbru.el9.zip /opt/oracle
RUN cd /opt/oracle \
&& wget https://download.oracle.com/otn_software/linux/instantclient/2112000/el9/instantclient-basic-linux.x64-21.12.0.0.0dbru.el9.zip \
&& wget https://download.oracle.com/otn_software/linux/instantclient/2112000/el9/instantclient-sdk-linux.x64-21.12.0.0.0dbru.el9.zip
Install Oracle Instantclient
RUN unzip /opt/oracle/instantclient-basic-linux.x64-21.12.0.0.0dbru.el9.zip -d /opt/oracle
RUN unzip -o /opt/oracle/instantclient-sdk-linux.x64-21.12.0.0.0dbru.el9.zip -d /opt/oracle
ENV LD_LIBRARY_PATH /opt/oracle/instantclient_21_12:${LD_LIBRARY_PATH}
RUN echo 'instantclient,/opt/oracle/instantclient_21_12/' | pecl install oci8 --with-pdo-oci=instantclient,/opt/oracle/instantclient_21_12,21.12
Set the PHP configuration file location
ENV PHP_INI_FILE=/etc/php.d/php.ini
Add the extension configuration to the php.ini file
RUN echo "extension=oci8.so" >> $PHP_INI_FILE
RUN yum install -y libaio vim
ADDED THIS & BELOW
Install the dependencies
RUN TEMPFILE=$(mktemp) && \
curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
php <"$TEMPFILE" && \
./composer.phar install --no-interaction --no-ansi --optimize-autoloader
RUN echo "DocumentRoot \"/opt/app-root/src/web\"" > /opt/app-root/etc/conf.d/00-documentroot.conf
RUN chgrp -R 0 /opt/app-root/src/web && chmod -R g=u /opt/app-root/src/web
RUN chmod -R 755 /opt/app-root/src/web/admission
RUN chown -R apache:apache /opt/app-root/src/web/admission
CMD /usr/libexec/s2i/run