DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • January 21, 2018, 12:28:13 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: lotgd + php5 + mysqli + mysql 4.1+  (Read 4365 times)
0 Members and 1 Guest are viewing this topic.
KhanTervel
Guest
« on: February 19, 2005, 10:24:59 AM »

Hi,

I am trying to run lotgd r14 on mysql 4.1+ (mysqli) and php5 (using translationtool for cyrillic-bulgarian characters) and I came accross some issues and some ideas about their resolving:

- switching to mysqli is just not enough as in mysqli functions mysqli link resource is the first parameter which is also mandatory. So i did 2 db.mysql.php and db.mysqli.php which are included in dbwrapper.php regarding the db type.
- also common.php has to be modified because of the link we need to supply and as for php5 that link is an object, we can't just put it in the LINK constant so i did $GLOBALS['lotgd_db_link'] which stores the link for mysqli use and dummy LINK for that case
- there is a known error when creating tables in multibyte charset db because the key is too long or when creating the tables in a different collation db there is an error "Illegal mix of collations for operation ' IN '". The second can be resolved by adding "set character set" and "set names" sql statement after connecting to the database thus specifying the correct client connection. Of course, in php.ini and my.cnf should be set the correct character sets and collations.
- the problem when translation is used is within htmlentities function which has to be called with the correct character set parameter (i know it's 4.3+ but ...) and that function is unfortunately used in many scripts and PHP does not allow function overriding. I think that for the sake of translation correcting the call in output.php (function appoencode) is just enough but it has to be tested. Maybe it's good to use a custom htmlentities function which will redirect the call to htmlentities or use some other algorithm.

After these modification I am running successfully LOTGD that can be translated into cyrillic (bulgarian) but i am still testing whether all the functionality is correctly behaving. BTW FYI IMHO lotgd is running quite faster on php5+mysql4.1+ than the other install i've tested with php4+mysql4.1+ (i used zend optimizer on both)

I will attach my modified lotgd files if they are interesing to someone.
You can use and modify them as you like.

I hope this could be useful to someone Smiley

Regards,
« Last Edit: February 20, 2005, 06:13:36 PM by Talisman » Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #1 on: February 19, 2005, 08:03:41 PM »

Sounds good, its good to hear some feedback from someone running this setup.
Logged
Kendaer
Guest
« Reply #2 on: February 19, 2005, 11:17:31 PM »

Unfortunately, at this time lotgd is not going to officially support PHP 5, nor mysqli under MySQL 4.1.

Also, I ask that you please do NOT distribute full copies of the core files, but rather distribute diff files.

This is because those files are in active development and if someone installed your file over a more recent version of the file things would quite likely break badly.
Logged
KhanTervel
Guest
« Reply #3 on: February 20, 2005, 12:52:57 AM »

sorry for that  Undecided ... attaching diff files

my idea was to discuss with s.o. an easy way of using translationtool with non-western languages ...

btw if it's not a good practice to distribute that type of modification this way just tell me to remove them ... i've just shared an experience, nothing more ...
Logged
Kendaer
Guest
« Reply #4 on: February 20, 2005, 05:01:48 PM »

I wasn't objecting to you sharing your work, in fact, I applaud and encourage it.  I'm just trying to prevent future problems where someone has installed your file and then things break because they don't pick up a required piece of core change.  The diff files are fine.


I don't know of any way to remove the attachment from your previous post.  Maybe Talisman can.
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5477



View Profile WWW
« Reply #5 on: February 20, 2005, 06:15:33 PM »

Attachment removed  
Logged

Play the latest beta version here on DragonPrime
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
20 Guests, 1 User
hamzamamood
Home Forums News Downloads Login Register Advanced Search