This project has moved and is read-only. For the latest updates, please go here.
1

Closed

URL of the database should NOT be case-sensitive

description

The database name in the database's URL is case-sensitive. This is a big problem.
For example, http://worldwater.byu.edu/app/index.php/DurbanSA/services/cuahsi_1_1.asmx?wsdl works.
BUT: http://worldwater.byu.edu/app/index.php/durbansa/services/cuahsi_1_1.asmx?wsdl gives an error "Database not defined".

This is a big problem, because some applications like data.cuahsi.org or HydroDesktop convert the URL's to all lowercase when they are sending the request to HydroServer.
Closed May 8, 2015 at 10:07 PM by sarva
Its fixed!

comments

xenomorph1030 wrote Apr 2, 2015 at 2:22 PM

I think your issue wouldn't be an issue if the installation file was lowercase (durbansa.php vs DurbanSA.php under application/config/installations). The reason being is that MY_Router.php overrides the default router and uses the first segment of the request (default, DurbanSA, etc) for the paths and the name of the installation file. When you use DurbanSA, it finds DurbanSA.php. However, durbansa means it tries to load durbansa.php which does not exist.

If you really wanted the request to be case-insensitive, you can force the first segment to be made lowercase. In application/core/MY_Router.php, under the function _validate_request, add the following as the first line:
    $segments[0] = strtolower($segments[0]);
Your installation file still needs to be lowercase (in fact, a requirement now since the above line changes that segment to lowercase), but your requests can be whatever.