PHP-Nuke Services - Addons, Modules, Blocks Vizitati www.westdesign.ro Select Interface Language:EnglishRomanian
  Login or Register HomeForumsDownloadsYour AccountWeb LinksContact   
SectionsShow\Hide
MultiheadlinesShow\Hide
LoginShow\Hide
~ Welcome, alien
Nickname Password
(Register)

~ Membership:

Greetings to the newest member aleksone
~ New Today: 0
~ New Yesterday: 0
~ Overall: 3655

~ People Online:
~ Visitors: 6
~ Members: 0
~ Total: 6
~Aikon is offline
on Yahoo Msg.
Link to meShow\Hide

aikons.net
Search in FeedsShow\Hide
Search in feeds
HistoryShow\Hide
On 21 November


Speed Up   Pause   Speed Down
DictionaryShow\Hide
Enter the word

Romanian users only

Situl personal NICU RANCOV Forum Index


Reply to topic Page 1 of 1
Module breaks in mysql4
Message Author
Reply with quote
Post Posted: Wednesday 14 September, 2005 00:25

Hi,

I have mySQL 4 installed on my system, along with the PHP-Nuke db set to "mysql4."

Under this configuration the Reminder 2 module stops functioning correctly (doesn't have reference to the configuration data stored in the database). I've isolated the problem and it is specificly related to the PHP-Nuke db class mysql4.php, and in the "sql_fetchrow" function.

Appearently, the implementation of "sql_fetchrow" is set to create a "MYSQL_ASSOC" array, where the array elements are solely obtained by using the field's symbolic names (Reminder 2 uses numerical references of the fields position in the results).

This method fails because a "MYSQL_ASSOC" fetch only composes an array containing associative array references (i.e., their symbolic field names).

Where as, the MySQL class uses a "mysql_fetch_array" which returns a combination of numerical and associative array elements (thus allowing either type of array element extraction to be applied).


I don't see this as "your problem" per say, since the PHP-Nuke folks have not produced a mysql4 class which duplicates all of the characteristics of the MySQL class. But since some may contact you regarding this problem I thought that you should be aware of it.

View user's profile Send private message
Reply with quote
Post Posted: Wednesday 14 September, 2005 09:34

Thanks for your feedback.

Indeed although obtaining the array elements using the field's symbolic names is <b>more intuitive</b> I used the numerical reference for "I_don't_know_why" reason Smile [bad reason].

I will review the whole code for <b>MySQL4</b> compliance even if this issue isn't really a bug [from "regular" MySQL point of view].

Once again thank you very much for this feedback. All the best.

View user's profile Send private message Visit poster's website
Reply with quote
Post Posted: Wednesday 14 September, 2005 10:55

Hi Aikon,

My thinking is that the problem isn't with your code, it lays with the PHP-Nuke developers.

Regardless of which method you decided to use to fetch your fields, they should be supported in both the MySQL and mysql4 classes.

I wrote up this problem and submitted it to the folks at NukeCops.com. Here is a link to the thread:
http://www.nukecops.com/postt47472.html

I also included a quick fix for the problem but requires two changes to the mysql4.php class (as there are other things which break due to this issue).

Anyway, glad to be of some assistance. Yopu've written a great module to use, and I would hate for people to think that your code was having a problem when in fact it is PHP-Nuke itself.

Take care,
Tim

View user's profile Send private message
Reply with quote
Post Posted: Wednesday 14 September, 2005 11:11

Unrelated to this, I was wondering if Reminder 2 could be installed on PHP-Nuke 6.8? I'm supporting a 6.8 installation which could really use your module, but I haven't looked at it yet to see if there would be any issues to overcome. (Upgrading PHP-Nuke for them is a problem because of some other modifications which they made to it.)

Anyway, if you are aware of any problem involved in dealing with a 6.8 installation of Reminder 2, I'd really appreciate knowing what they might be.

Thanks!
Tim

View user's profile Send private message
Reply with quote
Post Posted: Wednesday 14 September, 2005 14:35

Looks like that "major" guy "Xyberian" don't know what you are talking about on your first post there.

Quote:
Recently, those modules[my note: "with problems"] are probably, reminer, nuke treasury, nuke c30 etc.


Maibe you should explain to him what is the difference betwen the sql_db class for mysql4 and sql_db class for mysql or I will.
It looks like he didn't have a clue about them since is talking about
Quote:
my_sql codes, fetch_row_assoc
and other bullshit...

I think he even didn't look at the code for above addons before writing that stupid comments on them.

View user's profile Send private message Visit poster's website
Reply with quote
Post Posted: Wednesday 14 September, 2005 19:36

Hi Aikon,

I just read his second post and I think that he likes to sound as if he knows what he's talking about without going through the actual work of knowing it. Laughing

If you feel like responding to him please feel free. I kind of want to drop the topic with him because I suspect that it will just be more of the same on his part.

Hey, btw, I didn't want you to think that I was talking about your coding in that post regarding coding practises. Your code is well written and solid. I've used numerical arrays with mySQL in the past, too. Laughing

I was just speaking in general terms.


Thanks again,
Tim

View user's profile Send private message
Reply with quote
Post Posted: Wednesday 14 September, 2005 20:10

Well Tim I must say I kinda didn't like it when I saw his post about Reminder.
But you have been 100 % acuratte on everything you said.
I am sure that you are masteing quite well php knowledge not like others...

Let's drop this topic. Isn't worth it to waste more words on it.

About php-nuke 6.8 I must say I'm not familiarized with it, cause I new in PHP-Nuke fields, since 7.0. But if you could give me a link to dl PHP-Nuke 6.8 or even send it to me[e-mail inside install file] I'll make some test on it for Reminder.

View user's profile Send private message Visit poster's website
Reply with quote
Post Posted: Friday 23 September, 2005 03:57

Hi Aikon,

Please forgive my long delay in replying as I had to go out of town this past week.

My mistake BTW, it is a 6.7 installation, not a 6.8 PHP-Nuke installation.

I tried installing Reminder 2.0 into the PHP-Nuke 6.7 and the only thing that I have had to change up to this point was the "$admin_file" reference in the "links.reminder.php." Appearently, the "$admin_file" variable was introduced after version 6.7. So I simply replaced the variable with the "admin.php" string.

So far, everything appears to be working but I have not fully tested it yet. I'll let you know in a few days how it is working out.

If you would still like a copy of PHP-Nuke 6.7, I created a temp directory for you to download it from. I'll send you the URL to download it from in a PM.

Thanks, Smile
Tim

View user's profile Send private message
Reply with quote
Post Posted: Friday 23 September, 2005 07:26

Same think went for PHP-Nuke 6.9....7.5.

Thanks for 6.7 and also for the english lang file.

Quote:
Appearently, the "$admin_file" variable was introduced after version 6.7.

Not after 7.5?

View user's profile Send private message Visit poster's website
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Page Generation: 1.78 Seconds