Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
soulflyman
@soulflyman:matrix.org
[m]
Hi, I'm running Devilbox v1.9.0 with mariadb (10.4.17) and I want to backup my database with mariabackup? It seems that there is no shared folder mount, so how can I get the backup out of the docker container?
3 replies
Victor Passapera
@vpassapera
Hello, anyone here using PHP 8 successfully with AMQP extension?
Seems I cannot get that to work no matter what I do. I even compiled the so myself for the same php version and extension, and it is not loading the module
Victor Passapera
@vpassapera
Ended up having to use a custom docker image
Victor Passapera
@vpassapera
fallenruby
@fallenruby
Hey hi!!! I'm trying to set up a devilbox via LAN. I've added the DNS record to my domain as the documentation (*.dev.domain.tld) which points to the IP of the virtual machine where devilbox is, added the domain TLD_SUFFIX to the env. Now, why don't I have the Auto DNS? What I'm missing?
nselden
@nselden
@lokinz as in artisan?
Longplayman
@longplayman:matrix.org
[m]
Hi ppl, I need the xdebug.ini settings. Does anyone have it working with vscode?
Devilbox v1.9.2
PLANTROON
@plantroon
when do I need to set ProxyFCGIBackendType to GENERIC with PHP FPM 5.2? Is it actually needed at all ?
Juan José Zermeño
@juanjosezg
Hi anyone knows how to fix this?
image.png
Juan José Zermeño
@juanjosezg
no one?
Juan José Zermeño
@juanjosezg
?
Prince
@amir-prince
Hi guys,
I have some question about the "EXTRA_HOSTS", I installing devibox on remote server, this server has 2 IP public "37.xxx.." and private "10.xx.." I want that when I visit mypublicproj.com who is linked to the public ip, it will redirected to my devilbox project "myproj.loc" ?
EXTRA_HOSTS=mypublicproj.com=myproj.loc ? thats right ?
Dan Bryant
@cube-dan
@juanjosezg, your ~/.ssh folder is mounted on startup by devilbox. Read more here: https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html?highlight=~%2F.ssh#host-path-ssh-dir
To fix the problem you have to fix the perms on your host system; devilbox has nothing to do with it. Do this:
... from a terminal:
chmod 600 ~/id_rsa
... and you're done!
Dan Bryant
@cube-dan
@longplayman:matrix.org , what platform are you on? There's a LOT of setup with vscode+xdebug and much of it has nothing to do with your xdebug.ini settings. I have it working — on a Mac — so the following might not help you; here we go anyway.
vscode: make sure that you're woking from within a "workspace":
image.png
Dan Bryant
@cube-dan
more vscode: make sure that your {workspace-folder}/.vscode/launch.json file has at least this in it:
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9000,
      "pathMappings": {
        "/shared/httpd/[some-site-folder]/[the-docroot]": "${workspaceFolder}/[the-docroot]/"
      }
    }
  ]
}
The really important bits are:
      "port": 9000,
      "pathMappings": {
        "/shared/httpd/[some-site-folder]/[the-docroot]": "${workspaceFolder}/[the-docroot]/"
      }
devilbox has voodoo for passing port 9000 to/from the docker container. work with 9000 or change the voodoo; your call.
Dan Bryant
@cube-dan
for the pathMappings ... the syntax is "devilbox/side":"your/computer/side". you'll need to fill in the [some-side-folder]/[the-docroot] bits with the real deets from your project.
... and now for the picky bit. "${workspaceFolder}/[the-docroot]/" needs a trailing slash or your breakpoints won't grab. If you have the trailing slash. If you have the trailing slash and your breakpoints still aren't hitting try checking "everything":
image.png
Dan Bryant
@cube-dan
host system: make sure that you've setup a network interface alias. read about that here: https://devilbox.readthedocs.io/en/latest/howto/xdebug/host-address-alias-an-mac.html#howto-host-address-alias-on-mac
Dan Bryant
@cube-dan
... And now for the part that you actually asked for; the xdebug.ini file. You'll need to setup the file to match the version of php that you're using and the config vars in my file are for Xdebug 3 ... as translated from Xdebug 2 using this: https://xdebug.org/docs/upgrade_guide — so you may need to go the other direction if you're using a different version of php. Here's the contents (the important bits) of my [devilbox-root]/cfg/php-ini-7.4/devilbox-php.xdebug.ini file:
[PHP]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.remote_port = 9000
xdebug.idekey = VSCODE
xdebug.log = /var/log/php/xdebug.log
xdebug.mode=debug
xdebug.start_with_request=0
xdebug.discover_client_host=0
xdebug.client_host=10.254.254.254
Whoops, almost forgot. You need a cookie set in your browser for the current page that you're debugging. Here's the content of a bookmarklet that I use to spin up a xdebug.idkey cookie:
Dan Bryant
@cube-dan
javascript:(function() {document.cookie='XDEBUG_SESSION='+'VSCODE'+';path=/;';})()
To add that, right click (or ctrl+click) the Chrome bookmark bar then choose "Add Page":
image.png
Dan Bryant
@cube-dan
GIve the cook a name, slop in the js code above, save the book, and you're all setup with a shiny new bookmarklet that gives you "I can connect to a vscode + xdebug session" superpowers:
image.png
To make sure everything is A<=>B you can shell into the devilbox and give the xdebug.log file, specified in the xdebug.ini file (above) a tail -f:
 tail -f /var/log/php/xdebug.log
if everything is connecting you'll get this bit of magic pixie powder:
Dan Bryant
@cube-dan
[22630] Log opened at 2021-09-15 22:37:18.304575
[22630] [Step Debug] INFO: Connecting to configured address/port: 10.254.254.254:9000.
[22630] [Step Debug] INFO: Connected to debugging client: 10.254.254.254:9000 (through xdebug.client_host/xdebug.client_port). :-)
... dig the smiley face on the end; because awesome, thats why.
Dan Bryant
@cube-dan
Anyway. Maybe someone can help me out with a problem of my own. After sitting on an xdebug breakpoint too long, proxy_fcgi (probably) decides that I'm done with the connection and barfs out these errors:
==> log/apache-2.4/qualitydigest.com-error.log <==
[Wed Sep 15 16:46:59.355296 2021] [proxy_fcgi:error] [pid 1097:tid 140406884910848] [client 172.16.238.1:64840] AH01067: Failed to read FastCGI header, referer: http://somesite.com.loc/
[Wed Sep 15 16:46:59.356665 2021] [proxy_fcgi:error] [pid 1097:tid 140406884910848] (104)Connection reset by peer: [client 172.16.238.1:64840] AH01075: Error dispatching request to : , referer: http://somesite.com.loc/

==> log/apache-2.4/somesite.com-access.log <==
172.16.238.1 - - [15/Sep/2021:16:44:44 -0600] "GET / HTTP/1.1" 503 299 "http://somesite.com.loc/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Firefox/92.0"
Does anyone know how to keep proxy_fcgi — or whatever part of the stack gets bored with me looking at the contents of variables — from timing out and punching back with a 503?