logs archiveIRC Archive / Freenode / #php / 2006 / April / 16 / 1
Stormchaser
!+msg the bot
stormbot
talk to the bot in msg or our trained attack llamas will bite your genitalia off
Stormchaser
I still like this one :)
Monkey_b
hehe nice
Ox0000
Stormchaser: well, and there is no way to uninclude a file, right? :(
fred87
meh looks like php's mysql_pconnect can have locking issues, so going for mysql_connect; thanks anyways
hmm and php internally uses persistent connections anyway apparantly under my circumstances so it's a nonissue, sorry
Monkey_b
i love the fact that this server encourages ops to remain deoped... removing egos makes for a much more constructive environment :]
hallvar
Anyone experimented with using XSLT on PHP objects instead of XML?
Stormchaser
Ox0000: You can consider the function as definition. Once defined it can't be 'undefined' or 'changed'.
         

Ox0000
Stormchaser: same with includes... my problem is that i coded an irc bot where i'd like to dynamically load triggers etc... and if i change a trigger i'd like to reload it... but seems like there's no way to do that
Sillyman
why not?
lorfds
ok scratch all that other crap i was talking about
i dont need to merge the arrays
i can just copy the values from one array to another, and that will solve the problem
$ins_fields["data"][4]["value"] = $tempstore["data"][4]["value"];
fred87
Ox0000: not the cleanest/best way but you could do it using eval (depending on the internal structure of your bot)
lorfds
this code works for that specific value
Stormchaser
Ox0000: There is a pretty bad flaw in your software design.
Ox0000
Sillyman: because I define the triggers in functions like triggers_name in includes. I can load them with include but I cannot unload them which. So I always get a function defined error..
lorfds
now how do i globalize that function, so that it works for every value, not just [4]
Ox0000
Stormchaser: what flaw?
Sillyman
Ox0000, design error :(
Ox0000
well how could this be solved?
fred87
Ox0000: a better way would be to have them as members of a class with a version number in the name
Sillyman
i have and idea but i cant convert them to words :/
but its all in the design
fred87
eg class GuideLines_01 { function triggerFoo(){bar;} };
Ox0000
hm ok
fred87
replacing GuideLines with something appropriate
Ox0000
ok, i'll see ;)
fred87
just keep an array of objects that are of the same type as the latest version
though whenever you reload a plugin, i think that your memory usage will grow (or does php have a garbage collector?)
Ox0000
hmm you're right. this would blow up the bot
fred87
meh even if it does have garbage collectorit would have to keep the old version in memory given it was #included
         

Ox0000
the problem is that i cannot "unload" a class
fred87
you could read it into a variable and whenever you want to execute the trigger, use eval
Ox0000
hmm sounds better
Jymmm
!+eval
stormbot
If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus Lerdorf, BDFL of PHP
fred87
heh
Ox0000
Jymmm: thanks, i know that eval is quite dirty, but please, if you know a better approch? ;)
fred87
(Action) wondersif when he wrote his bot with reloadable plugins in C++ for a challenge if he actually did pick the hardest language to do it in he knew :P
philip
try runkit -> php.net/runkit
MetaMorfoziS
hi all
what function can convert this:
\157\162\155\40\143\154\141\163\163\75\42\154\157\147\42\40\141\143\164\151
Stormchaser
fred87: For HTS?
MetaMorfoziS
to a readable format?
i think it's octal strings
fred87
Stormchaser: HTS ?
MetaMorfoziS
and if i print it
Ox0000
philip: oh, didn't know this extension. seems like this is what i'm searching for
fred87
philip: ooh shiny
MetaMorfoziS
it get's the readable format
Ox0000
philip: thanks a lot :D
MetaMorfoziS
but how can i convert it withiut print?
philip
:)
Stormchaser
fred87: Hack This Site... They have some pretty weird challenges there...
fred87
nah, just for something interesting to do
Stormchaser
heh... okay.
itrebal
HTS is kinda weird
Stormchaser
itrebal: sure it is... It's constructed of 99.732% of "wannabie hackers"'
itrebal
rmmhmm
gah, my 1337 h@xz0rz dvd ripping s0ftwarez iz taking a long time
Stormchaser
the remain actually know, what are they doing :)
itrebal
actually my dvd ripping program *is* taking a long time
fred87
oooh
itrebal
i should re-write it.... in php
Stormchaser
itrebal: I left them because most of them are too dumb to turn on their computers properly...
lorfds
muhahahaha
i got it!
fred87
(Action) didn't notice slackware had put php 5 in extra/; *adds shove a package for it into slamd64 to todo list*
itrebal
Stormchaser: heh, thats amazing
lorfds
freakin hallelulah
what a pain in my ass
Stormchaser
(Action) pats Ubuntu
fred87
personally i don't like dependency tracking and i love kde, so not for me; though it is quite nice for some people
Stormchaser
*cough*kubuntu*cough*
fred87
dependencies :P
also, i like installing a package being so similar to "make install" with no extra configuration stuff done
Stormchaser
fred87: Dependencies are on slack as well...
bricecube
does anyone know if $function = phpinfo; $function(); is compatible with PHP5, PHP3? I only have access to PHP 4 right now, & it works...
fred87
Stormchaser: not dependency tracking
well, excluding 3rd-party tools
Jymmm
A bento box sounds good right about now
fred87
Jymmm: meh i'm jealous
Stormchaser
fred87: you can't install only kdewebdevelopment ot kdeutils without installing kdelibs :P
fred87
no decent japanese food around here :(
bricecube
can someone on PHP5 test if this works --> $function = phpinfo; $function(); ?
itrebal
i'm going to a sushi place tonight actually
bricecube: that will not work, period.
fred87
you can; it just won't work :) i personally like typing "installpkg kdewebdev*.tgz" and it installing kdewebdev, nothing else :)
bricecube
itrebal, works in 4
fred87
but i know why other people won't
*wouldn't
itrebal
bricecube: no, it does not
Stormchaser
bricecube: That phpinfo should be in quotes.
MetaMorfoziS
anz idea<
Monkey_b
the paypal api has gotta be one of the most complicated pieces of cr@p ever
MetaMorfoziS
?
bricecube
itrebal, I just ran it..
I forgot the quotes ;)
but, w/o quotes it seems to work
fred87
Stormchaser: things like k3b are one reason why; most dependency tracking things will install a load of dvd video rippers/media converters etc if you try to install it
Stormchaser
fred87: That's the whole point... Why the heck would you install something, that's not going to work because of missing dependencies?
itrebal
gah $func(); must be an awful coding practice
call_user_func for me
fred87
Stormchaser: some things can be pursaded to work without dependencies (and this is excluding the things which should be listed as optional dependencies but often aren't)
Stormchaser
fred87: 'mkisofs' comes to mind... That and cdrecord and dvd tools are the only thing, that are installed on ubuntu (and deb as well)
itrebal
bricecube: you need quotes, but you should use call_user_func
bricecube
itrebal, it may be ugly... but a way to overload a function (gettext call from smarty-gettext w/ $smarty-gettext-overload) ... ie. if ($smarty-gettext-overload) $smarty-gettext-overload($str); else gettext($str);
Stormchaser
o.O
bricecube
heh
Stormchaser
you CANNOT use hypen in variable names.
fred87
Stormchaser: the thing that made me start hating dependency tracking was say i install KDE from subversion, then install amarok from package (a binary compatable version), i don't want my subversion install of kde overwritten
bricecube
Stormchaser, besides that... does that look OK?
Stormchaser
subversion? Why the heck don't you compile amarok as well?
fred87
and yes, i know you can tell the DB you've installed it manually, but to me that's more hassle than no dependency tracking
lra_
you know, i would program a hotornot script, but i'm thinking there has to be one free one out there!
does anyone know of a decent one?
itrebal
lra_: like ratemygirlfriend.com ?
or ratemypoo.com
Stormchaser
lol
Jymmm
itrebal SMF
Monkey_b
lra, of course there has to be
lra_
yeah
Monkey_b
try hotscripts or something
nekrom
if my server is not saving the value of session variables what do i have to do to fix that
lra_
yeah - hotscripts is all paid
itrebal
Jymmm: eh?
fred87
Stormchaser: okie, say on suse i ran yast online update, it would then insist on me either installing kde packs or removing yast's kde support
Monkey_b
no its not, they have tons of free stuff
lra_
i'm sure though anything i get for free will have holes in it
Jymmm
!+smf
stormbot
[SMF] Sick Mother Fucker
fred87
(this is based on suse 9.1, not used it for a while)
itrebal
haha
lra_
i'm weighing up, to either dl and repair, or make own
Monkey_b - all the hotornotscripts are commercial
itrebal
lra_: make one, cant be that hard
Fushuing
like i was aying...
Monkey_b
o
yea its gotta be pretty easy actually
Fushuing
until when is a unix datestamp valid?
Jymmm
tomorrow
Monkey_b
like 2030 i think
fred87
or suitable for you possibly; if you remove ubuntu's X package, compile xorg 7 from source for XGL support, and don't touch the DB; what happens when you next try to install an xap package
Stormchaser
yesterday. It already expired.
rawtaz_
question, regarding max_input_time.. if i have a user that has a crappy line and it would take him 3 minutes to upload a file, and i have max_input_time = 60, is he going to be cut off?
itrebal
2038
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 next »