adding check for port in configuration because mysqli does not handle host names with the port included
Merge branch 'mysqli-add-port'
Clean up some old scripts in libphutil

Summary:
  - `envinfo.php` has been obsoleted by:
    - `__init_script__.php` just sets all this stuff to the right value now.
    - `support/debug.php` provides a more general mechanism to get arbitrary environmental data from users.
  - `kill_init.php` facilitated the removal of `__init__.php` files, but we did that a long time ago and I haven't seen any users run into issues in many months.

Test Plan: N/A

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6377
Fix remarkup "NOTE" block syntax

Summary: Currently, HTML in NOTE blocks gets escaped, because the "rtrim()" applies to a PhutilSafeHTML object and implicitly converts it to (unsafe) string. Instead, trim first.

Test Plan: Typed `NOTE: **x**` into remarkup, saw bold "x".

Reviewers: btrahan, garoevans, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6379
Add test coverage for PhutilErrorHandler and silence operator ("@")

Summary:
Fixes T3351. The situation is actually less dire than the comment implies, I had slightly misrembered context. Basically:

  - PhutilErrorHandler respects the silence operator ("@"); I'm not sure if it did at the time.
  - Part of the issue was stack traces for unrelated things, but PhutilOpaqueEnvelope solved that.

Test Plan:
  - Added test coverage for the beahvior of "@".
  - Hit LDAP exceptions and verified nothing sensitive appeared in the traces/logs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3351

Differential Revision: https://secure.phabricator.com/D6390
Add service call profiling to LDAP

Summary: We don't pick up LDAP calls in the service profiler, but should. Replaces some slightly more detailed but nonstandard and invasive debugging code, since LDAP seems stable now.

Test Plan:
  $ ~/src/php-src/sapi/cli/php -f ./bin/auth ldap --trace
  >>> [2] <connect> phabricator2_auth
  <<< [2] <connect> 1,755 us
  >>> [3] <query> SELECT * FROM `auth_providerconfig`  ORDER BY id DESC
  <<< [3] <query> 423 us
  Enter LDAP Credentials

      LDAP Username:  ldapuser
  >>> [4] <exec> $ stty -echo
  <<< [4] <exec> 10,370 us

      LDAP Password:  >>> [5] <exec> $ stty echo
  <<< [5] <exec> 6,844 us

  Connecting to LDAP...
  >>> [6] <ldap> connect (127.0.0.1:389)
  <<< [6] <ldap> 12,932 us
  >>> [7] <ldap> bind (sn=ldapuser,ou=People, dc=aphront, dc=com)
  <<< [7] <ldap> 6,860 us
  >>> [8] <ldap> search (ou=People, dc=aphront, dc=com, sn=ldapuser)
  <<< [8] <ldap> 5,907 us
  Found LDAP Account: ldapuser

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6391
Don't apply inline rules in Literal remarkup blocks

Summary:
  - Long ago, we applied HTML escaping in literal block rules (`%%% .. %%%`) by using an HTML inline rule.
    - We no longer need to do this, so literal blocks don't need to apply inline rules at all.
  - I think I imagined that certain block rules might want nonstandard inline rules when building Remarkup originally.
    - They never do and we don't have any use cases on the horizon where they might.

This allows us to simplify remarkup code in Phabricator.

Test Plan: Typed `%%% <strong>!!</strong> %%%` into Remarkup and made sure it was still escaped properly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6395
Improve test for NOTE Remarkup rule

Test Plan:
  lang=diviner
  NOTE: Amazon SES **requires you to verify your "From" address**. Configure which
  "From" address to use by setting "##metamta.default-address##" in your config,
  then follow the Amazon SES verification process to verify it. You won't be able
  to send email until you do this!

Blame Rev: D6319

Reviewers: garoevans, epriestley

Reviewed By: epriestley

CC: aran, epriestley, btrahan, Korvin

Differential Revision: https://secure.phabricator.com/D6380
Allow extracting variables from XHPAST strings

Test Plan: New unit test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6405
Let PHP decide whether to use int or float in evalStatic()

Test Plan: `XHPASTTreeTestCase` on 32 bits.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6412
Let PHP decide whether to use int or float in evalStatic()

Amends D6412.

Auditors: epriestley
Merge remote-tracking branch 'upstream/master'