Giter Site home page Giter Site logo

php-fpm's Introduction

Laradock Logo

contributions welcome GitHub forks GitHub issues GitHub stars GitHub CI GitHub license

Full PHP development environment based on Docker.

forthebadge



Use Docker First - Learn About It Later!

Laradock Documentation

Join Us

Gitter

Gitpod


Awesome People

Laradock is an MIT-licensed open source project with its ongoing development made possible entirely by the support of all these smart and generous people, from code contributors to financial contributors. 💜

Project Maintainers


Mahmoud Zalt
@mahmoudz

Bo-Yi Wu
@appleboy

Philippe Trépanier
@philtrep

Mike Erickson
@mikeerickson

Dwi Fahni Denni
@zeroc0d3

Thor Erik
@thorerik

Winfried van Loon
@winfried-van-loon

TJ Miller
@sixlive

Yu-Lung Shao (Allen)
@bestlong

Milan Urukalo
@urukalo

Vince Chu
@vwchu

Huadong Zuo
@zuohuadong

Lan Phan
@lanphan

Ahkui
@ahkui

< Join Us >
@laradock

Code Contributors

Laradock Contributors

Financial Contributors

Open Collective backers

You can support us using any of the methods below:

1: Open Collective
2: Paypal
3: Github Sponsors
4: Patreon


Sponsors

Sponsoring is an act of giving in a different fashion. 🌱

Gold Sponsors

Sista AI - Unlock Your Full Potential With a Personal AI Coach. (www.sista.ai) Apiato - Build PHP API's faster!

Silver Sponsors

Bronze Sponsors

You can sponsor us using any of the methods below:

1: Sponsor via Open Collective.
2: Email us at [email protected].

Sponsors logos are displayed on the github repository page and the documentation website home page.

License

MIT © Mahmoud Zalt

php-fpm's People

Contributors

adridev avatar alchimik avatar bestlong avatar brunocascio avatar carestad avatar enomotodev avatar erikn69 avatar gueroverde avatar hareku avatar initred avatar julianmar avatar kilvn avatar lialosiu avatar mahmoudz avatar phamquocbuu avatar philtrep avatar radist avatar twinh avatar vaawebdev avatar winfried-van-loon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-fpm's Issues

Add and use repository Sury

Since this image is Debian based, you might want to look at the Sury repo for easy to install php packages. It's used quite a lot (you can search for it on github) and can ease installing extensions on the image at laradock stage.

Bug Report - Issue with Curl after updating new build introding curl 7.88.1

Bug Description:

It appears that the latest update of the Dockerfile-8.1 has upgraded Curl to version 7.88.1. Previously, the version was 7.74.0. However, after this update, an error is encountered when using Curl in PHP-FPM. When attempting, for example, to execute the command curl https://google.com, the following error message is displayed: curl: (6) getaddrinfo() thread failed to start.

Additional Information:

Output of the command curl -V within the PHP-FPM environment:

