Code Monkey home page Code Monkey logo

Comments (13)

tomsik68 avatar tomsik68 commented on August 10, 2024

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.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

I'm a complete noob in GitHub and Linux, but can I commit that folder to my php repo?

from docker-xampp.

tomsik68 avatar tomsik68 commented on August 10, 2024

Yes, you can commit that folder to your Github repo.

There are two separate problems that you're trying to solve here:

  1. How do I version control this folder?
  2. How do I serve this folder using xampp?

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.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

Im sorry, for making you waste your time with me, but where is my_web_pages located ?

from docker-xampp.

tomsik68 avatar tomsik68 commented on August 10, 2024

my_web_pages is just an example. Instead of that, you need to pass the path to your php folder.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

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.

from docker-xampp.

tomsik68 avatar tomsik68 commented on August 10, 2024

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.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

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 😄

from docker-xampp.

tomsik68 avatar tomsik68 commented on August 10, 2024

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.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

Ok, i know it worked, but im getting an error saying im not allowed, im using root username and root password

from docker-xampp.

tomsik68 avatar tomsik68 commented on August 10, 2024

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.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

Still nothing, I did look that I need to put skip-grant-tables in the cnf, I will look more into this.

from docker-xampp.

snaffey avatar snaffey commented on August 10, 2024

Yup, I did put skip-grant-tables and worked, I don't know what that does, it's working so it's fine

from docker-xampp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.