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

when run php server got errors in browser #1377

Closed
Codenator81 opened this issue Nov 17, 2016 · 11 comments
Closed

when run php server got errors in browser #1377

Codenator81 opened this issue Nov 17, 2016 · 11 comments

Comments

@Codenator81
Copy link

Codenator81 commented Nov 17, 2016

When run php -S localhost:8080 got error in browser
also try symfony command php app/console server:run
Failed to load resource: net::ERR_CONNECTION_RESET

I tried switch off antivirus and firewall without luck

php version is 7

Windows : 14965.1001

@ddfznt
Copy link

ddfznt commented Nov 17, 2016

@Codenator81
Copy link
Author

Codenator81 commented Nov 17, 2016

@ddfznt tried that. not help. same time works in Edge. But in firefox and chrome all way got error when disable cache checked. without disable cache it is works after multiple reloads. It looks like he cant load random resources at time because whendisable cache` off all resources loaded in cache after multiple times reloading. Can be permission on reading files?
My web root located in c/mnt/web directory

@dsabolo
Copy link

dsabolo commented Nov 18, 2016

Hi @Codenator81 , I've assume your directory is misspelled , it should be /mnt/c/web

@Codenator81
Copy link
Author

@dsabolo Yes I wrote wrong path in example. Thanks.

@misenesi
Copy link

Could you please provide complete repro steps along with strace log? Thanks!

@Codenator81
Copy link
Author

@misenesi Sorry I can`t because I buy mac book pro and give up on it

@LordMonoxide
Copy link

I'm having this same issue. Using the php built-in web server, when large(ish) files are accessed (I'm talking like <200kb, javascript files), I get "connection reset" nearly 100% of the time. It seems more frequent the larger the file is. This happens on PHP5.6 as well as 7.1. Smaller files are served fine.

Here's an strace from 5.6... you can clearly see it reading the file and sending it. I have basically no experience reading through straces but the brk after sending headers strikes me as strange.

