python dependecies fail on CI machine only











up vote
0
down vote

favorite












my jenkins CI has started to fail.
I'm building a module that depends on another module of mine



here is the error message. it's not failing on localhost. The build is done using dockers



Collecting cryptography>=2.2.1 (from pyOpenSSL==18.0.0->api_common_module==4.0.3->mobile_module)

Installing build dependencies: started

Installing build dependencies: finished with status 'error'

Complete output from command /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3qDpun --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /tmp/python-packages -- setuptools>=18.5 wheel "cffi>=1.7,!=1.11.3; python_implementation != 'PyPy'":

Looking in links: /tmp/python-packages

Collecting setuptools>=18.5

Could not find a version that satisfies the requirement setuptools>=18.5 (from versions: )

No matching distribution found for setuptools>=18.5


Here is the docker file



FROM alpine:3.6
LABEL project="mobile_module"
LABEL description="Mobile module"

# Install needed packages. Notes:
# * dumb-init: a proper init system for containers, to reap zombie children
# * musl: standard C library
# * linux-headers: commonly needed, and an unusual package name from Alpine.
# * build-base: used so we include the basic development packages (gcc)
# * bash: so we can access /bin/bash
# * git: to ease up clones of repos
# * ca-certificates: for SSL verification during Pip and easy_install
# * python: the binaries themselves
# * python-dev: are used for gevent e.g.
# * py-setuptools: required only in major version 2, installs easy_install so we can install Pip.

ENV PACKAGES="
dumb-init
musl
linux-headers
build-base
bash
git
ca-certificates
python2
python2-dev
py-setuptools
openssh
sshpass
openssl
openssl-dev
ansible
libffi-dev
py2-pip
supervisor
nginx
uwsgi-python
"

