XAMPP alternative on Fedora Silverblue (toolbox)

I’m starting to study and in PHP class, the teacher requested to install XAMPP, I use Fedora Silverblue 38 and I thought about using it in a toolbox environment, but after installing XAMPP and some dependencies, I can’t start the Apache server:

Is there another easy way to do the same thing and how to test it?

I tried this: PHP — Fedora Developer Portal

but I don’t know if I was successful, because it presents:
$ sudo php --server localhost:8080 --docroot .
[Sun May 14 14:36:40 2023] PHP 8.2.5 Development Server (http://localhost:8080) started
[Sun May 14 14:36:51 2023] [::1]:49014 Accepted
[Sun May 14 14:36:51 2023] [::1]:49014 [404]: GET / - No such file or directory
[Sun May 14 14:36:51 2023] [::1]:49014 Closing
[Sun May 14 14:37:18 2023] [::1]:52402 Accepted
[Sun May 14 14:37:18 2023] [::1]:52402 [404]: GET / - No such file or directory
[Sun May 14 14:37:18 2023] [::1]:52402 Closing
[Sun May 14 14:37:24 2023] [::1]:45016 Accepted
[Sun May 14 14:37:24 2023] [::1]:45016 [404]: GET / - No such file or directory
[Sun May 14 14:37:24 2023] [::1]:45016 Closing
[Sun May 14 14:37:31 2023] [::1]:45026 Accepted
[Sun May 14 14:37:31 2023] [::1]:45026 [404]: GET / - No such file or directory
[Sun May 14 14:37:31 2023] [::1]:45026 Closing

My task status:
1 - install php / xampp OK
2 - run Apache server NOK
3 - test server NOK

Friends gave me these simple steps, I believe it could be in the official Fedora documentation?

podman pod create --name web --userns=keep-id -p 8080:80 -p 3306:3306

podman run -d --pod web --name web_apache -v $HOME/workspace/php:/var/www/html:z -u $UID --sysctl net.ipv4.ip_unprivileged_port_start=0 php:apache

podman run -d --pod web --name web_mysql -e MYSQL_ROOT_PASSWORD=rootpwd -e MYSQL_USER=user -e MYSQL_PASSWORD=userpwd -e MYSQL_DATABASE=test mysql:latest

podman exec -it -u root web_apache docker-php-ext-install pdo_mysql mysqli

podman restart web_apache


podman pod start web

Thanks for the commands you posted here to use podman as an XAMMP alternative.

I tested it with F37 Workstation and it worked out of the box. I just had to make the php folder before installation.
And also the Access Denied error was quit disturbing while opening the webpage the first time.
Installing the mysql was just available over docker.io for fedora we do have mariadb but I not changed that to not introduce errors.

It is important that there is a ~/workspace/php folder available otherwise it throws an errors.

mkdir -p $HOME/workspace/php   #create web-root for your php files

Now it is needed to create a ~/workspace/php/index.php file
so it is possible to access the website over http://localhost:8080 without access denied.

For information about php it is god to create a ~/workspace/php/info.php with the content:

// Show all information, defaults to INFO_ALL

// Show just the module information.
// phpinfo(8) yields identical results.

http://localhost:8080/info.php displays the infos.

A easy way to deal with podman is the gui “Podman Desktop” available in the Software app.


I still can’t do it in XAMPP, I tested it in a VM on Workstation and it worked, something is missing in Silverblue…

That was not the objective … it is a alternative you got to use a local web-environment to start with your php course.

You can put your scripts in ~/workspace/php and fire up the podman pod start web and then access your work over the local web-browser like http://localhost:8080/.

Silver-blue is not working because it has a different file structure being immutable. Xampp uses a file structure where it not can write data to it alias not exists, because it is write protected.

Somehow wit a ton of symlinks it would be probably possible to create the same structure. It is not worth to lose time for that.

I there not a portable version of xampp available? Which you can put it on a memory stick?