question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Open PHP Page and Get Error

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ritwickdeycommented, Dec 14, 2017

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

0reactions
ritwickdeycommented, Dec 14, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display All PHP Errors: Basic & Advanced Usage
Quickly Show All PHP Errors​​ The quickest way to display all php errors and warnings is to add these lines to your PHP...
Read more >
Detailed error on fopen - php - Stack Overflow
Now I contantly get error Could not open file. I checked the file path and even changed the permissions of the file to...
Read more >
How to display errors in PHP file? - Tutorialspoint
The quickest way to display all php errors and warnings is to add these lines to your PHP code file: ini_set('display_errors', 1); ini_set(' ......
Read more >
Error Messages Explained - Manual - PHP
PHP returns an appropriate error code along with the file array. The error code can be found in the error segment of the...
Read more >
How to Display Errors in PHP Pages - YouTube
Twitter: @webpwnizedThank you for watching. Please help! Up vote, subscribe or even support this channel at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found