rbxb / place

a clone of r/place
GNU General Public License v3.0
84 stars 61 forks source link

Why does not work? #36

Open mftkww opened 11 months ago

mftkww commented 11 months ago
image
rbxb commented 11 months ago

Make sure that _filters.txt is set up to point "/world" at desktop.html

mftkww commented 11 months ago

Make sure that _filters.txt is set up to point "/world" at desktop.html

image

I am sure

rbxb commented 11 months ago

Can you try going to localhost:8080/desktop.html

mftkww commented 11 months ago

Can you try going to localhost:8080/desktop.html

image
mftkww commented 11 months ago
image

It was so.

mftkww commented 11 months ago
image
mftkww commented 11 months ago

@rbxb

rbxb commented 11 months ago

It looks like you are using your own software to serve the web pages.

What are you using and what is the goal?

mftkww commented 11 months ago

What do I need to use? My operating system is Windows Server 2019.

rbxb commented 11 months ago

You don't need to use the apache server. Place has its own built in web server. Does it give you an error when you try to run place on port 8080?

mftkww commented 11 months ago

@rbxb

image
rbxb commented 11 months ago

That error message is a good sign because it was made by place rather than apache so we are on the right track.

What does it look like if you go to /desktop.html ?

mftkww commented 11 months ago

@rbxb

image
rbxb commented 11 months ago

It looks like place is running correctly but it can't find the web/root folder. It's difficult for me to figure out why from here.

Double check that the path in the -root argument is correct.

Did you add anything to any of the _filter.txt files?

mftkww commented 11 months ago

@rbxb Thank you, it worked. Is it possible to run things like php, mysql, phpmyadmin on it?

rbxb commented 11 months ago

Not with the built in web server but you can use your apache server in combination with place.

Run the apache server and place on different ports. You will access the web pages through the apache server and place will have the API.

So your apache server might be on port 8080 and place would be on port 8081.

You will also have to modify the webpage to give it the correct address. In place.js modify these lines:

let host = window.location.hostname;
let port = window.location.port;

// replace with
let host = localhost;
let port = 8081;
mftkww commented 11 months ago

Not with the built in web server but you can use your apache server in combination with place.

Run the apache server and place on different ports. You will access the web pages through the apache server and place will have the API.

So your apache server might be on port 8080 and place would be on port 8081.

You will also have to modify the webpage to give it the correct address. In place.js modify these lines:

let host = window.location.hostname;
let port = window.location.port;

// replace with
let host = localhost;
let port = 8081;

thank you

mftkww commented 11 months ago

@rbxb

image

why did this happen?

mftkww commented 11 months ago

@rbxb

rbxb commented 11 months ago

I gave you bad advice before but here is a better solution.

In _filters.txt use #proxy to connect with the PHP server.

Here is the documentation for #proxy

If your PHP server is on port 8080 then it might look like this:

#serve 
    world desktop.html
    3d 3dcanvas.html
#proxy
    admin.php http://192.168.1.6:8080
    logout.php http://192.168.1.6:8080

With your PHP server on port 8080 and place on port 8081, you would access the admin page at this URL: http://localhost:8081/admin.php

Also the modifications to place.js aren't necessary.

mftkww commented 11 months ago

I gave you bad advice before but here is a better solution.

In _filters.txt use #proxy to connect with the PHP server.

Here is the documentation for #proxy

If your PHP server is on port 8080 then it might look like this:

#serve 
    world desktop.html
    3d 3dcanvas.html
#proxy
    admin http://localhost:8080/admin.php
    logout http://localhost:8080/logout.php

With your PHP server on port 8080 and place on port 8081, you would access the admin page at this URL: http://localhost:8081/admin

Also the modifications to place.js aren't necessary.

It didn't work, is there something like installing PHP directly?

mftkww commented 11 months ago

@rbxb

rbxb commented 11 months ago

What specifically doesn't work? What are you using as the PHP server?

mftkww commented 11 months ago

What specifically doesn't work? What are you using as the PHP server?

PHP server is installed but I don't know how to run it in game files.

rbxb commented 11 months ago

Run the PHP server separately.

In the terminal, cd into the folder that contains the PHP files and then start the PHP server.

Open another terminal tab and start place.

rbxb commented 11 months ago

Also, you are able to use * in the filter to select any PHP files like this:

#proxy *.php http://192.168.1.6:8080

Any request that has .php in the path will be forwarded to your PHP server that is running on port 8080.

mftkww commented 11 months ago

Also, you are able to use * in the filter to select any PHP files like this:

#proxy *.php http://192.168.1.6:8080

Any request that has .php in the path will be forwarded to your PHP server that is running on port 8080.

image
mftkww commented 11 months ago

Reference in

image
mftkww commented 11 months ago
image
rbxb commented 11 months ago

The Internal Error happens because the PHP server is not working.

mftkww commented 11 months ago

How do I run PHP Server?

rbxb commented 11 months ago

I don't know what software you are using specifically but this might help:

https://www.php.net/manual/en/features.commandline.webserver.php

mftkww commented 11 months ago

I don't know what software you are using specifically but this might help:

https://www.php.net/manual/en/features.commandline.webserver.php

Thank you, when you set the map to 4096x4096, a black screen appears on mobile phones. What is the reason of this?