[Fri Jul 27 03:08:18.935217 2018] [:error] [pid 11] [client 172.18.0.1:54146] PHP Fatal error: Cannot redeclare CreateUniqeSlugOfuser() (previously declared in /var/www/public_html/livesite/application/helpers/MY_url_helper.php:111) in /var/www/public_html/livesite/application/helpers/my_url_helper.php on line 111
Above is the error, I thought maybe this was a simple rename the file in my directory to MY_url_helper with the uppercase but this did not fix the error as some sites have said. As it stands I have no idea how to fix this but I do have some clues.
I'm not a code igniter expert, I took on this project from another developer, but it currently works on their server. It does not work on my server however. Seeing as the issue is probably with autoloading, what could be the thing I'm doing wrong? Could a different version in PHP be causing this issue?
Another hunch is maybe it's some cache I have to change? I'm not sure though... any ideas are appreciated.
I will say after changing the file name the error still thinks I'm using the lowercase version? I know it's reading the file cause I can throw phpinfo in the file and it seems to trigger hence the image I uploaded as a result of that.
Update:: Did echo CI_VERSION command to find this (2.2.0). Maybe this version is not compatible with PHP 7.0?
php56 is for sure the version on the other server... I will see if I can get a docker image of this somehow.
Well 5.6 still error.
Dockerfile
FROM php:5.6-apache
MAINTAINER Joe Astrahan <jastrahan@poolservice.software>
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y \
bzip2 curl git less mysql-client sudo unzip zip \
libbz2-dev libfontconfig1 libfontconfig1-dev \
libfreetype6-dev libjpeg62-turbo-dev libpng-dev libzip-dev && \
rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install bz2 && \
docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd && \
docker-php-ext-install iconv && \
docker-php-ext-install opcache && \
docker-php-ext-install pdo_mysql && \
docker-php-ext-install zip
RUN curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer
# Set environment variables for Apache so we know its user and group names
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
# Configure Apache SSL and Standard Virtualhosts
COPY config/apache_default.conf /etc/apache2/sites-available/000-default.conf
COPY config/apache_default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
COPY config/run /usr/local/bin/run
# Configure SSL Directories & Create Temporary SSL Keys
RUN mkdir /etc/apache2/ssl
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt -subj "/C=US/ST=Florida/L=Fort Lauderdale/O=Pool Service Software LLC/OU=IT Department/CN=dev.poolservice.software.local"
RUN chmod +x /usr/local/bin/run
RUN a2enmod rewrite
#Configure SSL On Apache2 & Headers Mod
RUN a2enmod ssl
RUN a2enmod headers
RUN service apache2 restart
RUN a2ensite default-ssl.conf
RUN service apache2 restart
#Install Zip & Unzip
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install zip unzip -y
#Install NodeJS
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
software-properties-common
EXPOSE 80
EXPOSE 443
CMD ["/usr/local/bin/run"]