User Details
- User Since
- Jun 22 2016, 7:51 PM (438 w, 3 d)
- Availability
- Available
Oct 6 2017
May 16 2017
Nice! The discussion is those two are interesting. Thanks for the links!
Interesting read. Indeed, our code is already committed and pushed (in feature branches), so Audit seems the way to go, but reviewing commits one by one is absolutely not the desired outcome.
Aug 27 2016
This didn't change the output. However, you can see I posted another solution.
Okay, I think I'm into something. I logged the requests to see the differences between the one with curl command line that works, and the one from arcanist that fials.
Corrected the ip in the logs
Yes, I got that output:
Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 11.22.33.44... * Connected to my.phabserver.com (11.22.33.44) port 8080 (#0) > POST /api/conduit.ping HTTP/1.1 > Host: my.phabserver.com:8080 > User-Agent: curl/7.50.1 > Accept: */* > Content-Length: 35 > Content-Type: application/x-www-form-urlencoded > * upload completely sent off: 35 out of 35 bytes < HTTP/1.1 200 OK < X-Powered-By: PHP/5.6.25 < Set-Cookie: phsid=A%2Fx3d7s2ghnuyafelgkpilokjdmu3lw2rxvnkwcpcm; expires=Thu, 26-Aug-2021 04:37:41 GMT; Max-Age=157680000; path=/; domain=my.phabserver.com; httponly < X-Frame-Options: Deny < Content-Type: application/json < Cache-Control: no-store < Expires: Sat, 01 Jan 2000 00:00:00 GMT < X-Content-Type-Options: nosniff < Content-Length: 61 < Date: Sat, 27 Aug 2016 04:37:41 GMT < Server: lighttpd/1.4.41 < * Connection #0 to host my.phabserver.com left intact {"result":"someserver","error_code":null,"error_info":null}
I don't have https enabled on my phabricator instance. Could it be related to my problem?
for domain:
domain string(15) "my.phabserver.com"
No, it's a DNS name from https://freedns.afraid.org/
I still got the 404 error even with php 5.6. Here's my php -v output:
PHP 5.6.25 (cli) (built: Aug 26 2016 20:28:05) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
I even removed php7 from my machine.
I got exactly the same error as before...
This is my php -v output... Does it have to do with the fact that I run PHP 7? But even so, like you said, it worked on secure.
PHP 7.0.10 (cli) (built: Aug 21 2016 07:35:18) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
It's on arch linux, fully updated from today. My server is arch linux too, but I installed PHP 5.6 on it.
Aug 26 2016
I tried a couple of things, it seems it fails when trying to ping the server. This line $conduit->callMethodSynchronous('conduit.ping', array()); will throw the error, even though it clearly worked with curl.
Okay, so var_dump($uri) shows me that:
string(32) "http://my.phabserver.com:8080/api/"
I tried the address http://my.phabricator.com:8080/api/conduit.connect and it returned me a json that look like this:
{"result":null,"error_code":"ERR-INVALID-USER","error_info":"The username you are attempting to authenticate with is not valid."}
I don't think, with my current configuration, the port 80 is not accessible (limitation from my ISP), so I highly doubt I went through the wrong port.
Yes, arc install-certificate https://secure.phabricator.com/api/ is working. Does it has to do with my custom port 8080 or it should be supported?
No. No proxy and no vpn.
It shows this:
HTTP/1.1 200 OK X-Powered-By: PHP/5.6.25 Set-Cookie: phsid=A%2F72hqw6cmi3przavtmn3rayh57g5yo5utgibbrwza; expires=Wed, 25-Aug-2021 22:37:37 GMT; Max-Age=157680000; path=/; domain=my.phabricator.com; httponly X-Frame-Options: Deny Content-Type: application/json Cache-Control: no-store Expires: Sat, 01 Jan 2000 00:00:00 GMT X-Content-Type-Options: nosniff Content-Length: 61 Date: Fri, 26 Aug 2016 22:37:37 GMT Server: lighttpd/1.4.41
Yes, from my browser it shows {"result":"someservername","error_code":null,"error_info":null} when I typed http://my.phabricator.com:8080/api/conduit.ping.
Here's my output for arc install-certificate --trace:
ARGV '/home/master/build/arcanist/bin/../scripts/arcanist.php' 'install-certificate' '--trace' LOAD Loaded "phutil" from "/home/master/build/libphutil/src". LOAD Loaded "arcanist" from "/home/master/build/arcanist/src". Config: Did not find user configuration at "/home/master/.arcrc". Config: Did not find system configuration at "/etc/arcconfig". Working Copy: Reading .arcconfig from "/home/master/prog/myproject/.arcconfig". Working Copy: Path "/home/master/prog/myproject" is part of `git` working copy "/home/master/prog/myproject". Working Copy: Project root is at "/home/master/prog/myproject". Config: Did not find local configuration at "/home/master/prog/myproject/.git/arc/config". CONNECT Connecting to "http://my.phabricator.com:8080/api/"... >>> [0] <conduit> conduit.ping() <bytes = 39> >>> [1] <http> http://my.phabricator.com:8080/api/conduit.ping <<< [1] <http> 71,707 us <<< [0] <conduit> 72,471 us Usage Exception: Failed to connect to server (http://my.phabricator.com:8080/api/): [HTTP/404] Not Found <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>404 - Not Found</title> </head> <body> <h1>404 - Not Found</h1> </body> </html>
I noticed that my host regex matcher differs from the configuration tutorial found here: https://secure.phabricator.com/book/phabricator/article/configuration_guide/#webserver-configuring-li
I see. Good to know.
The aur package actually clone from your git, so versioning should not be a problem.
I installed the latest arcanist through aur: https://aur.archlinux.org/packages/arcanist-git/
I edited the question to add my configuration of lighttpd. I also changed the address to reflect more the real one.
When I type http://myphabserver.com/api/ in the browser, I get the phabricator 404, but I assume that you shouldn't try to request the api in the browser directly.