# Add the packages
RUN apk add --update $PACKAGES
&& rm -rf /var/cache/apk/*
&& echo

# make some useful symlinks that are expected to exist
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python2.7 /usr/bin/python; fi
&& if [[ ! -e /usr/bin/python-config ]]; then ln -sf /usr/bin/python2.7-config /usr/bin/python-config; fi
&& if [[ ! -e /usr/bin/easy_install ]]; then ln -sf /usr/bin/easy_install-2.7 /usr/bin/easy_install; fi
&& echo

# Install and upgrade Pip
RUN easy_install pip
&& pip install --upgrade pip
&& if [[ ! -e /usr/bin/pip ]]; then ln -sf /usr/bin/pip2.7 /usr/bin/pip; fi
&& echo

RUN pip install cffi
RUN apk add --no-cache gcc musl-dev

# **company_name** user and group

#RUN getent group www-data
#RUN getent group company_name

RUN adduser -D company_name && adduser company_name company_name
RUN adduser -D www-data -G company_name

# RUN groups www-data
# RUN groups company_name

ENV APP_DIR /var/www/webservice

# Setup uwsgi

RUN mkdir ${APP_DIR}
&& mkdir -p ${APP_DIR}/.python-eggs
&& chown -R www-data:www-data ${APP_DIR}
&& chmod 777 /run/ -R
&& chmod 777 /root/ -R

WORKDIR ${APP_DIR}

COPY uwsgi/webservice.ini /etc/uwsgi/apps-available/webservice.ini
RUN mkdir /etc/uwsgi/apps-enabled/
RUN ln -f -s /etc/uwsgi/apps-available/webservice.ini /etc/uwsgi/apps-enabled/webservice.ini
RUN pip install uwsgitop

# Setup nginx
RUN chown -R www-data:www-data /var/lib/nginx

# RUN cat /etc/nginx/nginx.conf

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/webservice /etc/nginx/conf.d/webservice.conf
RUN rm -f /etc/nginx/conf.d/default.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /run/nginx

# Install application packages
COPY python-packages /tmp/python-packages
RUN pip install -f /tmp/python-packages --no-index mobile_module
RUN mkdir -p /data/mobile_module/newrelic
COPY newrelic/newrelic.ini /data/mobile_module/newrelic/newrelic.ini


any ideas why is that?










share|improve this question
























  • Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
    – Sergio Guillen Mantilla
    Nov 21 at 16:28










  • @SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
    – WebQube
    Nov 21 at 16:55















up vote
0
down vote

favorite












my jenkins CI has started to fail.
I'm building a module that depends on another module of mine



here is the error message. it's not failing on localhost. The build is done using dockers



Collecting cryptography>=2.2.1 (from pyOpenSSL==18.0.0->api_common_module==4.0.3->mobile_module)

Installing build dependencies: started

Installing build dependencies: finished with status 'error'

Complete output from command /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3qDpun --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /tmp/python-packages -- setuptools>=18.5 wheel "cffi>=1.7,!=1.11.3; python_implementation != 'PyPy'":

Looking in links: /tmp/python-packages

Collecting setuptools>=18.5

Could not find a version that satisfies the requirement setuptools>=18.5 (from versions: )

No matching distribution found for setuptools>=18.5


Here is the docker file



FROM alpine:3.6
LABEL project="mobile_module"
LABEL description="Mobile module"

# Install needed packages. Notes:
# * dumb-init: a proper init system for containers, to reap zombie children
# * musl: standard C library
# * linux-headers: commonly needed, and an unusual package name from Alpine.
# * build-base: used so we include the basic development packages (gcc)
# * bash: so we can access /bin/bash
# * git: to ease up clones of repos
# * ca-certificates: for SSL verification during Pip and easy_install
# * python: the binaries themselves
# * python-dev: are used for gevent e.g.
# * py-setuptools: required only in major version 2, installs easy_install so we can install Pip.

ENV PACKAGES="
dumb-init
musl
linux-headers
build-base
bash
git
ca-certificates
python2
python2-dev
py-setuptools
openssh
sshpass
openssl
openssl-dev
ansible
libffi-dev
py2-pip
supervisor
nginx
uwsgi-python
"

# Add the packages
RUN apk add --update $PACKAGES
&& rm -rf /var/cache/apk/*
&& echo

# make some useful symlinks that are expected to exist
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python2.7 /usr/bin/python; fi
&& if [[ ! -e /usr/bin/python-config ]]; then ln -sf /usr/bin/python2.7-config /usr/bin/python-config; fi
&& if [[ ! -e /usr/bin/easy_install ]]; then ln -sf /usr/bin/easy_install-2.7 /usr/bin/easy_install; fi
&& echo

# Install and upgrade Pip
RUN easy_install pip
&& pip install --upgrade pip
&& if [[ ! -e /usr/bin/pip ]]; then ln -sf /usr/bin/pip2.7 /usr/bin/pip; fi
&& echo

RUN pip install cffi
RUN apk add --no-cache gcc musl-dev

# **company_name** user and group

#RUN getent group www-data
#RUN getent group company_name

RUN adduser -D company_name && adduser company_name company_name
RUN adduser -D www-data -G company_name

# RUN groups www-data
# RUN groups company_name

ENV APP_DIR /var/www/webservice

# Setup uwsgi

RUN mkdir ${APP_DIR}
&& mkdir -p ${APP_DIR}/.python-eggs
&& chown -R www-data:www-data ${APP_DIR}
&& chmod 777 /run/ -R
&& chmod 777 /root/ -R

WORKDIR ${APP_DIR}

COPY uwsgi/webservice.ini /etc/uwsgi/apps-available/webservice.ini
RUN mkdir /etc/uwsgi/apps-enabled/
RUN ln -f -s /etc/uwsgi/apps-available/webservice.ini /etc/uwsgi/apps-enabled/webservice.ini
RUN pip install uwsgitop

# Setup nginx
RUN chown -R www-data:www-data /var/lib/nginx

# RUN cat /etc/nginx/nginx.conf

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/webservice /etc/nginx/conf.d/webservice.conf
RUN rm -f /etc/nginx/conf.d/default.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /run/nginx

# Install application packages
COPY python-packages /tmp/python-packages
RUN pip install -f /tmp/python-packages --no-index mobile_module
RUN mkdir -p /data/mobile_module/newrelic
COPY newrelic/newrelic.ini /data/mobile_module/newrelic/newrelic.ini


any ideas why is that?










share|improve this question
























  • Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
    – Sergio Guillen Mantilla
    Nov 21 at 16:28










  • @SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
    – WebQube
    Nov 21 at 16:55













up vote
0
down vote

favorite









up vote
0
down vote

favorite











my jenkins CI has started to fail.
I'm building a module that depends on another module of mine



here is the error message. it's not failing on localhost. The build is done using dockers



Collecting cryptography>=2.2.1 (from pyOpenSSL==18.0.0->api_common_module==4.0.3->mobile_module)

Installing build dependencies: started

Installing build dependencies: finished with status 'error'

Complete output from command /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3qDpun --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /tmp/python-packages -- setuptools>=18.5 wheel "cffi>=1.7,!=1.11.3; python_implementation != 'PyPy'":

Looking in links: /tmp/python-packages

Collecting setuptools>=18.5

Could not find a version that satisfies the requirement setuptools>=18.5 (from versions: )

No matching distribution found for setuptools>=18.5


Here is the docker file



FROM alpine:3.6
LABEL project="mobile_module"
LABEL description="Mobile module"

# Install needed packages. Notes:
# * dumb-init: a proper init system for containers, to reap zombie children
# * musl: standard C library
# * linux-headers: commonly needed, and an unusual package name from Alpine.
# * build-base: used so we include the basic development packages (gcc)
# * bash: so we can access /bin/bash
# * git: to ease up clones of repos
# * ca-certificates: for SSL verification during Pip and easy_install
# * python: the binaries themselves
# * python-dev: are used for gevent e.g.
# * py-setuptools: required only in major version 2, installs easy_install so we can install Pip.

ENV PACKAGES="
dumb-init
musl
linux-headers
build-base
bash
git
ca-certificates
python2
python2-dev
py-setuptools
openssh
sshpass
openssl
openssl-dev
ansible
libffi-dev
py2-pip
supervisor
nginx
uwsgi-python
"

# Add the packages
RUN apk add --update $PACKAGES
&& rm -rf /var/cache/apk/*
&& echo

# make some useful symlinks that are expected to exist
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python2.7 /usr/bin/python; fi
&& if [[ ! -e /usr/bin/python-config ]]; then ln -sf /usr/bin/python2.7-config /usr/bin/python-config; fi
&& if [[ ! -e /usr/bin/easy_install ]]; then ln -sf /usr/bin/easy_install-2.7 /usr/bin/easy_install; fi
&& echo

# Install and upgrade Pip
RUN easy_install pip
&& pip install --upgrade pip
&& if [[ ! -e /usr/bin/pip ]]; then ln -sf /usr/bin/pip2.7 /usr/bin/pip; fi
&& echo

RUN pip install cffi
RUN apk add --no-cache gcc musl-dev

# **company_name** user and group

#RUN getent group www-data
#RUN getent group company_name

RUN adduser -D company_name && adduser company_name company_name
RUN adduser -D www-data -G company_name

# RUN groups www-data
# RUN groups company_name

ENV APP_DIR /var/www/webservice

# Setup uwsgi

RUN mkdir ${APP_DIR}
&& mkdir -p ${APP_DIR}/.python-eggs
&& chown -R www-data:www-data ${APP_DIR}
&& chmod 777 /run/ -R
&& chmod 777 /root/ -R

WORKDIR ${APP_DIR}

COPY uwsgi/webservice.ini /etc/uwsgi/apps-available/webservice.ini
RUN mkdir /etc/uwsgi/apps-enabled/
RUN ln -f -s /etc/uwsgi/apps-available/webservice.ini /etc/uwsgi/apps-enabled/webservice.ini
RUN pip install uwsgitop

# Setup nginx
RUN chown -R www-data:www-data /var/lib/nginx

# RUN cat /etc/nginx/nginx.conf

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/webservice /etc/nginx/conf.d/webservice.conf
RUN rm -f /etc/nginx/conf.d/default.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /run/nginx

# Install application packages
COPY python-packages /tmp/python-packages
RUN pip install -f /tmp/python-packages --no-index mobile_module
RUN mkdir -p /data/mobile_module/newrelic
COPY newrelic/newrelic.ini /data/mobile_module/newrelic/newrelic.ini


any ideas why is that?










share|improve this question















my jenkins CI has started to fail.
I'm building a module that depends on another module of mine



here is the error message. it's not failing on localhost. The build is done using dockers



Collecting cryptography>=2.2.1 (from pyOpenSSL==18.0.0->api_common_module==4.0.3->mobile_module)

Installing build dependencies: started

Installing build dependencies: finished with status 'error'

Complete output from command /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-3qDpun --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links /tmp/python-packages -- setuptools>=18.5 wheel "cffi>=1.7,!=1.11.3; python_implementation != 'PyPy'":

Looking in links: /tmp/python-packages

Collecting setuptools>=18.5

Could not find a version that satisfies the requirement setuptools>=18.5 (from versions: )

No matching distribution found for setuptools>=18.5


Here is the docker file



FROM alpine:3.6
LABEL project="mobile_module"
LABEL description="Mobile module"

# Install needed packages. Notes:
# * dumb-init: a proper init system for containers, to reap zombie children
# * musl: standard C library
# * linux-headers: commonly needed, and an unusual package name from Alpine.
# * build-base: used so we include the basic development packages (gcc)
# * bash: so we can access /bin/bash
# * git: to ease up clones of repos
# * ca-certificates: for SSL verification during Pip and easy_install
# * python: the binaries themselves
# * python-dev: are used for gevent e.g.
# * py-setuptools: required only in major version 2, installs easy_install so we can install Pip.

ENV PACKAGES="
dumb-init
musl
linux-headers
build-base
bash
git
ca-certificates
python2
python2-dev
py-setuptools
openssh
sshpass
openssl
openssl-dev
ansible
libffi-dev
py2-pip
supervisor
nginx
uwsgi-python
"

# Add the packages
RUN apk add --update $PACKAGES
&& rm -rf /var/cache/apk/*
&& echo

# make some useful symlinks that are expected to exist
RUN if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python2.7 /usr/bin/python; fi
&& if [[ ! -e /usr/bin/python-config ]]; then ln -sf /usr/bin/python2.7-config /usr/bin/python-config; fi
&& if [[ ! -e /usr/bin/easy_install ]]; then ln -sf /usr/bin/easy_install-2.7 /usr/bin/easy_install; fi
&& echo

# Install and upgrade Pip
RUN easy_install pip
&& pip install --upgrade pip
&& if [[ ! -e /usr/bin/pip ]]; then ln -sf /usr/bin/pip2.7 /usr/bin/pip; fi
&& echo

RUN pip install cffi
RUN apk add --no-cache gcc musl-dev

# **company_name** user and group

#RUN getent group www-data
#RUN getent group company_name

RUN adduser -D company_name && adduser company_name company_name
RUN adduser -D www-data -G company_name

# RUN groups www-data
# RUN groups company_name

ENV APP_DIR /var/www/webservice

# Setup uwsgi

RUN mkdir ${APP_DIR}
&& mkdir -p ${APP_DIR}/.python-eggs
&& chown -R www-data:www-data ${APP_DIR}
&& chmod 777 /run/ -R
&& chmod 777 /root/ -R

WORKDIR ${APP_DIR}

COPY uwsgi/webservice.ini /etc/uwsgi/apps-available/webservice.ini
RUN mkdir /etc/uwsgi/apps-enabled/
RUN ln -f -s /etc/uwsgi/apps-available/webservice.ini /etc/uwsgi/apps-enabled/webservice.ini
RUN pip install uwsgitop

# Setup nginx
RUN chown -R www-data:www-data /var/lib/nginx

# RUN cat /etc/nginx/nginx.conf

COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/webservice /etc/nginx/conf.d/webservice.conf
RUN rm -f /etc/nginx/conf.d/default.conf

RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
RUN mkdir -p /run/nginx

# Install application packages
COPY python-packages /tmp/python-packages
RUN pip install -f /tmp/python-packages --no-index mobile_module
RUN mkdir -p /data/mobile_module/newrelic
COPY newrelic/newrelic.ini /data/mobile_module/newrelic/newrelic.ini


any ideas why is that?







python docker jenkins






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 16:53

























asked Nov 21 at 15:26









WebQube

2,51952861




2,51952861












  • Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
    – Sergio Guillen Mantilla
    Nov 21 at 16:28










  • @SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
    – WebQube
    Nov 21 at 16:55


















  • Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
    – Sergio Guillen Mantilla
    Nov 21 at 16:28










  • @SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
    – WebQube
    Nov 21 at 16:55
















Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
– Sergio Guillen Mantilla
Nov 21 at 16:28




Can you provide your requirements.txt file for the libraries and a sample of the Dockerfile. I would say you need some extra dependencies some-library-dev package if that requires native libraries or install python setuptools. But with some sample it could be easier to figure out the reason
– Sergio Guillen Mantilla
Nov 21 at 16:28












@SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
– WebQube
Nov 21 at 16:55




@SergioGuillenMantilla pasted the Dockerfile. The requirement who is failing is cryptography>=2.2.1 as you can see. which is a dependency of pyOpenSSL==18.0.0 which is a dependency of api_common which is an internal module
– WebQube
Nov 21 at 16:55












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










The root cause was upgrading PyOpenSSL from 17.3.0 to 18.0. reverted that and was solved.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415316%2fpython-dependecies-fail-on-ci-machine-only%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    The root cause was upgrading PyOpenSSL from 17.3.0 to 18.0. reverted that and was solved.






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      The root cause was upgrading PyOpenSSL from 17.3.0 to 18.0. reverted that and was solved.






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        The root cause was upgrading PyOpenSSL from 17.3.0 to 18.0. reverted that and was solved.






        share|improve this answer












        The root cause was upgrading PyOpenSSL from 17.3.0 to 18.0. reverted that and was solved.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 at 18:43









        WebQube

        2,51952861




        2,51952861






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415316%2fpython-dependecies-fail-on-ci-machine-only%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

            Calculate evaluation metrics using cross_val_predict sklearn

            Insert data from modal to MySQL (multiple modal on website)