Hello
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:
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
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:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
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.
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?