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

Open PHP Page and Get Error #8

Open
MarkSky opened this issue Dec 14, 2017 · 7 comments
Open

Open PHP Page and Get Error #8

MarkSky opened this issue Dec 14, 2017 · 7 comments
Labels

Comments

@MarkSky
Copy link

MarkSky commented Dec 14, 2017

I use this extension to open a php web.
my setting is:

"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.port": 8800,
"liveServer.settings.proxy": {
    "enable": true,
    "baseUri": "/",
    "proxyUri": "http://127.0.0.1:8800"
},

and after starting, the browser display:

Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketOnEnd (_http_client.js:394:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

If I setting it wrong?

@ritwickdey
Copy link
Owner

The error is Error: socket hang up. I'm not quite sure why it is for! I need few info..!

Where your PHP code is running (I mean, at which port) ?

@MarkSky
Copy link
Author

MarkSky commented Dec 14, 2017

Do you mean the liveServer setting in my VSCode?
I use '8800'.

@ritwickdey
Copy link
Owner

No! No! Not Live Server, forget about Live Server. If you don't have live server, what you'll do to test the PHP code ? (May be you'll start XAMPP or IIS or through CLI).

@MarkSky
Copy link
Author

MarkSky commented Dec 14, 2017

Oh! I know what you mean. I don't use other sever. I thought Live Server could replace IIS Express. So I didn't run any server.

@ritwickdey
Copy link
Owner

Sorry! "Live Server Web Extension" for live reload, not serving the page. I know the documentation is not clear - I apologized for it.

You need 2 server, one that will server your page. Another for live reload

@MarkSky
Copy link
Author

MarkSky commented Dec 14, 2017

Ok, thank you for your reply.

@ritwickdey
Copy link
Owner

Run the php code through IIS Express or something like that. (Assuming the port in 3000)

live server config:

"liveServer.settings.CustomBrowser": "chrome",
"liveServer.settings.port": 8800,
"liveServer.settings.proxy": {
    "enable": true,
    "baseUri": "/",
    "proxyUri": "http://127.0.0.1:3000"
},

Now use the 127.0.0.1:8800 for live reload.

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

2 participants