• Hello,
    I have change my AD password and put an apostrophe (’) in it, since I have issue with it. When I change something in “general” or “active directory” the password is change in mysql, the apostrophe is replaced by “'”.

  • @lenain said in AD password issue:


    Is the “&#039:”. giving a problem? MYSQL is typing it that way as a HTML code. I have no coding knowledge nor do I know MYSQL very well but this may be of some use:
    Possibly off-topic, but maybe you came here looking for a way to sanitise text input from an HTML form, so that when a user inputs the apostrophe character, it doesn’t throw an error when you try to write the text to an SQL-based table in a DB. There are a couple of ways to do this, and you might want to read about SQL injection too. Here’s an example of using prepared statements and bound parameters in PHP:

    $input_str = “Here’s a string with some apostrophes (’)”;
    // sanitise it before writing to the DB (assumes PDO)
    $sql = “INSERT INTO table (note) VALUES (:note)”;
    try {
    $stmt = $dbh->prepare($sql);
    $stmt->bindParam(’:note’, $input_str, PDO::PARAM_STR);
    } catch (PDOException $e) {
    return $dbh->errorInfo();
    return “success”;
    In the special case where you may want to store your apostrophes using their HTML entity references, PHP has the htmlspecialchars() function which will convert them to “&#039 ;”. As the comments indicate, this should not be used as a substitute for proper sanitisation, as per the example given.