Skip to content

Tag: php

Can’t connect to database in docker-compose

This is my docker-compose.yaml The problem is that php container can’t connect to mysql. Although from host I can connect with mycli -h 127.0.0.1 -P 3306 -u root. But when I exec in php container and try it, get ‘Connection refused’ Answer Your mysql service binds mysql server’s port 3…

woocommerce build categories tree

I have this categories into my wordpress (woocommerce), and I need to build a menù like this using data retrieved from woocommerce api. What’s an efficient way to build a menù like this? I have tried to inspect wordpress code without figured out. This API lets me retrieve all product categories. https:/…

Error when trying to get Instagram Embed page HTML code

I’m trying to get the HTML Code of the Instagram’s Embed pages for my API, but it returns me a strange error and I do not know what to do now, because I’m new to PHP. The code works on other websites. I tried it already on other websites like apple.com and the strange thing is that when I ca…