Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upper case letter in the database/company name .....
01-04-2014, 07:39 AM, (This post was last modified: 01-04-2014, 07:42 AM by phil.)
#31
RE: upper case letter in the database/company name .....
Sorry to contradict Tim, In fact, upper case characters have never been allowed in webERP company databases - this was just a simple mistake in the installer program - see
the current doc/INSTALL.txt and historical ones too - I am not sure when this was changed probably around 2006?

http://sourceforge.net/p/web-erp/code/33...NSTALL.txt

"WebERP expects each company that it manages to have a separate database. For
example, if you have a company called MyCompany, then it will expect a database
called mycompany (note that it must all be lower case). "

The historical reason for this was because if we ever wanted to change to use some other RDBMS we would side step any case incompatibilities by having used this convention. At the time when I got webERP working with Postgres a lot of work was done to convert all table names, field names and the database names to lower case.

Most hosting companies should allow lower case database names - so I don't view this as a major problem for anyone.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-04-2014, 08:05 AM,
#32
RE: upper case letter in the database/company name .....
(01-04-2014, 07:39 AM)phil Wrote: Sorry to contradict Tim, In fact, upper case characters have never been allowed in webERP company databases - this was just a simple mistake in the installer program - see
the current doc/INSTALL.txt and historical ones too - I am not sure when this was changed probably around 2006?

http://sourceforge.net/p/web-erp/code/33...NSTALL.txt

"WebERP expects each company that it manages to have a separate database. For
example, if you have a company called MyCompany, then it will expect a database
called mycompany (note that it must all be lower case). "

The historical reason for this was because if we ever wanted to change to use some other RDBMS we would side step any case incompatibilities by having used this convention. At the time when I got webERP working with Postgres a lot of work was done to convert all table names, field names and the database names to lower case.

Most hosting companies should allow lower case database names - so I don't view this as a major problem for anyone.