select(6, [5], [], NULL, {1, 0})        = 1 (in [5], left {0, 665283})
accept(5, {sa_family=AF_INET, sin_port=htons(50625), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6
fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
recvfrom(6, "GET /AzAdmin/aui/js/aui-all.js?v"..., 16383, 0, NULL, NULL) = 491
stat("/home/corey/git/az/crm/app/webroot/AzAdmin/aui/js/aui-all.js", {st_mode=S_IFREG|0664, st_size=626371, ...}) = 0
gettimeofday({1480959042, 154458}, NULL) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGPROF, {0x7f3098a49ae0, [PROF], SA_RESTORER|SA_RESTART, 0x7f3096a05860}, {SIG_DFL, [], SA_RESTORER, 0x7fd21c265860}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
getcwd("/home/corey/git/az/crm/app/webroot", 4095) = 35
fcntl(4, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1}) = 0
getcwd("/home/corey/git/az/crm/app/webroot", 4096) = 35
getcwd("/home/corey/git/az/crm/app/webroot", 4096) = 35
time(NULL)                              = 1480959042
lstat("/home/corey/git/az/crm/app/webroot/./index.php", {st_mode=S_IFLNK|0777, st_size=38, ...}) = 0
readlink("/home/corey/git/az/crm/app/webroot/./index.php", "../../plugins/AzCore/webroot/ind"..., 4096) = 38
lstat("/home/corey/git/az/crm/app/webroot/./../../plugins/AzCore/webroot/index.php", {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
lstat("/home/corey/git/az/crm/app/webroot/./../../plugins/AzCore/webroot", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az/crm/app/webroot/./../../plugins/AzCore", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az/crm/app/webroot/./../../plugins", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az/crm/app/webroot", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az/crm/app", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az/crm", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git/az", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey/git", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home/corey", {st_mode=S_IFDIR|0775, st_size=0, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/home/corey/git/az/crm/plugins/AzCore/webroot/index.php", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
fstat(7, {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
fstat(7, {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
fstat(7, {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
mmap(NULL, 4030, PROT_READ, MAP_SHARED, 7, 0) = 0x7f309873a000
stat("/home/corey/git/az/crm/plugins/AzCore/webroot/index.php", {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
gettimeofday({1480959042, 196036}, NULL) = 0
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f30984d0000
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3098480000
fcntl(4, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
munmap(0x7f30984d0000, 266240)          = 0
munmap(0x7f3098480000, 266240)          = 0
fcntl(4, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
munmap(0x7f309873a000, 4030)            = 0
close(7)                                = 0
open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0
mmap(NULL, 26258, PROT_READ, MAP_SHARED, 7, 0) = 0x7f3098734000
close(7)                                = 0
futex(0x7f3096d928a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
access("/home/corey/git/az/crm/app/webroot//AzAdmin/aui/js/aui-all.js", F_OK) = 0
chdir("/home/corey/git/az/crm/app/webroot") = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = -1 EINVAL (Invalid argument)
fcntl(4, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = -1 EINVAL (Invalid argument)
open("/home/corey/git/az/crm/app/webroot/AzAdmin/aui/js/aui-all.js", O_RDONLY) = 7
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
gettimeofday({1480959042, 212051}, NULL) = 0
write(2, "[Mon Dec  5 13:30:42 2016] \33[32m"..., 99[Mon Dec  5 13:30:42 2016] 127.0.0.1:50625 [200]: /AzAdmin/aui/js/aui-all.js?v=5.9.0-dev2
) = 99
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
sendto(6, "HTTP/1.1 200 OK\r\nHost: localhost"..., 130, 0, NULL, 0) = 130
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999998})
brk(0x7fffce392000)                     = 0x7fffce392000
read(7, "!function(){\"use strict\";functio"..., 131072) = 131072
sendto(6, "!function(){\"use strict\";functio"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, " L=G(h[y])[H](u),M=G(q[y])[H](u)"..., 131072) = 131072
sendto(6, " L=G(h[y])[H](u),M=G(q[y])[H](u)"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999996})
read(7, "edCursor),this._storedOpacity&&t"..., 131072) = 131072
sendto(6, "edCursor),this._storedOpacity&&t"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999996})
read(7, "||a.constructor!=Array)throw new"..., 131072) = 131072
sendto(6, "||a.constructor!=Array)throw new"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, ")||this.clearSearch(),b.stopImme"..., 131072) = 102083
sendto(6, ")||this.clearSearch(),b.stopImme"..., 102083, 0, NULL, 0) = 102083
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999996})
read(7, "", 131072)                     = 0
close(7)                                = 0
sendto(6, "", 0, 0, NULL, 0)            = 0
close(6)                                = 0
select(6, [5], [], NULL, {1, 0})        = 1 (in [5], left {0, 848810})
accept(5, {sa_family=AF_INET, sin_port=htons(50626), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6
fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
recvfrom(6, 0x7fffd52a7200, 16383, 0, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0}^Cstrace: Process 625 detached
 <detached ...>

Here's an strace from an actual Linux box running the same code in the same way:

select(6, [5], [], NULL, {1, 0})        = 1 (in [5], left {0, 339283})
accept(5, {sa_family=AF_INET, sin_port=htons(50441), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6
fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
recvfrom(6, "GET /AzAdmin/aui/js/aui-all.js?v"..., 16383, 0, NULL, NULL) = 491
stat("/home/corey/git/az/crm/app/webroot/AzAdmin/aui/js/aui-all.js", {st_mode=S_IFREG|0664, st_size=626371, ...}) = 0
gettimeofday({1480958305, 799227}, NULL) = 0
rt_sigaction(SIGPROF, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGHUP, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGINT, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGQUIT, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGTERM, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGUSR1, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
rt_sigaction(SIGUSR2, NULL, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, 8) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={60, 0}}, NULL) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGPROF, {0x7fb45d099720, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_SIGINFO, 0x7fb45b005860}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
getcwd("/home/corey/git/az/crm/app/webroot", 4095) = 35
getcwd("/home/corey/git/az/crm/app/webroot", 4096) = 35
fcntl(4, F_SETLK, {l_type=F_RDLCK, l_whence=SEEK_SET, l_start=1, l_len=1}) = 0
getcwd("/home/corey/git/az/crm/app/webroot", 4096) = 35
time(NULL)                              = 1480958305
stat("/home/corey/git/az/crm/plugins/AzCore/webroot/index.php", {st_mode=S_IFREG|0664, st_size=4030, ...}) = 0
gettimeofday({1480958305, 833899}, NULL) = 0
access("/home/corey/git/az/crm/app/webroot//AzAdmin/aui/js/aui-all.js", F_OK) = 0
chdir("/home/corey/git/az/crm/app/webroot") = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = -1 EINVAL (Invalid argument)
fcntl(4, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = -1 EINVAL (Invalid argument)
open("/home/corey/git/az/crm/app/webroot/AzAdmin/aui/js/aui-all.js", O_RDONLY) = 7
gettimeofday({1480958305, 840089}, NULL) = 0
time(NULL)                              = 1480958305
open("/usr/share/zoneinfo/America/Halifax", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=3438, ...}) = 0
read(8, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) = 20
lseek(8, 0, SEEK_SET)                   = 0
mmap(NULL, 3438, PROT_READ, MAP_SHARED, 8, 0) = 0x7fb45cde8000
close(8)                                = 0
munmap(0x7fb45cde8000, 3438)            = 0
gettimeofday({1480958305, 847425}, NULL) = 0
write(2, "[Mon Dec  5 13:18:25 2016] \33[32m"..., 99[Mon Dec  5 13:18:25 2016] 127.0.0.1:50441 [200]: /AzAdmin/aui/js/aui-all.js?v=5.9.0-dev2
) = 99
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
sendto(6, "HTTP/1.1 200 OK\r\nHost: localhost"..., 161, 0, NULL, 0) = 161
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, "!function(){\"use strict\";functio"..., 131072) = 131072
sendto(6, "!function(){\"use strict\";functio"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, " L=G(h[y])[H](u),M=G(q[y])[H](u)"..., 131072) = 131072
sendto(6, " L=G(h[y])[H](u),M=G(q[y])[H](u)"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999996})
read(7, "edCursor),this._storedOpacity&&t"..., 131072) = 131072
sendto(6, "edCursor),this._storedOpacity&&t"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999996})
read(7, "||a.constructor!=Array)throw new"..., 131072) = 131072
sendto(6, "||a.constructor!=Array)throw new"..., 131072, 0, NULL, 0) = 131072
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, ")||this.clearSearch(),b.stopImme"..., 131072) = 102083
sendto(6, ")||this.clearSearch(),b.stopImme"..., 102083, 0, NULL, 0) = 102083
select(7, [5], [6], NULL, {1, 0})       = 1 (out [6], left {0, 999997})
read(7, "", 131072)                     = 0
close(7)                                = 0
sendto(6, "", 0, 0, NULL, 0)            = 0
close(6)                                = 0
select(6, [5], [], NULL, {1, 0})        = 1 (in [5], left {0, 861645})
accept(5, {sa_family=AF_INET, sin_port=htons(50442), sin_addr=inet_addr("127.0.0.1")}, [16]) = 6
fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
recvfrom(6, 0x7ffff46fd190, 16383, 0, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0})      = 0 (Timeout)
select(7, [5 6], [], NULL, {1, 0}^Cstrace: Process 571 detached
 <detached ...>

@LordMonoxide
Copy link

Hmm, just found #610, which looks like it's probably the issue

@sunilmut
Copy link
Member

#610 is fixed in Creators Update release. Can someone here with the repro try this on Creators Update and see if you can get a repro? If not, we can close this issue out.

@LordMonoxide
Copy link

I use the internal PHP server nearly every day and haven't had an issue since #610 was addressed

@sunilmut
Copy link
Member

@LordMonoxide - Thanks for your comment. I am closing this issue out. If it reappears, please comment and we can reopen.

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

No branches or pull requests

6 participants