Instant PHP and XDebug on Docker
A while back I wrote a little helper script I could stick in my Linux shell which will just spin up whatever directory I'm in as an Apache server running PHP and XDebug, with a self-signed TLS certificate.
It's very useful when the built-in PHP server (php -S
) just isn't enough, or I want to run a specific version of PHP.
It works like this:
cd /my/php/project/
php_here 8.1
And that's it, I can go hit up https://localhost:4430 or http://localhost:8080 and whatever's in my current directory is mounted inside Apache.
Anyway, just thought I'd share 🙂 in case anyone else finds it useful. You can find the tool here:
https://github.com/dwgebler/php_docker_helper
Comments
All comments are pre-moderated and will not be published until approval.
Moderation policy: no abuse, no spam, no problem.
Recent posts
An AI revolution or playing dumb? This blog post brought to you by a special guest contributor.
musings coding
A bit about binary (pun intended!) to put a twist on a classic learning puzzle.
php coding
Buy this advertising space. Your product, your logo, your promotional text, your call to action, visible on every page. Space available for 3, 6 or 12 months.
I'll say it - web 3.0 is a meaningless buzzword, and blockchain and cryptocurrency is nothing more than a giant fraud.
musings
Challenging the present day orthodoxy on web application architecture.
musings coding
Learn how to make use of Doctrine lifecycle events to build a searchable audit log for your application which records an entry whenever an entity's data is changed.
php