Tag: php

Compile Zlib Statically for PHP 5.6

I am using the docker image 5.6.30-alpine https://hub.docker.com/_/php/. I am getting the error PHP Notice: getimagesize(): The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled in /var/www/builds/stage81/platform/class/Wm/View/FileInfo.php on line 55 I cannot find a way to make zlib to be compiled statically. I tried […]

PhpStorm 2017.1 remote php-cli in docker: Configuration php.ini file does not exist

PhpStorm PHP CLI interpreters There are two error infos: Can not find php.ini Can not find xdebug.so PHP container But in my PHP container /usr/local/etc/php/php.ini exist /usr/local/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so exist PHP Dockerfile FROM php:5.6-fpm COPY ./sources.list /etc/apt/sources.list # Init EVN RUN apt-get update && apt-get upgrade && apt-get install -y \ vim \ git \ libgearman-dev \ […]

Docker-compose trouble to mount local volume

I’ve tried to setup a little apache to test my php stuff. But the server won’t let me access my files. (error 403) I’ve mounted my stuff with volumes: – /home/<user>/Workspace/Symfony/<my_project>:/var/www/html:rw do I have to grant any permissions or something? sry I’m not that familiar with docker… :-/ hope someone can help me 🙂 greets, […]

Craft CMS Manager Craftman – No such file or directory: '//docker-compose.yml'

I have used the craftman cms manager for installing craft cms on my computer, and few weeks ago I was able to run the installation of craft locally and that worked fine. But, today I have tried to setup the new project by running this command: craftman –port=8080 install But, I got an error: mkdir: […]

cannot connect mysql and php

Having this lamp docker setup (Im a sort of docker newbie): docker-compose.yml version: ‘2’ services: webserver: build: . ports: – “8080:80” – “443:443” volumes: – ./:/var/www/html links: – db db: image: mysql:5.6 ports: – “3306:3306” volumes: – /var/lib/mysql environment: – MYSQL_ROOT_PASSWORD=adminpasswd – MYSQL_DATABASE=se_racken_dev phpmyadmin: image: phpmyadmin/phpmyadmin:latest ports: – “88:80” links: – db:db Dockerfile FROM php:5.6-apache […]

Docker Permission Denied run docker as nginx

<?php error_reporting(-1); ini_set(‘display_errors’, ‘1’); $code = addslashes($_GET[‘code’]); echo shell_exec(“/usr/bin/docker exec d6ebc1b02e76 perl -e \”$code\” 2>&1″); When executing this PHP script from nginx I get the following: time=”2015-07-30T23:46:03-04:00″ level=fatal msg=”Post http:///var/run/docker.sock/v1.18/containers/d6ebc1b02e76/exec: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?” Outside of giving nginx sudo access to docker is […]

Docker for traditional web application with load balancing?

This is rather a concept question than a technical question. My question is: if I am going to Setup a wordpress eshop (woocommerce) , using Apache using Docker, with load balancing, using HAProxy implement the Micro Service Architecture How should I implement it? Here is what I came up with: 1 Container: Apache + PHP […]

PhpStorm doesn't read PHP configuration from Docker container

What I want Run PHPUnit by terminal and configuration in PhpStorm What I Have Previous problem Resolved in HERE – about not finding files File that running #!/usr/bin/env bash # echo “Current working directory: ‘”$(pwd)”‘” cd $(pwd) && docker run –rm -t -v $(pwd):/var/www -e SYMFONY_ENV=dev ezsystems/php:7.1-v1-dev php $@ Summary When I run this by […]

Laravel 5 is not reading mysql connection (docker) ubuntu

I have a docker environment that runs my laravel 5 app and mysql connection needs to use –protocol=TCP. I have added in my.cnf on my machine. [client] protocol=TCP Is there a way I can get my project to use protocol=TCP. The current error I get when I run my project and it needs to use […]

Laravel App HTTP Request to local API on same nginx Docker container

docker-compose.yml web: build: ./docker-images/nginx ports: – “8080:80” volumes: – ./:/var/www/ – ./docker-conf/vhost.conf:/etc/nginx/sites-enabled/vhost.conf links: – php php: image: nmcteam/php56 volumes: – ./docker-conf/php-fpm.conf:/etc/php5/fpm/php-fpm.conf – ./:/var/www nginx vhost.conf server { listen 80; index index.php index.html; server_name myapi.dev; error_log /var/log/nginx/error.log; access_log /var/log/nginx/access.log; root /var/www/myapi/public; location / { try_files $uri /index.php?$args; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php:9000; […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.