Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac: Fix server port to validate bookmarks throughout sessions #346

Open
belbernard opened this issue Nov 21, 2024 · 4 comments
Open

Mac: Fix server port to validate bookmarks throughout sessions #346

belbernard opened this issue Nov 21, 2024 · 4 comments
Labels

Comments

@belbernard
Copy link

belbernard commented Nov 21, 2024

Currently the server starts with a port that seems to be randomly assigned, for instance "54441" here:
http://127.0.0.1:54441/php/index.php

In settings.json we have this instruction:
"web_server": {
"listen_on": ["127.0.0.1", 0],
etc.

Unexpectedly, replacing "0" with a port number (e.g. "8081") does not set the port at the desired value. (Even clearing the cache and debug.log did not solve the problem.)

It seems that PHP Desktop is setting the port at a value overriding the one given in settings.json.

Having a fixed port number wiil make it possible to keep valid bookmarks throughout sessions of running PHP Desktop.

@oleteacher
Copy link

Working fine for me. Had a student with issue and they were trying to use a port already in use. May or may not be your case, but changing ports works great on my end.

https://www.speedguide.net/port.php?port=54441

image

image

image

image

@belbernard
Copy link
Author

belbernard commented Nov 21, 2024

You are showing the trace, not the final URL displayed on the Chromium browser.

After setting the port to "54441":
"listen_on": ["127.0.0.1", 54441],

I got the following trace, and the port displayed on the browser was 49618, i.e. a random value shown in the trace:

...
[1121/192651.541793:INFO:settings.cpp(19)] Fetching settings from file: /Volumes/EXT/Dropbox/WORK/BOL PROCESSOR/BP3/PHP_DESKTOP/PHP Desktop.app/Contents/Resources/settings.json
[1121/192651.545214:INFO:mongoose_server.cpp(55)] Start Mongoose server
[1121/192651.545232:INFO:mongoose_server.cpp(79)] listening_ports=127.0.0.1:0
[1121/192651.545280:INFO:mongoose_server.cpp(84)] www_directory=/Volumes/EXT/Dropbox/WORK/BOL PROCESSOR/BP3/PHP_DESKTOP/PHP Desktop.app/Contents/Resources/www
[1121/192651.545286:INFO:mongoose_server.cpp(102)] index_files=index.html,index.php
[1121/192651.545309:INFO:mongoose_server.cpp(107)] cgi_interpreter=/Volumes/EXT/Dropbox/WORK/BOL PROCESSOR/BP3/PHP_DESKTOP/PHP Desktop.app/Contents/MacOS/php-cgi
[1121/192651.545314:INFO:mongoose_server.cpp(125)] cgi_pattern=**.php$
[1121/192651.545319:INFO:mongoose_server.cpp(174)] hide_files_patterns=
[1121/192651.545324:INFO:mongoose_server.cpp(191)] cgi_environment=TMP=/tmp,TEMP=/tmp,TMPDIR=/tmp,SERVER_NAME=127.0.0.1,SERVER_ADDR=127.0.0.1,PHPDESKTOP_VERSION=130.0
[1121/192651.545809:INFO:mongoose_server.cpp(228)] Mongoose url: http://127.0.0.1:49618/
[1121/192651.545863:INFO:main.mm(241)] remote_debugging_port = 60732
[1121/192651.545871:INFO:main.mm(251)] Initialize CEF
etc.

The difference may be that you are using the Windows version. I am running the MacOS one.

@cztomczak cztomczak added the v130 label Nov 21, 2024
@cztomczak
Copy link
Owner

On Windows setting fixed port works OK.
Bernard reports that it doesn't work on Mac.

@cztomczak cztomczak changed the title Fix server port to validate bookmarks throughout sessions Mac: Fix server port to validate bookmarks throughout sessions Nov 21, 2024
@oleteacher
Copy link

My bad. Totally missed the MAC. Try to do better next time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants