r/PHPhelp • u/Excell2178 • Jul 26 '25
Help with setting up PHP on Linux
I was advised that Debian is better than Ubuntu for replicating a PHP development environment more easily.
I’ve had a not so great experience with Ubuntu and PHP, and I actually prefer working with Debian. However, at work, there’s already a running Debian system, and I’m not responsible for maintaining it my only task is working with PHP.
Now at home, I’ve installed Proxmox on VMware Pro, and the next step is to install Debian on Proxmox, then install PHP and Apache on it, and finally work with CodeIgniter.
I know it’s a tough path I’ve chosen just to work with PHP at home on Windows 11.
Am I missing something?
At first glance, Proxmox seems like a program that tries to get its users to subscribe in one way or another. It doesn’t seem open-source as I understand it. I tried using ProxMenux to install Debian through it, but the Console didn’t work because I wasn’t subscribed to Proxmox.
Note:
When I tried installing Debian directly on VMware, literally nothing worked. The essential packages for running PHP weren’t available, and that’s why I thought installing Debian on Proxmox on VMware would be better. But honestly it wasn’t better.
I really want to work with PHP on Debian 12 just like I do at work, but it hasn’t worked out for me at home.
I want the PHP development environment at home to be very simple and not confusing, unlike the difficult experience I’ve had so far.
Any advice would be helpful.
5
u/[deleted] Jul 26 '25
Why didn't you just install Debian in VMWare?
1
u/colshrapnel Jul 26 '25
I have no idea what "Proxmox" is, but it looks completely superfluous. I never used Debian too, but installed PHP many times on Ubuntu, using those tutorials from Digital Ocean and everything went well.
Still, the most crucial question is how do you suppose to "work with CodeIgniter"? I mean, edit PHP files. Are you going to treat that virtual Debian server as though it's a remote server and assessing it by SSH? Or do you suppose to log into that Debian, setup PHP IDE there and work where as though it's a separate PC?
I can help you with both scenarios but I need to understand which one
3
u/liamsorsby Jul 26 '25
Why are you installing a hypervisor on another hypervisor to run Debian.
Proxmox is great, and I run it on my homelab. However, you don't want to be nesting things as you're just adding layers of complications on top of the setup.
Install Debian on VMWare and tell us the exact issues you're having. I'm assuming that you have missed some of the network connectivity settings to allow your VM to connect to the Internet.
1
u/cursingcucumber Jul 26 '25
This literally has nothing to do with PHP. Try r/linux.
1
u/equilni Jul 26 '25 edited Jul 26 '25
I am not sure where you got Debian is better than Ubuntu for this task…
You have Ubuntu as a subsystem in Windows already but….
and this isn’t a php question…
Can you execute a simple
apt updatecommand refreshing the package database? You may need to run as root or usesudobefore the command (havent used base Debian in years, so this is foggy). If you have issues here, you need to fix that first.The upgrade the system -
apt upgradeThen it’s the packages you want
Here is the wiki for PHP
https://wiki.debian.org/PHP
So
apt install php and whatever else you needafter the database refresh1
u/obstreperous_troll Jul 26 '25 edited Jul 26 '25
Just use docker with wsl2 and you're all set. Maybe. It would help if you described the problem with a little more detail than "nothing worked". I wonder if you just forgot to run
apt update? I forget that all the time when I get a shell in debian images, though I would think the lists would already be there in a VM install.Help us help you.
1
u/[deleted] Jul 26 '25 edited Jul 26 '25
Since mini computers are so cheap, I would just get one of those and install Debian and the web stack. Then install Apache Guacamole for remote access to the desktop without using RDP client and just a simple web browser from any computer on your local network.
Of course if you can handle writing PHP without an IDe and use a simple editor, then you can install webmin and use its basic file editor.
1
u/TheRealSectimus Jul 26 '25
I would just spin up a docker image or two for this. Prevents potential dependency conflicts and keeps your code sandboxed.
1
u/content-peasant Jul 27 '25
Why? If it's just practice for the sake of learning then it's worth going through proper LAMP, WAMP, WASP, etc setups for sure
For development only just use docker.
I would advise against running Proxmox over VMware, use one or the other.
As for Debian over Ubuntu, personally I do prefer Debian as it comes with less bloat out of the box but essentially they are the same OS given Ubuntu is a Debian based distribution. The main issue you'll likely find is that Debian packages are traditionally older and more "stable" so getting bleeding edge versions requires some work with source lists, keys and dependencies.
1
u/[deleted] Jul 27 '25
Unless you are running windows on a potato, I'd suggest you use Docker. There are projects like DDEV that you can use to virtually eliminate barrier to entry and set up things like local certs, and wraps composer. Docker is also a way of working around the need for older php versions, as you can have any number of different containers. There is nothing special about PHP on Debian, other than in the past, Debian has chosen to do some unique things with the built in file based PHP session mechanism that has caught some people off guard. Otherwise, PHP running on any linux distro is the same, other than the package manager used. Take a look at the official PHP docker container, and note all the different base environments you can choose from (including the different debian OS versions). https://hub.docker.com/_/php. DDEV -> https://ddev.com/
1
u/pabaczek Jul 28 '25
WSL2 on Windows does its magic easily. No complicated setup process and you get basic ubuntu from the getgo. Usually if your project requires fancy-schmancy libraries, you get a Dockerfile / docker-compose.