Re: pear DO and unicode on mysql 4.1 bombing...

From: Date: Tue, 18 Jan 2005 13:46:48 +0000
Subject: Re: pear DO and unicode on mysql 4.1 bombing...
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16993@lists.php.net to get a copy of this message
JEnsign wrote:
Hi Alan, After some research and testing I found and tested this successfully using only mysqli all by its self. $mysqli->options(MYSQLI_INIT_COMMAND, "SET NAMES 'UTF8'");
|this stores the connection pear object for dataobject $do $_DB_DATAOBJECT['CONNECTIONS'][$do->_database_dsn_md5] you can use $do->getDatabaseConnection(); I guess since it's probably not affected by overload bugs in php5. just a matter of working out how to access the mysqli object from the pear connection object. Regards Alan |
otherwise it wont return utf8. Where in the heck would i set this line or option when using Dataobjects? Thanks! John Alan Knowles wrote:
a) try a recent snapshot of php as 5.0.3 was broken. b) try using the cvs version of DB_DataObject c) make sure you are using the mysqli driver. It's best to cc pear-general@lists.php.net Regards Alan JEnsign wrote:
Hi Alan, I wont take but a few seconds of your time. Dataobjects rocks! Strange thing: mysql 4.1 collated to default of unicode. Using DO, any text stored in a varchar field is returned as "????? etc...." I cant seem to reproduce it with pear DB or the mysql/mysqli libs by themselves. It just happens with DO. Any idea right off the top of your head why it might be going wonky on me? I couldnt find a group or list for DO, so I hope you dont mind the email. thanks again! John Ensign p.s. what follows is my auto-gen'd ini file: [bookmarks] pk_bookmarkid = 129 fk_userid = 130 dt = 14 title = 66 description = 2 url = 2 [bookmarks__keys] pk_bookmarkid = N [bookmarks_has_classificationvalues] fk_bookmarkid = 129 fk_classificationvalueid = 129 [bookmarks_has_classificationvalues__keys] fk_bookmarkid = K fk_classificationvalueid = K [calendar] pk_calendarid = 129 fk_groupid = 129 fk_ownerid = 2 title = 130 description = 130 [calendar__keys] pk_calendarid = N [calendareventattendees] fk_calendareventid = 129 fk_userid = 130 confirmed = 1 [calendareventattendees__keys] [calendarevents] pk_calendareventid = 129 fk_calendarid = 129 private = 129 title = 130 description = 66 url = 2 start_dt = 142 end_dt = 142 [calendarevents__keys] pk_calendareventid = N [calendarevents_has_classificationvalues] fk_classificationvalueid = 129 fk_calendareventid = 129 [calendarevents_has_classificationvalues__keys] fk_classificationvalueid = K fk_calendareventid = K [classifications] pk_classificationid = 129 fk_userid = 130 name = 2 for_contacts = 1 for_messages = 1 for_calendarevents = 1 for_bookmarks = 1 for_notes = 1 [classifications__keys] pk_classificationid = N [classificationvalues] pk_classificationvalueid = 129 fk_classificationid = 129 value = 2 [classificationvalues__keys] pk_classificationvalueid = N [coachingcontent] pk_coachingcontentid = 129 ik_coachingcontenparenttid = 129 fk_ownerid = 130 fk_coachingsessionid = 129 contenttype = 1 is_private = 1 is_protected = 1 due = 14 is_completed = 1 content = 66 [coachingcontent__keys] pk_coachingcontentid = N [coachingcontent_has_assignees] fk_coachingcontentid = 129 fk_assigneeid = 130 [coachingcontent_has_assignees__keys] fk_coachingcontentid = K fk_assigneeid = K [coachingfolder] pk_coachingfolderid = 129 fk_ownerid = 130 name = 2 [coachingfolder__keys] pk_coachingfolderid = N [coachingsession] pk_coachingsessionid = 129 fk_coachingfolderid = 129 fk_ownerid = 130 name = 2 dt = 14 [coachingsession__keys] pk_coachingsessionid = N [coachingsession_has_users] fk_coachingsessionid = 129 fk_userid = 130 [coachingsession_has_users__keys] fk_coachingsessionid = K fk_userid = K [contacts] pk_contactid = 129 fk_userid = 130 fk_contactid = 130 contacttype = 2 [contacts__keys] pk_contactid = N [contacts_has_classificationvalues] fk_contactid = 129 fk_classificationvalueid = 129 [contacts_has_classificationvalues__keys] fk_contactid = K fk_classificationvalueid = K [countries] pk_id = 130 name = 2 [countries__keys] pk_id = K [denominations] pk_denominationid = 129 title = 130 [denominations__keys] pk_denominationid = N [forumposts] pk_forumpostid = 129 ik_parentpostid = 129 fk_editor = 130 fk_author = 130 fk_forumid = 129 subject = 2 post_dt = 14 body = 66 edit_dt = 14 edited = 1 locked = 1 [forumposts__keys] pk_forumpostid = N [forums] pk_forumid = 129 fk_groupid = 129 title = 130 subject = 130 visible = 129 public = 129 locked = 129 [forums__keys] pk_forumid = N [groups] pk_groupid = 129 fk_ownerid = 130 ik_groupid = 129 fk_denominationid = 129 title = 130 visible = 129 [groups__keys] pk_groupid = N [locales] pk_localeid = 130 title = 2 [locales__keys] pk_localeid = K [message_has_classificationvalues] fk_messageid = 129 fk_classificationvalueid = 129 [message_has_classificationvalues__keys] fk_messageid = K fk_classificationvalueid = K [messagefolders] pk_folderid = 129 fk_userid = 130 name = 2 foldertype = 129 [messagefolders__keys] pk_folderid = N [messages] pk_messageid = 129 fk_senderid = 130 fk_folderid = 129 messagetype = 1 isseen = 1 dt = 14 subject = 2 body = 66 attachment = 2 [messages__keys] pk_messageid = N [messagesqueue] pk_messageid = 129 fk_senderid = 130 recipients = 2 messagetype = 1 sendafterdt = 14 subject = 2 body = 66 [messagesqueue__keys] pk_messageid = N [notes] pk_noteid = 129 dt = 14 body = 66 [notes__keys] pk_noteid = N [notes_has_classificationvalues] fk_classificationvalueid = 129 fk_noteid = 129 [notes_has_classificationvalues__keys] fk_classificationvalueid = K fk_noteid = K [persondirectories] pk_persondirectoryid = 129 name = 2 description = 2 [persondirectories__keys] pk_persondirectoryid = N [persondirectoryusers] fk_persondirectoryid = 129 fk_userid = 130 show_firstname = 1 show_lastname = 1 show_address = 1 show_email = 1 show_phone = 1 [persondirectoryusers__keys] fk_persondirectoryid = K fk_userid = K [preferences] fk_userid = 130 name = 130 value = 130 [preferences__keys] fk_userid = K name = K [surveyquestion] pk_surveyquestionid = 129 fk_surveyquestiontypeid = 129 fk_surveyquestiongroupid = 129 title = 2 description = 2 sortorder = 1 [surveyquestion__keys] pk_surveyquestionid = N [surveyquestionanswers] pk_surveyquestionanswerid = 129 fk_surveyquestionid = 129 value = 130 name = 2 [surveyquestionanswers__keys] pk_surveyquestionanswerid = N [surveyquestiongroup] pk_surveyquestiongroupid = 129 fk_surveyid = 129 name = 2 description = 2 sortorder = 1 [surveyquestiongroup__keys] pk_surveyquestiongroupid = N [surveyquestiontypes] pk_surveyquestiontypeid = 129 name = 2 [surveyquestiontypes__keys] pk_surveyquestiontypeid = N [surveys] pk_surveyid = 129 visible = 1 name = 2 description = 2 [surveys__keys] pk_surveyid = N [sys_session] pk_sessionid = 130 dt = 14 datavalue = 66 [sys_session__keys] pk_sessionid = K [timezones] pk_timezone = 129 name = 130 utc_offset = 130 dst = 129 [timezones__keys] pk_timezone = N [translations] fk_localeid = 130 section = 130 key = 130 value = 130 [translations__keys] fk_localeid = K section = K key = K [users] pk_userid = 130 fk_denominationid = 129 fk_timezoneid = 129 fk_countryid = 130 fk_localeid = 130 md5_password = 2 alias = 2 email_1 = 2 email_2 = 2 sec_question = 2 sec_answer = 2 last_login = 14 salutation = 2 firstname = 2 lastname = 2 address1 = 2 address2 = 2 city = 2 province = 2 postalcode = 2 phone = 2 biography = 66 [users__keys] pk_userid = K [users_has_groups] fk_userid = 130 fk_groupid = 129 [users_has_groups__keys] fk_userid = K fk_groupid = K


« previous php.pear.general (#16993) next »