Closed snaffey closed 1 year ago
Hello, if you use this command to start the container:
docker run --name myXampp -p 41061:22 -p 41062:80 -d -v ~/my_web_pages:/www tomsik68/xampp
The folder ~/my_web_pages
is where you place your php files.
I'm a complete noob in GitHub and Linux, but can I commit that folder to my php repo?
Yes, you can commit that folder to your Github repo.
There are two separate problems that you're trying to solve here:
For number 1, you commit the folder to your Github repo.
For number 2, you need to use the right command to start the docker container.
Im sorry, for making you waste your time with me, but where is my_web_pages located ?
my_web_pages
is just an example. Instead of that, you need to pass the path to your php folder.
The line docker run --name myXampp -p 41061:22 -p 41062:80 -d -v /workspaces/php:/www tomsik68/xampp:8
was what got it to work in the end.
I appreciate all you've done, especially this Docker, which I'm utilizing as a student because my school uses PHP and SQL.
I'm happy I was able to help -- that's not always the case! No need to feel bad for what you call "wasting my time". I created this project because I wanted to and I also help because I want to.
I'm closing this issue as it sounds like we answered the question. If anything comes up, feel free to re-open or make a new one.
Hi again, the index is working fine but I want to use another sql program instead of phpmyadmin, I'm trying to use heidiSQL or an vscode extension, I'm trying to connect to 127.0.0.1:41062 or local host:41062 and I can't, if I can't use another program there is no problem. Thanks 😄
If you want to connect to SQL server, you need to use a different port. 41062 is used for the apache HTTP server.
You need to stop your existing docker container and start a new one with the -p 41063:3306
parameter, like this:
docker run --name myXampp -p 41061:22 -p 41062:80 -p 41063:3306 -d -v /workspaces/php:/www tomsik68/xampp
The -p 41063:3306
parameter exposes port 3306 of the container on your localhost port 41063. After that is done, you should be able to connect to localhost:41063 from your vscode extension.
Ok, i know it worked, but im getting an error saying im not allowed, im using root username and root password
Those credentials are for SSH server, not for SQL. For SQL, I think it's just root
with empty password. If that doesn't work, just search for xampp default mysql password
.
Still nothing, I did look that I need to put skip-grant-tables in the cnf, I will look more into this.
Yup, I did put skip-grant-tables and worked, I don't know what that does, it's working so it's fine
Hello,
I want to mount the php folder, what i mean in this, is to open the index on my folder that i have in a workspace. Thank you!