Git Product home page Git Product logo

docker-php-5.3's Introduction

PHP 5.3 FPM

PHP 5.3 reached EOL on 14 Aug 2014 and thus, official docker support was dropped. I still needed to run 5.3 with FPM so I built this image based on the latest official builds of PHP.

What is PHP?

PHP is a server-side scripting language designed for web development, but which can also be used as a general-purpose programming language. PHP can be added to straight HTML or it can be used with a variety of templating engines and web frameworks. PHP code is usually processed by an interpreter, which is either implemented as a native module on the web-server or as a common gateway interface (CGI).

wikipedia.org/wiki/PHP

logo

How to use this image.

With Command Line

For PHP projects run through the command line interface (CLI), you can do the following.

Create a Dockerfile in your PHP project

FROM helder/php-5.3
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ]

Then, run the commands to build and run the Docker image:

docker build -t my-php-app .
docker run -it --rm --name my-running-app my-php-app

Run a single PHP script

For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a PHP script by using the PHP Docker image directly:

docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp helder/php-5.3 php your-script.php

Without a Dockerfile

If you don't want to include a Dockerfile in your project, it is sufficient to do the following:

docker run -it --rm --name my-php-fpm-app -v "$PWD":/var/www/html helder/php-5.3

License

View license information for the software contained in this image.

docker-php-5.3's People

Contributors

nek- 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-php-5.3's Issues

Debian 9, build fails

After running build for your Dockerfile on Debian 9, I receive this error:

Removing libtinfo-dev:amd64 (5.9+20140913-1+b1) ...
Removing libxml2-dev:amd64 (2.9.1+dfsg1-5+deb8u4) ...
Removing xz-utils (5.1.1alpha+20120614-2+b3) ...
+ make clean
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp5.la sapi/cli/php sapi/fpm/php-fpm modules/* libs/*
 ---> b5afc827148a
Removing intermediate container caa349d9fbd4
Step 12/19 : COPY docker-php-* /usr/local/bin/
COPY failed: no source files were specified

I use Docker version 17.06.0-ce, build 02c1d87.

Add extensions

Hey again.

Is it possible to add new extensions? If so how?

For example I need the php_soap.dll enabled. It is not enabled by default.

Docker network port forwarding no longer working since latest commit

Hey

I'm having issues with Docker network port forwarding lately. What I mean by that is that my nginx container is not able to connect to my php-5.3-fpm container on port 9000 anymore. I believe this has something to do with your latest commit: e616840.

This piece of code makes FPM listen on 127.0.0.1 instead of 0.0.0.0.

root@14aa0f137728:/var/www/html# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1/php-fpm.conf)

instead of how it used to be

root@e9643dcf0d93:/var/www/html# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::9000 :::* LISTEN 1/php-fpm.conf)

I'm not making a pull-request because it is not clear to me why you changed this in the first place, so I don't know if we can just put it back?

Anyway, this is a serious issue that causes the image to be unusable for me for now :-(

Can you take a look at this?

Thanks!

enable/install php extensions.

Hey, can you please help me installing the following php extensions:
pgsql, gd2, imagick, mbstring, uploadprogress (PECL-Package)

File not found

Hey. I really really need to run a legacy app in 5.3 and this is the only package I could find but I am having some issues. Maybe you know what is wrong...

I have Nginx and simple index.php with phpinfo() file in /home/httpd/myapp/public/index.php

I created a config for it with fastcgi_pass 127.0.0.1:9001;

Started docker with:

sudo docker run -d -it -p 9001:9000 --name legacy_app -v /home/httpd/myapp/public":/var/www/html helder/php-5.3

When I visit the URL however I get "File not found."

Thanks.

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.