Sorry to contradict yolu Phil, but the strtolower() check in includes/ConnectDB.inc went in commit 6196 on 2013-08-13 03:07:05. Up until then webERP would allow upper case characters in the database name (https://sourceforge.net/p/web-erp/code/6...64a50:6185). If the user is using postgresql then the database name cannot contain upper case characters so it is irrelevant. As has been pointed out to you in private emails this is a very different case than upper case table and field names. Anybody who has used an upper case character in their database name during the first decade of webERP has now been cut off.

Tim
Reply
01-04-2014, 09:05 AM,
#33
RE: upper case letter in the database/company name .....
Of course, the strtolower function was added just to fix the installer to retain the convention we have used since ~ 2006.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-04-2014, 09:49 AM, (This post was last modified: 01-04-2014, 10:42 AM by Forums.)
#34
RE: upper case letter in the database/company name .....
Phil, it really shouldn't be this hard to get a simple common sense bug fixed. From the very beginning of webERP databases with upper case characters have been allowed. Do a manual install with any release up until the most recent and they all work with databases including upper case charaters. This is an indisputable fact. Not sure what the 2006date is about, webERP started before then.
Many installations were done this way, either just because people could, or because the hosting company demanded it. Most people used a manual installer. I don't think I committed the first installer until at least 2009, and even after that many still used the manual install.

This thread is not to do with the installer (I am not sure why you brought that up), it is to do with this change in in ConnectDB.inc that now makes any installation using one of these databases done over the last decade unusable. Shouldn't people have at least been told that had happened, even if it wasn't a subject for discussion.

I don't care about whether the installer allows upper case or not. To me it is unimportant. If you want that to force upper case letters now, then fine. It's unnecessary, but if it makes you happy, then I am happy. I do care that we should not just abandon long standing users on what seems a whim. This thread is about the bug mentioned by Vito in this thread. It is critical that this bug in ConnectDB.inc should be fixed so that the original poster in the thread and all those like him can continue to use webERP again, as they have been allowed to do over the last decade. We ought to be trying to bring users in, not get rid of those users who are already with us. Keeping this bug in makes no sense. It does nothing for people who may want to use postgresql as that doesn't allow upper case names in the database name, so they cannot have a database name containing containing upper case characters.

I really hope you can see past the fact that the person proposing this is currently subject to one of your vendettas and act in the interests of the webERP community.
Tim
(01-04-2014, 09:05 AM)phil Wrote: Of course, the strtolower function was added just to fix the installer to retain the convention we have used since ~ 2006.

Hi Phil, the strtolower() isn't in the installer. It is in the includes/ConnectDB.inc script - think about that for a second. If the code has reached ConnectDB.inc then the database must exist. Whatever characters it contains must be allowable by the DBMS in use, as it exists.

Now the strtolower() function is potentially going to change the variable name containing the database name to a different value. This means that webERP will not then work. This call to strtolower() function can do two things:

1 Either it does nothing and leaves the DB name as it is, or
2 It changes the DB name variable causes webERP to crash.

Both scenarios are not good. The first one means that we delay webERP with a pointless call, and the second we make a webERP that would work without it crash. (The second one is what caused Vito's crash). Removing this function call solved his issue.

I am confident that if you put aside your grudges and vendettas you will see that this is obvious.

Thanks
Tim
Reply
01-04-2014, 01:14 PM,
#35
RE: upper case letter in the database/company name .....
The fix I added to the installer was line 126 of install/index.php

Code:
    $DatabaseName = strtolower($_POST['Database']);

That was the fix I put in to keep the code consistent with the conventions adopted and advertised in the INSTALL.txt for several years now.

I committed the first installer in 2009 - which was actually originally written by Moxx Consulting

I think you are looking at the mechanism to get the company database name from the entries in the config as committed by Jo was only committed with version 6170 back in August 2013.

Also, since the database name was extracted from the directory name and windows was/is not capable of distinguishing upper and lower case this was the convention we adopted - for many years. Now we are no longer reliant on the file system for the database name as it is in an array in config.php it may make more sense to relax this for ConnectDB.inc so those businesses that have ignored the documentation will still work. I will discuss with Jo - in case he has not seen this post. I am not sure though because we are error trapping this against the file system/directory name. It will need some testing on a windows server.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-04-2014, 06:46 PM,
#36
RE: upper case letter in the database/company name .....
(01-04-2014, 01:14 PM)phil Wrote: The fix I added to the installer was line 126 of install/index.php

Code:
    $DatabaseName = strtolower($_POST['Database']);

That was the fix I put in to keep the code consistent with the conventions adopted and advertised in the INSTALL.txt for several years now.

I committed the first installer in 2009 - which was actually originally written by Moxx Consulting

I think you are looking at the mechanism to get the company database name from the entries in the config as committed by Jo was only committed with version 6170 back in August 2013.

Also, since the database name was extracted from the directory name and windows was/is not capable of distinguishing upper and lower case this was the convention we adopted - for many years. Now we are no longer reliant on the file system for the database name as it is in an array in config.php it may make more sense to relax this for ConnectDB.inc so those businesses that have ignored the documentation will still work. I will discuss with Jo - in case he has not seen this post. I am not sure though because we are error trapping this against the file system/directory name. It will need some testing on a windows server.

Hi Phil,

I think if you look at Vito's fix the problem is not with the installer. The bug is the line put in includes/ConnectDB.inc. This bug stops webERP working when the database name has upper case characters in it. webERP has functioned with a database containing upper case characters in it for the last decade, up until the latest release. The latest release stops that working. Seems to me to be a no brainer to fix that bug, allowing those users who have already got upper case characters in their DB names to carry on using webERP. Leave the installer as it now is, so you can block the installer working on databases containing upper case characters in their names. Anyone such as Vito who is forced to have upper case characters in the DB name can still do a manual install and still use webERP, and wont have to find another ERP. What is wrong with this solution Vito proposed weeks ago, and you promised to implement?

Thanks
Tim
Reply
01-05-2014, 01:36 AM,
#37
RE: upper case letter in the database/company name .....
Just to add weight to my argument another long term user of webERP has fallen foul of this bug

http://weberp-accounting.1478800.n4.nabb...57139.html

Thanks
Tim
Reply
01-06-2014, 12:38 AM,
#38
RE: upper case letter in the database/company name .....
Phil has agreed for a second time to fix this bug:

http://weberp-accounting.1478800.n4.nabb....html#none

I hope it happens this time. However I can't help thinking that it shouldn't have taken weeks of private and public pleading to get what is a very simple and obvious bug fix applied. Since I started the battle to get this bug fix applied I have noticed several other bugs that are more subtle than this. For instance variable names mistyped, or the case of variables being different eg:

$SQL = "UPDATE blah SET blah=blahdeblah";
$result = DB_query($sql, $db);

has happened, but the error wont be immediately noticeable. If a very obvious error like this database upper case letter bug takes so long to get fixed, then how long will it take for a subtler issue such as these? I don't mind sending in bug fixes, but if it is going to involve a silly battle over every one, then I simply have better ways of spending my time.
Can the community have some reassurances that in future bug fixes will be applied no matter whether or not the submitter of the fix is currently the victim of a vendetta by the admin?

Thanks
Tim
Reply
01-06-2014, 03:20 PM,
#39
RE: upper case letter in the database/company name .....
If there is a specific issue please could you advise.
Of course all bug fixes are gratefully received.
Thanks
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
01-06-2014, 06:50 PM,
#40
RE: upper case letter in the database/company name .....
Well Vito sent you this fix on the 22nd, and you promised to fix it the same day. I note it is still not fixed in svn. If every bug fix is going to take this amount of effort to get applied it is simply not worth the effort. That is why I asked the question, but you have not given any assurances yet.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)