Thread: MySQL Extensions
thedarkness

As per a discussion perk and I had today I have begum work on a mysql UDF (user defined function, more on this later). i'm using a relatively new system that I am using as a testing/attack platform ;-) I have done quite a bit on this

mac

 hine already.

Anyway, got this when I tried to install my first function into mysql;

quote
mysql> CREATE FUNCTION

php

 serialize RETURNS STRING SONAME 'libmy

php

 serialize.so';
ERROR 1126 (HY000): Can't open shared library 'libmy

php

 serialize.so' (errno: 22 /usr/lib/mysql/libmy

php

 serialize.so: cannot restore segment prot after reloc: Permission denied)


Quick search on google revealed that se

linux

  was the culprit and, sure enough, i had forgotten to set disables in /etc/sysconfig/se

linux

 ....... fishing se

linux

   Applause

Cheers,
td

perkiset

Cripes what a PIA. Looking forward to that project though...

thedarkness

LOL, don't get all impatient on me perk, I's working on it massa  Applause

BTW, does anyone know if any entitities need to be escaped for

php

  serialized arrays (I imagine " at the very least needs to be escaped)? Is this documented anywhere? I couldn't find anything on

php

 

.net

 

Cheers,
td

perkiset

quote author=thedarkness link=topic=281.msg2211#msg2211 date=1181958703

LOL, don't get all impatient on me perk, I's working on it massa  Applause


No pressure at all td.

:Applause


OK, is it done yet?  Applause
jk dude

thedarkness

quote author=perkiset link=topic=281.msg2214#msg2214 date=1181968414

OK, is it done yet?  Applause


No, it isn't.

Made major progress today (Saturday) though, actually got it to print some output to the screen without barfing garbage, segfaulting, or just doing "nothing"  Applause talk about your steep

learn

 ing  curves, let's just say that putting one of these together is not intuitive. As usual, one must absorb some pain, think I'm over the hump now though, should make mucho progresso tonight. Will keep u posted, patience is a virtue  Applause

Cheers,
td

[edit]

BTW, I burned a hell of a lot of time on this today because, as I posted earlier I was using;
CREATE FUNCTION

php

 serialize RETURNS STRING SONAME 'libmy

php

 serialize.so';

This is for a normal function, I wanted an aggregate function so the command I needed was;
CREATE AGGREGATE FUNCTION

php

 serialize RETURNS STRING SONAME 'libmy

php

 serialize.so';

It makes a hell of a difference and confused the hell out of me!

Oh, and sorry for the thread hijacking.
[/edit]

perkiset

Just wanted to post here so that you'd know where your thread moved to TD... split it off the

PHP

  FileGetContents thread...

Also, sounds like it's a headache - seriously, no worries or pressure dude - it'll be great if your get time for it, but don't do that in front of real work... I'ma just playing with you

thedarkness

It's cool perk, making progress, kinda fun.

Cheers,
td

thedarkness

Update: Sunday morning

OK, i currently have a working MySQL User Defined Function (UDF) that creates a

php

  serialized array from a single argument query such as;

select

php

 serialize(kw) from keywords;

php

 serialize being my function.

I'm going to continue work on it until I get it doing multiple argument queries (array of arrays) and then I'll turn it loose for testing if anyone is interested. I'll also be doing some

tutor

 ials on how this stuff is done so other's don't have to go through as steep a

learn

 ing  curve as I have  Applause

Cheers,
td

perkiset

:rubs hands together in anticipation and wipes drool from edge of mouth:


Perkiset's Place Home   Politics @ Perkiset's