curl 7.88.1 (x86_64-pc-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.9 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3
Release-Date: 2023-02-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

How to add php 8.3 in laradock?

I can't find tutorial or in doc on how to add php 8.3 in current laradock container.. maybe some can update the document or have some discord community or questions and help.

Add WebP support

Please include support for WebP. Since docker-php-ext-configure gd is run in this image before being used by Laradock's php-fpm docker image within the repo, it'd be helpful to include webp as an option here.

This is what I reran in the other dockerfile to get webp support added.

RUN docker-php-ext-configure gd \
  --enable-gd-native-ttf \
  --with-jpeg-dir=/usr/lib \
  --with-webp-dir=/usr/lib \
  --with-freetype-dir=/usr/include/freetype2 && \
  docker-php-ext-install gd```

M1 chip support

Could you build the images support M1 chip (arm platform)?
I faced up mmap() failed: [12] Cannot allocate memory problem with linux/amd64 images.

memory leak - issue latest build

I added wkhtmltopdf to the php-fpm image today. Did a rebuild and thought all was fine.

However soon as a browser visited any site the ram on the system went through the roof until the point where I ram out and the system crashed.
I have followed all the steps.

  • Rebuild my images multiple times
  • docker-compose down
  • docker container prune
  • docker image prune -a
  • docker volume prune

and brought up all the containers again. The container that is having the issue each and every time is the laradock-php-fpm container.

I am right now attempting to use this image instead https://hub.docker.com/layers/laradock/php-fpm/2.7-7.4/images/sha256-59b3b2b936e16fb2b6ec7d818a84bcc3bd23b068be0e710dcdf05e5fc20d095d?context=explore will report if it works. Something with https://hub.docker.com/layers/laradock/php-fpm/latest-7.4/images/sha256-c1943c4a18d0903f70c444a33e4dcf806c9269d6566c667e6ccff74ab427673e?context=explore seems to be driving the ram usage through the roof. Nothing else with my setup has changed previous to what I mentioned. Colleague has had the identical issue.

hmm get same issue with https://hub.docker.com/layers/laradock/php-fpm/2.7-7.4/images/sha256-59b3b2b936e16fb2b6ec7d818a84bcc3bd23b068be0e710dcdf05e5fc20d095d?context=explore

Rebuild the image on docker-hub

Hello,

could you rebuild the image more often, so that the latest patches are in? Currently this sits on PHP 7.1.4, the PHP-FPM base image is on 7.1.10 now.

php-ext-enable imagick ;fi' returned a non-zero code: 100

if
PHP_FPM_INSTALL_IMAGEMAGICK=true
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true

then error

E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/imagemagick-6-common_6.9.7.4+dfsg-11+deb9u5_all.deb  404  Not Found                                                                                                                         
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickcore-6-arch-config_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found                                                                                                                
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickcore-6-headers_6.9.7.4+dfsg-11+deb9u5_all.deb  404  Not Found                                                                                                                      
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/libx/libx11/libx11-data_1.6.4-3_all.deb  404  Not Found           
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/libx/libx11/libx11-6_1.6.4-3_amd64.deb  404  Not Found            
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickcore-6.q16-3_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickwand-6-headers_6.9.7.4+dfsg-11+deb9u5_all.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickwand-6.q16-3_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickcore-6.q16-3-extra_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/p/python3.5/libpython3.5-minimal_3.5.3-1_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/p/python3.5/python3.5-minimal_3.5.3-1_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/p/python3.5/libpython3.5-stdlib_3.5.3-1_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/p/python3.5/python3.5_3.5.3-1_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/libx/libx11/libx11-dev_1.6.4-3_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickcore-6.q16-dev_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickwand-6.q16-dev_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/libmagickwand-dev_6.9.7.4+dfsg-11+deb9u5_all.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/g/ghostscript/libgs9-common_9.20~dfsg-3.2+deb9u4_all.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/g/ghostscript/libgs9_9.20~dfsg-3.2+deb9u4_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/g/ghostscript/ghostscript_9.20~dfsg-3.2+deb9u4_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/imagemagick-6.q16_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://security-cdn.debian.org/pool/updates/main/i/imagemagick/imagemagick_6.9.7.4+dfsg-11+deb9u5_amd64.deb  404  Not Found
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/pool/main/libx/libx11/libx11-doc_1.6.4-3_all.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c if [ ${INSTALL_IMAGEMAGICK} = true ]; then     apt-get install -y libmagickwand-dev imagemagick &&     pecl install imagick &&     docker-php-ext-enable imagick ;fi' returned a non-zero code: 100

PHP 8 support?

PHP 8 was finally been released, and as far as I know there are also docker images available for it. Would it be possible to add support for v8 here as well? Do we just need a Dockerfile-80? If so, I could try and create a PR for it

laradock/php-fpm:2.2-7.2 CVE-2019-11043 Issue

Referencing: https://thehackernews.com/2019/10/nginx-php-fpm-hacking.html?m=1

According to the referenced article, there is a new vulnerability (CVE-2019-11043) which has been patched in PHP 7.2.24. At this time, laradock/php-fpm:2.2-7.2 is on PHP 7.2.21.

Would we be able to get a new Docker image with this updated? It appears that since the Dockerfile uses FROM php:7.2-fpm, all you need to do is re-run the build as php has already has pushed the patch.

$ docker run -it  php:7.2-fpm bash
Unable to find image 'php:7.2-fpm' locally
7.2-fpm: Pulling from library/php
8d691f585fa8: Pull complete
cba12d3fd8b1: Pull complete
cda54d6474c8: Pull complete
412447ed0729: Pull complete
1205d5ea3b9d: Pull complete
80a25696cb8a: Pull complete
62a7e0bf9b1b: Pull complete
e917be2fd0e7: Pull complete
e8ae1818d84f: Pull complete
e7c57f770d97: Pull complete
286407d851ec: Pull complete
Digest: sha256:8451ce66994c1cfbe5d823e6767cb425ac2d721ac31a33f9f808675578ee53a3
Status: Downloaded newer image for php:7.2-fpm
root@272b48382901:/var/www/html# php -v
PHP 7.2.24 (cli) (built: Oct 25 2019 04:29:43) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

2.0-71 pecl error

when i enable php-fpm mongodb extension in laradock .env, and rebuild php-fpm, this error appear:

No releases available for package "pecl.php.net/mongodb"
and then, i change to the 1.4-71, it work well~

it seems that there are some error in pecl configuration, i also tried redis, the same error~

is it a bug?

7.4 image?

PHP 7.4 was released today or yesterday. Will an image be available soon?

Dockerfile for PHP 7.1 - oci runtime error

I have pulled the Dockerfile-71 down locally as it is not yet available from laradock directly and modified the docker-compose file to use it. I did a docker-compose build php-fpm.

When i run:

docker-compose up -d nginx redis mysql

I am getting the following error:

Creating network "laradock_default" with the default driver
Creating laradock_redis_1
Creating laradock_applications_1
Creating laradock_workspace_1
Creating laradock_php-fpm_1

ERROR: for php-fpm  Cannot start service php-fpm: oci runtime error: container_linux.go:247: starting container process caused "chdir to cwd (\"/var/www/html\") set in config.json failed: no such file or directory"
ERROR: Encountered errors while bringing up the project.

Any Ideas? I am not sure which config.json it is referring to.

Not building on Raspberry Pi

I have a Raspberry Pi 3 Model B with docker and docker-compose installed:

pi@raspberrypi $ docker --version
Docker version 18.09.0, build 4d60db4

pi@raspberrypi $ docker-compose --version
docker-compose version 1.23.2, build 1110ad0

In my Laravel app with Laradock set up, if I run docker-compose build --no-cache php-fpm in the laradock folder, the php-fpm service fails to build, throwing the following error:

standard_init_linux.go:207: exec user process caused "exec format error"
ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c set -xe;     apt-get update -yqq &&     pecl channel-update pecl.php.net &&     apt-get install -yqq       apt-utils       libzip-dev zip unzip &&       docker-php-ext-configure zip --with-libzip &&       docker-php-ext-install zip &&       php -m | grep -q 'zip'' returned a non-zero code: 1

I get the same error with PHP_VERSION set to 7.1 and with all the PHP_FPM_INSTALL_* options set to false.

Is there a way to get this working on my Pi?

GD with jpeg support problem

gd_info() output this:

[
  "GD Version" => "bundled (2.1.0 compatible)"
  "FreeType Support" => false
  "GIF Read Support" => true
  "GIF Create Support" => true
  "JPEG Support" => false
  "PNG Support" => true
  "WBMP Support" => true
  "XPM Support" => false
  "XBM Support" => true
  "WebP Support" => false
  "JIS-mapped Japanese Font Support" => false
]

"JPEG Support" is false

maybe jpeg lib not in /usr/lib ?

this line:
**--with-jpeg-dir=/usr/lib **

Cannot get latest 7.3.13 fpm

I have already remove old image and build with nocache and repull the image but it still is 7.3.12 in php-fpm container please help me to upgrade to 7.3.13 thanks
PHP 7.3.12 (cli) (built: Nov 22 2019 16:38:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.12, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.9.0, Copyright (c) 2002-2019, by Derick Rethans

[question] Using the latest and stable tags

There was a question about tags: why don't you use stable and / or latest tags when publishing an image?

I use this image when developing, but each time I manually go into the repository and see if a new version has appeared, it is a dubious pleasure.

Installing extra modules

Is there a way that i could install php-enchant or any other php-extension on this container?

apt fails to retrieve any new packages

This one for sure caused me a headache:
I wanted to install the php7.1 intl extension in our php-fpm container, however, instructions such as listed here were not working:
https://www.colinodell.com/blog/2016-12/installing-php-7-1

Another example failure:
sudo docker run -u 0 [php-fpm container] apt-get install nano

Whatever I tried, the container was unable to locate any package that was not already installed. The source list was fine, but after a long search, I found the culprit: ls -la /var/lib/apt/lists/ showed nothing, the folder was empty. Running apt-get update did not restore this folder, it stayed empty.

Getting back to the code in this repository, the following line seemed to cause this issue:
&& rm -rf /var/lib/apt/lists/*

Now is my experience with Debian and php-fpm limited, but this, disabling the functioning of apt, definitely does not seem like intended behaviour?

For now, our workaround will be to skip the laradock image and use the source form the dockerfile without the breaking line, but I would be very happy if this could be fixed.

Extension zip

Hello, a suggestion is to leave the zip extension already by default

7.3 to latest stable

I already run pull the image many times but it still remain at

PHP 7.3.8 (cli) (built: Aug 14 2019 08:12:05) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.8, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.8.0, Copyright (c) 2002-2019, by Derick Rethans
Please help me to be able to update to latest 7.3.12

php-fpm: Fatal error: Uncaught Error: Call to undefined function pg_connect()

php-fpm:Fatal error: Uncaught Error: Call to undefined function pg_connect()
workspace: all ok

default Dockerfile
docker-compose.yml: dockerfile: Dockerfile-70

root@279e1ddfa2fb:/var/www# /usr/local/sbin/php-fpm -v
[02-Dec-2016 22:42:33] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/aero
spike.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/aerospike.so: cannot open shared object file: No such file or directory in Unknown on line 0
[02-Dec-2016 22:42:33] NOTICE: PHP message: PHP Warning:  PHP Startup: Invalid library (appears to be a Zend Extension, try loading using zend_extension=opcache.so
 from php.ini) in Unknown on line 0
PHP 7.0.9 (fpm-fcgi) (built: Aug 10 2016 19:45:54)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

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.