Questions tagged php

Explore the latest questions and answers asked by our top developers.

Getting error "cURL error 7: Failed to connect to localhost port" when calling API from another container

I am dockerizing an app that has several different services and I have used the Docker Compose file to achieve this Single docker-compose.yml file for all the services and one Dockerfile for each service. Frontend(angular)[http://localhost:4200] Backend(PHP)[http://localhost:80] Backend Database(Mysql) Integration Service(NodeJS)[http://localhost:4433] Integration Service Database(MongoDB) Authentication Layer(NodeJS)[http://localhost:4454] Authentication Layer Database(Mysql) So far I have successfully containerized all […]

By Shaikh Tayab
Published
Categorised as docker, node.js, php Tagged , ,

Where is dockerfile located in default laravel sail project

Building a laravel project using laravel sail documentation. As mentioned in the docker-compose.yml file it mentions dockerfile: Dockerfile. But it is not located in the root folder, so where is it? # For more information: https://laravel.com/docs/sail version: ‘3’ services: laravel.test: build: context: ./vendor/laravel/sail/runtimes/8.1 **dockerfile: Dockerfile** args: WWWGROUP: ‘${WWWGROUP}’ image: sail-8.1/app extra_hosts: – ‘host.docker.internal:host-gateway’ ports: – […]

By Chris
Published
Categorised as docker, dockerfile, laravel, laravel-sail, php Tagged , , , ,

docker php 7.4 got AH00141: Could not initialize random number generator

Im installing php7.4 from https://hub.docker.com/_/php but got AH00141 error. im able to install it with version 7.2 but i want to install 7.4 here’s the command and response : phpdocker]$ sudo docker run –rm –name PHP74_CONTAINER php:7.4-apache [Mon Jan 24 08:26:01.105711 2022] [:crit] [pid 1] (38)Function not implemented: AH00141: Could not initialize random number generator […]

By Shin Dapaty
Published
Categorised as docker, php Tagged ,

Laravel no longer working after Docker update

I recently updated docker and noticed my app now hangs on connecting… in the browser (both Edge, Chrome and Chrome Incognito). I did a fresh install and I’m still experiencing the issue. Versions: Docker v20.10.12 PHP 8.1.1 WSL version: 0.51.2.0 Laravel Version: 8.75 laravel/sail: 1.0.1 inertiajs/inertia-laravel: 0.5.2 inertiajs/inertia: 0.10.0 laravel/jetstream: 2.6 My custom docker config […]

By Tom Headifen
Published
Categorised as docker, inertiajs, laravel, laravel-8, php Tagged , , , ,

error installing sockets php extension inside docker

inside dockerfile docker-php-ext-install sockets gives these errors, on docker build (I used same dockerfile for days but today it appears this new error): /usr/src/php/ext/sockets/sendrecvmsg.c: In function ‘init_ancillary_registry’: /usr/src/php/ext/sockets/sendrecvmsg.c:128:19: error: invalid application of ‘sizeof’ to incomplete type ‘struct cmsgcred’ 128 | PUT_ENTRY(sizeof(struct cmsgcred), 0, 0, from_zval_write_ucred, | ^~~~~~ /usr/src/php/ext/sockets/sendrecvmsg.c:99:17: note: in definition of macro ‘PUT_ENTRY’ 99 […]

By John TDO
Published
Categorised as docker, php, sockets Tagged , ,

Remote docker http request

I have 2 computers running on the same network as following Macbook Pro M1 (Monterey) Acts as Client (Guest) Docker version 20.10.12, build e91ed57 Docker Compose version v2.2.3 Lenovo (Ubuntu 21.04) Local IP: 192.168.0.63 Acts like Host (host all my docker containers) Docker version 20.10.7, build 20.10.7-0ubuntu5~21.04.2 docker-compose version 1.29.2, build 5becea4c Because docker is […]

By Dahab
Published
Categorised as docker, docker-compose, php, remote-server Tagged , , ,

Cant update php or setup laravel. i’m lost at the beginning of the setup

Hi i have some trouble setting up laravel on a windows 11 linux subsystem. Old php version on docker, how do i update it? Have PHP / 8.1.1 on my windows 11 machine through XAMPP, but for some reason it can not find the right path to php and says it is not installed at […]

By Lukas Schmidt
Published
Categorised as docker, laravel, php, php-8.1, windows-11 Tagged , , , ,

Cannot run laravel migration within docker compose

Sorry if this is obvious, I am quite new to docker… I just want to connect a container with a laravel application to a postgres container The Dockerfile of my laravel application is : FROM php:7.4-fpm RUN apt-get update && apt-get install -y libpq-dev RUN docker-php-ext-install pdo pdo_pgsql pgsql RUN curl -sS https://getcomposer.org/installer | php […]

By Jonas
Published
Categorised as docker, docker-compose, laravel, php, postgresql Tagged , , , ,

How to configure phpstorm with xdebug in remote server on docker

I done this steps: Setup remote server for deployment in PhpStorm. Setup docker server by ssh Setup file map Setup CLI Interpreter with remote docker Map port 9003 from container to remote host, and forward this port by ssh to localhost Troubles: "Run" test script not work with server + docker phpStorm show message Could […]

By Naumov
Published
Categorised as docker, php, phpstorm, xdebug Tagged , , ,

Getting error "ECONNREFUSED 127.0.0.1:80" when one docker container call API from another container

I am dockerizing an app that has several different services and I have used Docker Compose file to achieve this Single docker-compose.yml file for all the services and one Dockerfile for each service. Frontend(angular)[http://localhost:4200] Backend(PHP)[http://localhost:80] Backend Database(Mysql) Authentication Layer(NodeJS)[http://localhost:4454] Authentication Layer Database(Mysql) So far I have successfully containerized all these services but there is one […]

By Shaikh Tayab
Published
Categorised as docker, node.js, php Tagged , ,
1 127

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq