Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upper case letter in the database/company name .....
02-12-2014, 04:09 PM,
#51
RE: upper case letter in the database/company name .....
Hi Exson and Tim,

Exson, thank you for verifying the database name requirements.

As mentioned, the bug in the case of the logic I mentioned was in the installer, which was supposed to force the creation of the company directory to lower case but didn't.

In answer to Tim, Why is ConnectDB involved?
Since the database name was obfuscated for security reasons so it did not show in the login screen and login HTML source code, the databases and company display names are held in an array in the config file.

This array is matched in ConnectDB to ensure we have a company directory setup for that database and that directory was intended to be lower case (if created by the installer as intended).

People may use other applications with webERP - for example I keep every website in some SCM - such as subversion or git or monotone. In other cases people have integrated other applications to work with webERP. Sometimes people backup and/or move the company directory off server perhaps to a different based operating system and sometimes need to restore. There are many situations that would not be known to us.

The company directory was supposed to be forced to lowercase to eliminate any potential problems with case sensitivity or insensitivity that arise due to operating systems. This is growing less, and so are the cases of software that do not also discriminate between case but they are still around.

In these cases, there is potential to copy, rename, move, duplicate etc the wrong case name and lead to problems - more probability with the company directory than anywhere else. I've had direct experience with it and dealt with people that have with other applications outside of webERP so I guess it is in my mind.

In any case (no pun intended :p ) if it is decided to implement the intended logic, then we should make provision for older installs. If not the code is fine as is probably for many uses and users.

You may find some more info by searching in google - "problems with case sensitivity and directory name" or similar.

My intent was just to respond here as I was notified there was a bug, but I've not been able to get back here until now to comment.
Reply
02-12-2014, 06:14 PM,
#52
RE: upper case letter in the database/company name .....
Hi Jo,

Thanks for the explanations.

I have seen windows/Linux/ and Mac servers with webERP setup and working for many years with upper case database names, so I am not convinced that it causes any issue on an OS level.

(02-12-2014, 04:09 PM)icedlava Wrote: This array is matched in ConnectDB to ensure we have a company directory setup for that database and that directory was intended to be lower case (if created by the installer as intended).

There are two things that spring to mind here,

1 The user can only get as far as ConnectDB if they have a database name that exactly matches the directory name, including case, so what was happening was that (for those with upper case characters in their DB name) the change to ConnectDB was altering the value that was in the SESSION variable for the DB name, thereby causing webERP to crash out with a strange error message. It seems to me that if the user gets to this point in ConnectDB they must have a system that would work, so if a check is necessary this is the wrong place.

2 We must not assume that the user will use the installer. The Installer basically sets up a system for westernised Manufacturing/Distribution business. We have an sql dump that sets it up for an African hospital, and it is far easier to just manually install that DB and create a config.php from the config.distrib.php file. The alternative is to set up the default chart and then go through deleting out accounts and creating new which is long winded. Doing this means we can have whatever characters we want in the DB name as long as they are acceptable to mysql.

Tim
Reply
02-16-2014, 07:16 PM,
#53
RE: upper case letter in the database/company name .....
Hi Tim,

(02-12-2014, 06:14 PM)Forums Wrote: I have seen windows/Linux/ and Mac servers with webERP setup and working for many years with upper case database names, so I am not convinced that it causes any issue on an OS level.
The bug I'm talking about has nothing to do with database name. The database name, as previously mentioned should be able to be upper or lower case and have special characters which Exson has confirmed, is the case.

Quote: It seems to me that if the user gets to this point in ConnectDB they must have a system that would work, so if a check is necessary this is the wrong place.
I would agree however it's not the way webERP has worked - ever since I've used it connectDB had a check of directory against database name. It's still there under the provision for 'old' setups. I just created a variant for the new secure database name check and logic if lowercase directory name is to be used. As mentioned, the bug in this logic, was not in connectdb but in the installer that should have setup a lower case company name directory.

Quote:2 We must not assume that the user will use the installer.
Of course, no need to say more.

As mentioned previously, just providing the logic behind the changes for the new installer and obfuscation of database name, and notifying of what the bug was related to that logic.

If the code works now and you're happy with it, keep the old logic in the code, which then points to a bug in connectDB that has been fixed fix applied.

Cheers,

Reply
02-16-2014, 08:16 PM,
#54
RE: upper case letter in the database/company name .....
Hi Jo,

I still don't see the issue, but that is obviously just me being slow Smile

So long as any solution allows both the database name and the directory name to have mixed case as long as they are identical, then I am happy. Any manual or legacy systems will then continue to work, which was my previous concern.

Thanks
Tim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)