|Anonymous | Login | Signup for a new account||2021-10-20 02:06 PDT|
|Main | My View | View Issues | Change Log | Roadmap | Summary | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007817||opensim||[REGION] OpenSim Core||public||2016-01-23 01:58||2017-04-14 12:24|
|Platform||PC||Operating System||Windows||Operating System Version||Seven|
|Target Version||Fixed in Version||master (dev code)|
|Summary||0007817: file_get_contents no longer works with 0.9.x on simstatus page|
|Description||The php function "file_get_contents" no longer works correctly with OpenSim v0.9.x. You can test it with the script provided below.|
If you try OpenSim v0.8.x everything works properly, normal speed
If you try OpenSim v0.9.x it does NOT works properly, very very slow speed
edit : work perfectly with curl
|Steps To Reproduce||<?php|
$url = "http://IP:PORT/simstatus/"; [^]
$simstatus = file_get_contents($url);
if ($simstatus == "OK") echo "Online";
else echo "Offline";
|Tags||No tags attached.|
|Git Revision or version number|
|Run Mode||Grid (Multiple Regions per Sim)|
|Environment||.NET / Windows32|
From http://php.net/manual/en/function.file-get-contents.php [^]
Bear in mind that contrary to the behavior of web browsers, file_get_contents doesn't return the result when the web page is fully downloaded (i.e. HTTP payload length = value of the response HTTP "Content-Length" header) but when the TCP connection is closed.
tcpdump makes clear that file_get_contents is still waiting for [FIN, ACK] when the HTTP response has been received one minute ago.
Although OS HTTP server answers 'Connection: close' in all versions, it does not actually close the connection since commit bcb27d4 or over. Try:
http://grid.pescadoo.net:9011/simstatus/ [^] /* 0.9 bcb27d4 2015-11-15 */
http://grid.pescadoo.net:9050/simstatus/ [^] /* 0.9 109723d 2016-01-26 */
Also note that this behaviour is the rule for LSL scripts in all versions, so file_get_contents will timeout for 0.8 scripts also.
Using Content-Length to detect end of conversation, curl is not subject to this issue.
edited on: 2016-01-27 01:34
I hope that we can find file_get_contents as it worked well in the past with 0.8.x
Quite simply ...
I re test the php function "file_get_contents" today with the Master Dev code to get simstats content but i see any changes for now.
Before, in OpenSim v0.8.x it was working fine but it does not work v0.9.x
Think you can make it work properly as it was before ?
If this is a regression, I'd like to fix it.
However, I will not be able to fix anything that involves PHP.
So, please restate this issue in a way that I can see what the problem is. I don't do PHP. Start with this:
- How do I enable simstatus?
- What's the expected return from calling http://IP:PORT/simstatus/? [^]
- What do you get that is erroneous in 0.9 but ok in 0.8.2?
simstatus is enable by default and i don't remember where disable it
(i know this is possible).
if enable it will return "OK"
in OS v0.9.x the response time is huge and causes a timeout error.
edited on: 2016-06-21 10:36
Unable to reproduce. The response is immediate on my test grids, both localhost and on a university server.
I used a web browser. If that doesn't do it, please provide another way for me to reproduce the problem that is not PHP.
edited on: 2016-06-21 11:19
In the [Network] section i have this port for 0.9
http_listener_port = 12100
and this port for 0.8
http_listener_port = 12000
So I tested with the script provided above
with the urls http://mydomain:12000/simstatus/ [^]
and http://mydomain:12100/simstatus/ [^]
PS: i send to you a url url in IM on IRC
New test repport:
- Tested with opensim master (2017-04-14) in STANDALONE mode and in GRID mode
http://opensimulator.org/viewgit/?a=commit&p=opensim&h=22e9647748f0ca5b5bcd0c31667d2d5f263715bc [^] [^]
- OS : Windows 7 (32bits)
- .NET Framework : 4.6.2
- Tested with the PHP script provided above
It is working properly again :)
|2016-01-23 01:58||djphil||New Issue|
|2016-01-26 04:36||djphil||Description Updated||View Revisions|
|2016-01-27 00:46||JeffKelley||Note Added: 0030027|
|2016-01-27 01:33||djphil||Note Added: 0030028|
|2016-01-27 01:34||djphil||Note Edited: 0030028||View Revisions|
|2016-06-14 08:35||djphil||Note Added: 0030521|
|2016-06-21 09:40||Diva||Note Added: 0030619|
|2016-06-21 10:20||djphil||Note Added: 0030628|
|2016-06-21 10:24||Diva||Note Added: 0030629|
|2016-06-21 10:36||Diva||Note Edited: 0030629||View Revisions|
|2016-06-21 10:53||djphil||Note Added: 0030630|
|2016-06-21 11:19||djphil||Note Edited: 0030630||View Revisions|
|2017-04-14 12:24||djphil||Note Added: 0031752|
|2017-04-14 12:24||djphil||Status||new => resolved|
|2017-04-14 12:24||djphil||Fixed in Version||=> master (dev code)|
|2017-04-14 12:24||djphil||Resolution||open => fixed|
|2017-04-14 12:24||djphil||Assigned To||=> djphil|
|2017-04-14 12:24||djphil||Status||resolved => closed|
|Copyright © 2000 - 2012 MantisBT Group|