Upgrade from 1.1.2 --> 1.2.4 Problem  Bottom

Go to page [-1] 1 - 2:

  • damon

    What characters are on the allowed list? I've got lots of users with either/both periods, dashes and maybe other punctuation type characters in their usernames.


    The current pattern uses Unicode character properties, plus a few additional characters. The \p{L} matches all letters. (Because Unicode character properties are used, the pattern is language-independent. It would match É, é, à, ö, ç and ñ as it would E, e, a, o, c, and n.) The \p{N} matches numbers. In addition to letters and numbers, the underscore (_) and period (.) are allowed. I am going to add back the dash (-) character.

    What other characters are currently being used with your users?

    That notwithstanding, I fear that TkiAndi's and videokid's problems arise from a lack of unicode property support in the PCRE libraries used on their respective servers. That will present a problem, because if we cannot reliably count on Unicode property support, then the \p patterns will fail, and we will have to fall back to using ASCII letter patterns--not healthy for i18n.

    --
    - Robert

    Ohloh profile for Robert Burkhead

    Stack Overflow profile for RobertB at Stack Overflow, Q&A for professional and enthusiast programmers
  • I have checked in fixes for issues #2502 and #2513 to the 1.2 branch.

    #2502 is the issue where certain sites had trouble logging users in with very basic user names (the user names were rejected by pnVarValidate). I believe that the problem at these sites is that the Unicode properties option for the PCRE library was not turned on for these particular sites. I cannot reliably test it, though, since I cannot find a way to turn that off on my test server. I'd appreciate if someone affected by it could test the fix.

    As a side note, for those who are running on servers with the PCRE Unicode property support disabled, it would be advisable to submit a ticket to your hosting provider to get that turned on. Until PHP 6 comes out (which will reportedly include full Unicode support) the Unicode property support in PCREs is an important weapon in the battle to internationalize PHP-based sites.

    #2513 is the separate issue about user names containing a dash (-) character being rejected. That has been tested and will be included in 1.2.5.

    --
    - Robert

    Ohloh profile for Robert Burkhead

    Stack Overflow profile for RobertB at Stack Overflow, Q&A for professional and enthusiast programmers
  • Robert you've right. Unicode poperty support is disabled on my server.
    I will talk to the hosting provider about it.
    Is it possible to integrate a test for correct unicode support of the PCRE libraries? So that if it is not supported, a corresponding error message appears. That would be good for anyone who installs or update zikula.
  • Quote

    Is it possible to integrate a test for correct unicode support of the PCRE libraries? So that if it is not supported, a corresponding error message appears. That would be good for anyone who installs or update zikula.


    It is not a great test, but yes, a test is possible. (It is not unlike the test I asked you to perform in the ticket.)

    The change I checked into the 1.2 branch will allow 1.2.5+ to work in a degraded fashion (less accurate, non-i18n matching) without Unicode property support. I am finishing up a change to 1.3 that will perform the check at install time and at upgrade time.

    We can work around the problem with the non-i18n check in 1.2.5+, but in 1.3 there are several other libraries in use that require Unicode property support. Unicode property support will be required for 1.3.

    We don't really have a place for "warnings" in 1.2's or 1.3's installer/upgrader. (There is a place for errors, but we have not included warnings like "this will be a problem in the future, but for now we are working around it".) I will talk to Drak about how he wants to handle warning installers of 1.2.x that the requirement is coming.



    Edited by rmburkhead on Aug 29, 2010 - 04:06 PM.

    --
    - Robert

    Ohloh profile for Robert Burkhead

    Stack Overflow profile for RobertB at Stack Overflow, Q&A for professional and enthusiast programmers
  • I verified the bugfix and it works.
    Thanks Robert for the support!
  • rmburkhead


    What other characters are currently being used with your users?


    I have over 26,000 members so I did a search for common (on the keyboard) characters that I remember seeing. Found these, might be others I haven't thought of.

    `
    @
    $

    !

    &

    *

    (

    )

    =

    +


    --
    Damon
    Catamaran Sailing at TheBeachcats.com
  • damon

    I did a search for common (on the keyboard) characters that I remember seeing. Found these, might be others I haven't thought of.


    I will take a look at possibly allowing existing users to continue using those user names, but going forward, new user names will be restricted to letters, numbers, ., _ and -.

    --
    - Robert

    Ohloh profile for Robert Burkhead

    Stack Overflow profile for RobertB at Stack Overflow, Q&A for professional and enthusiast programmers
  • rmburkhead

    I will take a look at possibly allowing existing users to continue using those user names, but going forward, new user names will be restricted to letters, numbers, ., _ and -.


    Thanks, that would help with transition, it's pushing 1,000 members who would have a problem otherwise.

    But can I ask, why restrict those keyboard characters in usernames?

    Also, I have a question about usernames case.

    I've always thought (and told members) that usernames were not case sensitive, that UserName was the same as username. In Zikula 1.2+ the user module has a setting "New username in lowercase" that is explained as "When enabled, if a new user chooses 'MyUserName' as his/her username, it will be stored as 'myusername' in the Zikula database."

    I don't understand the point of this if usernames are not case sensitive?

    --
    Damon
    Catamaran Sailing at TheBeachcats.com
  • damon

    But can I ask, why restrict those keyboard characters in usernames?


    I will let Drak address the answer to that question.

    damon

    Also, I have a question about usernames case.

    I've always thought (and told members) that usernames were not case sensitive, that UserName was the same as username. In Zikula 1.2+ the user module has a setting "New username in lowercase" that is explained as "When enabled, if a new user chooses 'MyUserName' as his/her username, it will be stored as 'myusername' in the Zikula database."

    I don't understand the point of this if usernames are not case sensitive?


    This might get a little on the technical side, and a bit on the long side. In order to make user names not case sensitive, they have to be compared in a non-case-sensitive manner when they are used. For example, when logging in as "Robert" or "rObert" we have to ensure that these user names are compared to "robert" (or whatever) without regard to case.

    One might think, "well, then just convert both to lower (or upper) case before you compare them," and that would be thinking in the right direction, but there is a problem that we must first overcome. We need to find the user name in the database. Let's say that my fat fingers register on your system as "rObert", but that I try to log in as "Robert" since I was told that user names are not case sensitive. Database servers are dumb. They have no way to know that "rObert" should match "Robert" without being told somehow that they are the same value. When I try to log on as "Robert", assuming we have implemented a case-sensitive system, I will get rejected as an unknown users.

    So, how do we make it ignore case? MySQL has a LOWER() function that we can use in queries to convert a retrieved value to lower case when we are doing the WHERE comparison. Using that plus a PHP function to convert the entered value to lower case, we can force MySQL to consider "rObert" and "Robert" as the same value. Ok, so problem solved, right?

    Not quite. That was fine back when we supported MySQL to the near exclusion of all other database platforms. While MySQL is the prevalent database system used out there with web servers, it is not the only one. With successive versions of Zikula, we have been trying to expand the number of potential configurations on which the system will run. Because of this, we cannot rely on the behavior of any one database platform. What if another database server we support doesn't have the LOWER() function? Worse, what if it does have it, but acts differently? What about non-ASCII characters? How are they handled by the LOWER() function? Are they handled the same way by every database server? Sadly, the answers to those questions tell us that we cannot assume that the SQL LOWER() function is available, and even if it is, that it will behave the way we expect it to.

    In order to reliably make user names case-insensitive, we have to then back up a bit from the database layer to something that all implementations have in common. That would be PHP. We can count on the PHP functions to behave the same across platforms because, by definition, they have to. Unfortunately, we cannot use PHP functions in SQL queries. That means we have to use them before the original data is stored, and then again before we put together a query to search through the original data. Why before? Because if we did not, then every time we had to query for a user name we'd have to read the entire user database into an array and convert all of the user names to lower case before we could do a query, and we would have to search through the array instead of having the database server do the searching for us. Not very efficient.

    Since we have to use these functions prior to storing the data, the most efficient way of handling these queries is storing the user name in all lower case. (We could have picked upper case, but lower case is easier on the eyes--and is somewhat standard across the industry.) Once we do that, we don't have to worry about case when we query. We build the query with the entered user name converted to lower case, and then the database server does not have to do any conversions on its own. Importantly, we don't have to worry about how different database servers handle the conversion of international characters to lower case, or worry about whether it supports such conversions at all.

    The configuration option you refer to is a transitional option. If that is set, then all user names are stored as lower case, and if your implementation is on a non-MySQL server, then you have to worry less about potential assumptions of MySQL-specific things in the system causing you problems.

    In 1.3.0, this will not be an option. All user names are all lower case all the time. The conversion is done during the upgrade.

    --
    - Robert

    Ohloh profile for Robert Burkhead

    Stack Overflow profile for RobertB at Stack Overflow, Q&A for professional and enthusiast programmers
  • Wow, ok, so "it's nothing to worry about". icon_lol

    --
    Damon
    Catamaran Sailing at TheBeachcats.com
  • I am attempting to use the Zikula installer script to install, but runnin into this same problem when it comes to Create administrator's user account. Ticket #2502 says this issue is closed, however I think the installer script may still have this bug. Strangely, when I check the z_users table, I show an admin user and password set to the default pn_user_regdate. So is the admin user being entered into the table in spite of the error? or is the admin user and password already a default? As I'm a new user trying out zik for the first time, I could use some more detailed instructions on how to fix this bug... :)
    stuck in installation... !!! grrrrr!
  • Are you creating a user called 'admin' or something else?

    Drak

    --
    Zikula Lead Developer
    Board Member of the Zikula Foundation
    Follow me on twitter.com/zikuladrak
  • I have been having the same problem as the top of the thread, i recently ran my 1.0 install up to a 1.2.4, and after the update from 1.2.2, i get this blanked page, with just this

    "Unknown column 'pn_url' in 'field list'
    SELECT pn_id AS "id",pn_name AS "name",pn_type AS "type",pn_displayname AS "displayname",pn_url AS "URL",pn_description AS "description",pn_regid AS "regid",pn_directory AS "directory",pn_version AS "version",pn_official AS "official",pn_author AS "author",pn_contact AS "contact",pn_admin_capable AS "admin_capable",pn_user_capable AS "user_capable",pn_profile_capable AS "profile_capable",pn_message_capable AS "message_capable",pn_state AS "state",pn_credits AS "credits",pn_changelog AS "changelog",pn_help AS "help",pn_license AS "license",pn_securityschema AS "securityschema" FROM zk_modules AS tbl "

    i've searched the forums and google, and can't seem to come up with a workable answer. if i could have solved it without posting....

    i can see it's some type of column/interface issue, and the pn_ something to do with postnuke most likely? i followed the above tip, and tried replacing the 1.2.4 code in pnApi.php with the above 1.2.3 snippet.

    the site originally ran PN but converted to zikula 1 once it was released. so i'm guessing the error has something to do with the SQL not being in sync w the update content? like i had mentioned, i migrated it up from 1.0 (tracked down that elusive 1->1.1.x update), and the thing was working fine at 1.2.2

    anyway, any advice would be appreciated, as i really don't feel like scrapping or rolling back/restoring the project! XD

Go to page [-1] 1 - 2:

This list is based on users active over the last 60 minutes.