I did some poking in the server library and came to the conclusion that is reading my credentials file just fine. Just to make sure there were no credentials issues I made everything authorized while I am trying to sort this problem out running on my VM:
{
"cadorn.org/insight/@meta/config/0": {
"allow": {
"ips": [
"*"
],
"authkeys": [
"*"
]
}
}
}
What is happening in the code its self is that it is getting to line 417 of Insight_Helper and it is detecting the following $clientInfo:
array(1) { ["client"]=> string(7) "firephp" }
This is causing it to set the header of the x-insight-installation-id and then return false.
This appears to indicate that the client is not announcing its self.
Here are my request and response headers:
Cache-Control | no-store, no-cache, must-revalidate, post-check=0, pre-check=0 |
Connection | Keep-Alive |
Content-Encoding | gzip |
Content-Length | 1962 |
Content-Type | text/x-json |
Date | Wed, 19 Dec 2012 21:54:40 GMT |
Expires | Thu, 19 Nov 1981 08:52:00 GMT |
Keep-Alive | timeout=15, max=67 |
Pragma | no-cache |
Server | Apache/2.2.16 (Debian) |
Set-Cookie | ZDEDebuggerPresent=php,phtml,php3; path=/ |
Vary | Accept-Encoding |
X-Powered-By | PHP/5.3.14 ZendServer/5.0 |
x-insight-installation-id | com.switchsoft.local |
Accept | */* |
Accept-Encoding | gzip, deflate |
Accept-Language | en-US,en;q=0.5 |
Connection | keep-alive |
Content-Length | 350 |
Content-Type | application/json; charset=UTF-8 |
Cookie | ZDEDebuggerPresent=php,phtml,php3; PHPSESSID=5bmbdcksrrjmui0f61o87hb0l0 |
Host | local.switchsoft.com |
Referer | http://local.switchsoft.com/event/reader |
User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 |
X-Requested-With | XMLHttpRequest |
I notice that on firephp.org the following request headers are sent:
x-insight-client | 1 |
x-request-id | 1355945592312772 |
I am not seeing these headers generated when I test my code.
Just in case it's relevant here is my package.json file as well:
{
"uid": "http://local.switchsoft.com/",
"implements": {
"/": {
"credentialsPath": "./credentials.json",
"encoder": {
"depthNoLimit": true,
"lengthNoLimit": true,
"maxDepth": 5,
"maxStringLength": 15000,
"maxArrayDepth": 3,
"maxArrayLength": 100,
"maxObjectDepth": 3,
"maxObjectLength": 100,
"exception.traceMaxLength": -1,
"trace.maxLength": -1
}
}
}
}
I suspect this may be an issue of incompatible versions of firefox, firebug and developer companion.
Any advice any one can give me would be greatly appreciated.
Thanks in advance and best regards
Will Ferrer
Homepage URL: http://local.switchsoft.com
Response Status: 204
Response Headers:
Date: Mon, 24 Dec 2012 21:55:05 GMT
Server: Apache/2.2.16 (Debian)
X-Powered-By: PHP/5.3.14 ZendServer/5.0
Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/
x-insight-installation-id: com.switchsoft.local
Status: 204 No Content
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/htm
Hi ChrisitophThank you so much for the response. I can get to the developer companion window now but when I try to add the new work space I get this error:
Any insights you can give me would be greatly appreciated.I hope you are having a great holiday season.Best regardsWill Ferrer
On Thursday, December 20, 2012 7:18:33 PM UTC-8, Christoph Dorn wrote:
--
You received this message because you are subscribed to the Google Groups "DeveloperCompanion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/devcomp/-/gtIL1ubs_nUJ.
To post to this group, send email to dev...@googlegroups.com.
To unsubscribe from this group, send email to devcomp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/devcomp?hl=en.
Thanks for the detailed report.Did you setup a workspace for http://local.switchsoft.com/ in DeveloperCompanion? I suspect this is why the headers are not sent properly.Christoph
On Wednesday, 19 December 2012 14:15:45 UTC-8, will....@switchsoft.com wrote: --
You received this message because you are subscribed to the Google Groups "DeveloperCompanion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/devcomp/-/ZciNElh_aw8J.
To post to this group, send email to dev...@googlegroups.com.
To unsubscribe from this group, send email to devcomp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/devcomp?hl=en.
--
You received this message because you are subscribed to the Google Groups "DeveloperCompanion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/devcomp/-/49ouFI7vqbgJ.
To post to this group, send email to dev...@googlegroups.com.
To unsubscribe from this group, send email to devcomp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/devcomp?hl=en.
With define('INSIGHT_DEBUG', true); on I get: [INSIGHT] Flushing headersWhen I try to add the work space I don't see any xhr requests on the page that gives me the error message, so I am not sure how I would check the Response Body output (how is it making the request?).
The php.log gives me just a warn when trying to add a work space (though it may be a clue):
[29-Dec-2012 01:24:11 UTC] PHP Warning: unlink(/tmp/cadorn.org/insight/_transport/): Is a directory in [path to my php library folder]/firephp/lib/Insight/Helper.php on line 566the error.log gives this.[Fri Dec 28 17:28:22 2012] [error] [client 192.168.0.15] Attempt to serve directory: /var/[path to public folder]This request should be caught by my vhost and redirected to index.The thing that's odd is a normal request gives a different message in the error.log:[Fri Dec 28 17:32:39 2012] [error] [client 192.168.0.15] Directory index forbidden by Options directive: /var/[path to public folder]I wounder if that's a hint as well.
Thank you once again for the prompt and clear response. I really appreciated the assistance getting it up and running again.
The package.json file you sent earlier has a key of "/" in the "implements" property where it should be "cadorn.org/insight/@meta/config/0 ".
See: http://sourcemint.com/github.com/firephp/firephp/1/-docs/Configuration/Files
It should include a "Response Body" section in the result output after clicking "create workspace" in the dialog.
Hmm.
So when you access http://local.switchsoft.com/ in your browser you should get a page served by PHP that includes FirePHP/Insight and responds with a status code of 200.
When you use "http://local.switchsoft.com/" in the new workspace dialog it will connect to FirePHP/Insight running at "http://local.switchsoft.com/".
No problem. The setup process is not as fault tolerant as I like it yet. I have some ideas to improve it.
If you cannot get it running with the above info feel free to ping me on skype and we can do a shared screen session to see what is going on.
SkypeID: christophdorn
array(14) {
["Host"]=>
string(20) "local.switchsoft.com"
["User-Agent"]=>
string(84) "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 FirePHP/0.4"
["Accept"]=>
string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
["Accept-Language"]=>
string(14) "en-US,en;q=0.5"
["Accept-Encoding"]=>
string(13) "gzip, deflate"
["Connection"]=>
string(10) "keep-alive"
["Content-Type"]=>
string(48) "application/x-www-form-urlencoded; charset=UTF-8"
["x-insight"]=>
string(5) "serve"
["Content-Length"]=>
string(3) "144"
["Cookie"]=>
string(71) "ZDEDebuggerPresent=php,phtml,php3; PHPSESSID=lct2o2uo1iejbhd52i6ev2scp7"
["x-insight-client"]=>
string(1) "1"
["x-request-id"]=>
string(16) "1357086686776606"
["Pragma"]=>
string(8) "no-cache"
["Cache-Control"]=>
string(8) "no-cache"
}
I decided to take one more stab at tracking this down in the code and wanted to share my findings.
when I try to add a work space, on line 125 of Insight_Server the 204 status is being generated. The reason is because the $_GET array is empty (as is the $_POST array) so the $response variable isn't being populated. Basically when I try to add a work space no "payload" is being sent to the server inside the post data even the code is expecting it.
track_vars
` at
http://php.net/manual/en/ini.core.php which must be `on`. Maybe this is
turned off on your zend server install. Also see `variables_order
` config option which should
contain `P` and `enable_post_data_reading
` must be on.I finally managed to fix it though I am still unclear to why exactly it wasn't working.
Finally I pointed the DirectoryIndex at the new correct path to our index.php and that made dev companion start working again.I don't know why this is a problem only for dev companion and not the rest of our applications but I am really glad to have it working again. Any ideas?
Thank you once again for all your great assistance on the problem and for putting together such a great tool. You really went above and beyond helping us out.