Giter Club home page Giter Club logo

Comments (10)

mfalc499 avatar mfalc499 commented on September 25, 2024

Hello @QuChen88 @danzamansky and AWS team,

I wanted to add that using a local instance of memcached 1.4.25 on the ec2 server works just fine with session.use_strict_mode = 1 in php.ini and doesn't crash Apache.

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

Also, you can read more about strict sessions in PHP here: https://wiki.php.net/rfc/strict_sessions

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

I tried to compile and install the libmemcached and the client using the following instructions:
https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/tree/php7
https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached

BUT got the same results as in comment #1 above - Apache crash.

from aws-elasticache-cluster-client-memcached-for-php.

malyeyev-AMZN avatar malyeyev-AMZN commented on September 25, 2024

Hi mfalc499,

We have just recently merged most recent fixes from the upstream. Please make sure you are using the latest v2.0.1 release: https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/releases/tag/v2.0.1

Additionally I highly recommend using the most recent code to build ElastiCache libmemcached that has been just updated. I know that some session-related issues have been fixed in that one.
https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached/releases/tag/v1.0.18

from aws-elasticache-cluster-client-memcached-for-php.

sodabrew avatar sodabrew commented on September 25, 2024

@malyeyev-AMZN This is fixed upstream in the memcached 3.0.3 release.

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

@malyeyev-AMZN @sodabrew
I tried:
https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/releases/tag/v2.0.1
https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached/releases/tag/v1.0.18

and still same issue. Here are the steps I took:

  • Install PHP and PECL:
  apt update
  apt install php libapache2-mod-php php-mcrypt php-mysql php-curl php-gd php7.0-dev php-pear
  • Install igbinary v2.0.1:
  pecl install igbinary
  pecl list
    Installed packages, channel pecl.php.net:
    =========================================
    Package  Version State
    igbinary 2.0.1   stable
  
  cd /etc/php/7.0/mods-available/
  vi igbinary.ini
    ADD:
      extension=igbinary.so
  
  phpenmod igbinary
  • Install the AWS ElastiCache version of libmemcached:
  apt update
  apt install libevent-dev libsasl2-dev
  cd
  mkdir -p tmp/elasticache
  cd tmp/elasticache
  wget https://github.com/awslabs/aws-elasticache-cluster-client-libmemcached/archive/v1.0.18.tar.gz
  mv v1.0.18.tar.gz aws-elasticache-cluster-client-libmemcached-1.0.18.tar.gz
  tar -xvf aws-elasticache-cluster-client-libmemcached-1.0.18.tar.gz
  cd aws-elasticache-cluster-client-libmemcached-1.0.18/
  ./configure --prefix=/usr/local/stow/aws-elasticache-cluster-client-libmemcached-1.0.18
  make
  make install
  cd /usr/local/stow
  stow -v aws-elasticache-cluster-client-libmemcached-1.0.18
  • Install the AWS ElastiCache Cluster Client:
apt update
 apt install pkg-config
 cd
 mkdir -p tmp/elasticache
 cd tmp/elasticache
 wget https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/archive/v2.0.1.tar.gz
 mv v2.0.1.tar.gz aws-elasticache-cluster-client-memcached-for-php-2.0.1.tar.gz
 tar -xvf aws-elasticache-cluster-client-memcached-for-php-2.0.1.tar.gz
 cd aws-elasticache-cluster-client-memcached-for-php-2.0.1/
 phpize
 ./configure --prefix=/usr/local/stow/aws-elasticache-cluster-client-memcached-for-php-2.0.1 --enable-memcached-igbinary
 make
 make install
 cd /usr/lib/php/20151012
 chmod ugo-x memcached.so
 cd /etc/php/7.0/mods-available/
 vi memcached.ini
   ADD:
     extension=memcached.so
     memcached.sess_consistent_hash = 1
 
 phpenmod memcached

And then when I load up the test page from comment #1 and set session.use_strict_mode = 1, Apache segfaults and crashes. As soon as I set session.use_strict_mode = 0, everything works fine.

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

@sodabrew do you know when the Amazon version of php-memcached will be based on v3.0.3 or how do i make use of v3.0.3 with AWS Elasticache if possible?

from aws-elasticache-cluster-client-memcached-for-php.

sodabrew avatar sodabrew commented on September 25, 2024

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

@sodabrew ah got it! thank you.
@malyeyev-AMZN looking forward to hearing from you! :)

from aws-elasticache-cluster-client-memcached-for-php.

mfalc499 avatar mfalc499 commented on September 25, 2024

@malyeyev-AMZN @sodabrew
I can confirm that setting session.use_strict_mode = 1 in php.ini now works correctly with v2.0.3
(https://github.com/awslabs/aws-elasticache-cluster-client-memcached-for-php/releases/tag/v2.0.3).

from aws-elasticache-cluster-client-memcached-for-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.