See:
http://www.lunatech-research.com/archives/2009/02/03/what-every-web-developer-must-know-about-url-encoding

The relevant section:

   - "?" is allowed unescaped anywhere *within* a *query* part,
   - "/" is allowed unescaped anywhere *within* a *query* part,
   - "=" is allowed unescaped anywhere *within* a *path parameter* or *query
   parameter* value, and within a *path segment*,
   - *":@-._~!$&'()*+,;=" are allowed unescaped anywhere within a path
   segment part,*
   - *"/?:@-._~!$&'()*+,;=" are allowed unescaped anywhere within a
fragmentpart.
   *

rawurlencode() changes $ to its url encoded version. It is arguable whether
OrientDB should handle this or not, given the rules for url encoding.
However, the fact is that the server currently does not handle this
character when url encoded.

I could write a function that excepts the $ character from url encoding,
while treating the rest the same. This might be the correct compromise
position.

The easiest way to test this is to create a free account on Nuvolabase (
www.nuvolabase.com), and to use this library to access your database
instance. Shared databases on orientdb use $ to separate path parameters,
because all database names must be globally unique on a server. This is the
most obvious case of where this is a problem. I don't think you can have $
in the database name itself... this is an issue of the path to reach the
database (i.e. myusername$myfolder$mydatabasename);


On Tue, Feb 5, 2013 at 3:23 AM, Daniele Alessandri <notifications@github.com
> wrote:

> In src/Doctrine/OrientDB/Binding/HttpBinding.php:
>
> > @@ -58,7 +58,7 @@ protected function getLocation($method, $database = null, array $arguments = nul
> >          $location = "http://{$this->server}/$method";
> >
> >          if ($database) {
> > -            $location .= '/' . rawurlencode($database);
> > +            $location .= '/' . $database;
>
> Why?
>
> Aside from the fact that this is wrong since path parts in URLs must *
> always* be encoded (that alone makes me totally against this change), I
> did a quick test and I don't see any difference when using $ or %24 in
> the database name since I always get 401 Unauthorized. back from the
> server (tested on a Linux system using OrientDB 1.2.0 and Java 1.7.0_09),
> so I believe this is rather a problem of OrientDB with the handling of
> database names with certain characters.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/doctrine/orientdb-odm/pull/161/files#r2891256>.
>
>