Skip to content

Commit

Permalink
Fix "unknown checksum"
Browse files Browse the repository at this point in the history
  • Loading branch information
yoku0825 committed Jan 23, 2018
1 parent 1eba57a commit 5243105
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
29 changes: 29 additions & 0 deletions Anemometer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
*** Anemometer.php.orig 2016-04-05 15:17:31.000000000 +0900
--- Anemometer.php 2018-01-23 16:26:38.210585113 +0900
***************
*** 364,374 ****

! if (preg_match('/^[0-9]+$/', $checksum))
! {
! return $checksum;
! }
! else if (preg_match('/^[0-9A-Fa-f]+$/', $checksum))
! {
! return $this->bchexdec($checksum);
! }
! else if (strlen($checksum) == 0)
{
--- 364,366 ----

! if (strlen($checksum) == 0)
{
***************
*** 378,380 ****
{
! throw new Exception("Invalid query checksum");
}
--- 370,372 ----
{
! return $this->bchexdec($checksum);
}

21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
FROM centos:centos6.6
FROM centos:centos6.9
MAINTAINER yoku0825
WORKDIR /root

RUN yum install -y git
RUN test -d /tmp/setup || mkdir /tmp/setup
RUN git clone https://github.com/yoku0825/init_script.git /tmp/setup/init_script.git
RUN bash /tmp/setup/init_script.git/docker/docker_basic.sh
RUN yum upgrade -y && yum clean all
RUN yum install -y git && yum clean all
RUN test -d /opt/setup || mkdir /opt/setup
RUN git clone https://github.com/yoku0825/init_script.git /opt/setup/init_script.git
RUN bash /opt/setup/init_script.git/docker/docker_basic.sh

RUN yum install -y http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm
RUN yum install -y Percona-Server-client-56 Percona-Server-shared-56 Percona-Server-server-56
RUN yum install -y httpd php php-mysql php-bcmath
RUN yum install -y http://www.percona.com/downloads/percona-release/percona-release-0.0-1.x86_64.rpm && yum clean all
RUN yum install -y Percona-Server-client-56 Percona-Server-shared-56 Percona-Server-server-56 && yum clean all
RUN yum install -y httpd php php-mysql php-bcmath && yum clean all

RUN git clone https://github.com/box/Anemometer.git /var/www/html/anemometer
RUN /etc/init.d/mysql start && mysql -uroot < /var/www/html/anemometer/install.sql && mysql -uroot < /var/www/html/anemometer/mysql56-install.sql && (echo "GRANT ALL ON *.* TO anemometer" | mysql -uroot)
RUN ln -sf /var/www/html/anemometer/conf/sample.config.inc.php /var/www/html/anemometer/conf/config.inc.php

COPY . /tmp/setup
RUN patch /etc/php.ini /tmp/setup/php.ini.patch
COPY . /opt/setup
RUN patch /etc/php.ini /opt/setup/php.ini.patch

EXPOSE 80
CMD /etc/init.d/mysql start && /etc/init.d/httpd start && tail -f /dev/null
Expand Down

0 comments on commit 5243105

Please sign in to comment.