« first day (929 days earlier)      last day (4244 days later) » 

13:00
@tgkprog okay
Thanks everyone
bizeedee version better
"Angular is what HTML would have been were it designed for applications"
@Gordon: thanks, will test out 3v4 :)
@Gordon: another thing that shows me is how much more resources PHP consumes these days compared to when i started using it
user652649
i've tried also with ->bindTo but i'm still getting the error
You know htose moments when you want to go like AAARGHHHHH!! on your desk?
Happening to me right now
@Duikboot Happens each time I open stackoverflow.com/questions/tagged/php
13:07
Hahaha
@Gordon hahaha or when I'm parsing html with regex :D
Rao
Rao
anyone knows sql here? nobody in SQL chat room so asking this question here, how to use BETWEEN twice in an sql statement? Is this statement valid? SELECT COUNT(*) AS month_count FROM wp_postmeta WHERE meta_key='from_dt' AND meta_value BETWEEN '$st' AND '$end' AND BETWEEN '$st1' AND '$end2'
@bwoebi there's no question at that URL :O
@Ocramius Does your browser have some self-recovery from the segfault this question must have caused? (and jumps automatically back?)
13:10
concon
@bwoebi hey but I have to admit that the OP has put some effort into drawing that DIV !
@HamZaDzCyberDeV Which div-container?
@Rao why not use parenthesis like ( expr BETWEEN min AND max ) AND ( expr BETWEEN min AND max )?
@bwoebi those stars xD
@tgkprog done! thank you><
user652649
13:12
Rao
Rao
@hakre like this? SELECT COUNT(*) AS month_count FROM wp_postmeta WHERE meta_key='from_dt' AND meta_value (BETWEEN '$st' AND '$end') AND (BETWEEN '$st1' AND '$end2')
@Rao no, like I wrote, expr in my example is meta_value in yours.
Anyon ehere used FPDF ?
@HamZaDzCyberDeV Aren't they placeholders for some garbage?
@Duikboot yes, why do you ask?
13:14
@Wes wtf?
@Duikboot mpdf i've used, its simple, elegant and perfect solution
Rao
Rao
@hakre SELECT COUNT(*) AS month_count FROM wp_postmeta WHERE meta_key='from_dt' AND (meta_value BETWEEN '$st' AND '$end') AND (meta_value BETWEEN '$st1' AND '$end2')
user652649
@Ocramius i'm trying to bind a closure to an object as php.net/manual/en/closure.bindto.php
@Rao looks much better, yes.
user652649
but for some reason it doesn't work... am i doing something wrong?
13:16
@iroegbu ummm... and how is that a bug report?
@Wes hmm, but when you create the closure, there is no $this so you can not bind it later on.
I have to add an image to a table
in the header values but that seems not so easy
@HamZaDzCyberDeV I had the same thing, but it's not that hard actually.
user652649
@hakre yes but if i do in the global scope, i don't either have $this, but it works
@Wes so why don't you assign it then to a static member variable of that class while in the global state and re-use it later?
well probably not what you want, but as long as you're concerned to keep that with the class.
user652649
13:19
@dragon112 so you're now a ZZP'er?
user652649
eval.in/19818 fixed the example here
@Wes $a->clos(); << why do you try to call the method clos of the object in $a?
@Wes Okay, I would say this is a flaw / shortcomming of the parser. The parser detects $this inside a static function body without testing that it is actually inside the function body of a closure.
What did @ircmaxell or @NikiC said to that?
user652649
user652649
13:21
@bwoebi yes fixed :P
@hakre The $this of a closure is automatically bound to the class in which it is; and a $this in a class context (even when it is static) is bound. And only after binding it checks if a $this is possible... wtf :|
@Wes very weird
@bwoebi Well it first - because in a static method - should be then bound to NULL? In static context $this does not exists. So how to show it is unbound?
user652649
@hakre i think because static methods can also be called in an oop way.... static test() can also be called $instance->test()
@Wes not with E_STRICT enabled. And in fact, the reason it still works is pretty much a bug ;)
13:25
@Wes This does not answer my question. If $this does not exists, to what should it be bound? NULL? Would binding $this to NULL make sense?
user652649
@hakre $this is resolved at the method execution, means that any static method is also bound to instances, so $this is available
@Wes not when you call from non-object context.
user652649
yes, but rebinding should work anyway
user652649
i was dreaming some refactoring :(
13:29
@Wes eval.in/19840 -yes, that's why I just ask, getting closer
Does anyone knows in FPDF how to add html in an array?
I have to add <br /> to an item in an array but it won't render.
I could try using html into a variable and then passing into the array?
@Wes Yes, it should be NULL, here is a good demo: eval.in/19842
user652649
@ircmaxell should i open a bug report?
go for it
I think we should report this as a flaw in the parser.
The fatal error given is likely not because of the closure, but the surrounding static methid which should be out of scope at that time.
13:32
@hakre it's not in the parser
I'm just searching the documentation about static closures, but I don't find it? where is it?
@ircmaxell don't mind me... it was totally my fault
Fatal error: Call to undefined method PDF::WriteHTML() in afjlaskfjas;lfkajf
@iroegbu I knew that before you said anything :-P
Stupid mess
13:34
@ircmaxell yes, just seeing: eval.in/19843
@ircmaxell lols! was hashing the first arg.
I need lunch
4
Q: Anonymous Function/Closure and using self:: or static::

Devin DixonI am working with anonymous functions where I am creating anonymous function outside of the object, and then adding it to an object later in which it will be used with __callStatic magic function. The closures that are being added to contain methods from the parent class. I am wondering if I woul...

@hakre I search for static function () not for closures in static context
Rao
Rao
13:41
how to get current year in epoch ?
Rao
Rao
in php
@ircmaxell lxr.php.net/xref/PHP_TRUNK/Zend/zend_closures.c#94 Isn't there some RETURN_NULL(); missing after the error? As it is being bound even when the warning says that it shouldn't be?
@bwoebi interesting... give it a try
13:47
Can anyone see what I can be doing wrong? I receive no errors and I used the manual to create this pdf : pastie.org/private/qsyt92aanwtbhnq8vausma
The problem is the HTML text won't render.
The result is exactly the written $html string as in the code.
they are different object instances
Question: I've a table users, I want that each user can create his own registration form, so he can add input. Now how should I design the DB ?
+-----------+----------------------+------+-----+---------+----------------+
| Field     | Type                 | Null | Key | Default | Extra          |
+-----------+----------------------+------+-----+---------+----------------+
| user_id   | smallint(5) unsigned | NO   | PRI | NULL    | auto_increment |
| username  | varchar(255)         | NO   |     | NULL    |                |
| password  | varchar(255)         | NO   |     | NULL    |                |
| email     | varchar(255)         | NO   |     | NULL    |                |
@Rao AND meta_value BETWEEN '$st' AND '$end' AND meta_value BETWEEN '$st1' AND '$end2'
I've though of creating dynamicaly additional tables, but I thing that 's wrong to do
Can a user create extra fields?
13:50
yes, that's the idea
Are they limited?
the input or the users ?
input
root# php ../buggy_static_fcts.php
PHP Warning: Cannot bind an instance to a static closure in /private/var/root/buggy_static_fcts.php on line 16
Fatal error: Function name must be a string in /private/var/root/buggy_static_fcts.php on line 22
@bwoebi oh, then what should static function () do?
13:51
Hmmm, I can manage to limit it, but I think there would be min 10 input
seems to do what it should
hmmm
as after the binding it returns null what's clearly not a valid function
Worst case 20-30 input for each user :(
I was a few weeks ago also thinking about such logic but It's not easy because
a user can create every field he wants
13:52
@hakre lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y#815 There's some entry in the parser, but I don't know what it should do.
@ircmaxell But what's wondering me, is that closure->func.common.fn_flags & ZEND_ACC_STATIC is true... are you sure that there is no problem in the parser...?
yes
it's not in the parser
Ideally there would be just one or two tables, but I'm thinking how ...
@HamZaDzCyberDeV I work 40 hours for my boss and I'm still a ZZP-er in my spare time. Makes for a nice bit of extra cash :D
13:55
@dragon112 nice :)
And I enjoy both jobs, so I'm happy with this setup ^_^
great man ...
It's overkill to create for every user a new table.
But mayb that can be an option
@Duikboot The problem is if I would have 100 users
It's not an overkill, it's just dumb
have fun with the open tables cache
13:57
Indeed it's dumb.
morning
But what can be a good solution for this?
@Ocramius any suggestions ? I'm against the idea of "dynamically"creating tables, but how can I manage to let users create custom input ?
@NikiC Hello !
Maybe you can create a user table and add a fields table.
@HamZaDzCyberDeV eav-style or just save blob into the fields
13:58
Then you save the user id in the table
(json or xml is better)
for the fields table and you can create there the fieldnames/
just love 3v4l. Great service. Specially for testing something quickly if you are not sure.
@Duikboot well to make it complexer, each user can create something like a sign-up form. So I have also to save each sign-up
13:59
I think XML will be the best option... user_id in db could be used as file names for XML files
@Ocramius hi
@NikiC good morning!
@Eugene ello'
Try to start simple.
So a table users, each user has it's own xml/json file, and in the JSON/XML file I've to save the sign- ups ?
14:01
But couldn't it be a solution to do that? Save the static information in a table. And create a variable_data table where you have id | user_id | fieldname | ?
@Ocramius wanted to ask you previously, about why aren't you anymore working with Doctrine2 project? If I understood correctly
@Eugene I am working on it, just no time atm
ah so
id | sign_up_id | user_id | fieldname | value ??
14:04
yes that's what I would try
@HamZaDzCyberDeV In what region do you live?
( Can anyone see what the hell I am doing wrong .. i have to parse the left 3 senteces in the right table
sounds good, gonna try it and wait for confirmation ...
@dragon112 amsterdam
@Ocramius ou. Okay then. I thought, that maybe something gone wrong with project and you abandoned it.
morning folks
14:06
@HamZaDzCyberDeV Near amsterdam is quite a lot of work. My region (Nijmegen) is pretty slow on the programming jobs front
@Eugene nope :)
@Ocramius by the way if I would like to help with development of this project, where would be the right place to start? Would you suggest anything in that department?
@Eugene take a look at the open issues ;)
@dragon112 I searched, the problem is the following, They mostly want:
- HBO diploma/level
- Fulltime
- Experience with OOP
@Gordon ERROR 1146 (42F00): Too much gravity, cannot retrieve
14:08
I watch a lot of The Sopranos, but never quite got my HBO diploma
what's HBO? O_o
-_-
hbo.com
:D
@Ocramius HBO is a level of study here in the netherlands
@Duikboot yes, tried to google it and that's the only thing I found :D
@HamZaDzCyberDeV gotcha... well, move 50Km in any direction and you're out of NL =D
@Ocramius but HBO level doesn't say much about your actual level :p
14:11
@HamZaDzCyberDeV Well I found the same problems. I'd say look for a job at the student uitzendbureaus
@Ocramius Not really but close enough :p
@dragon112 hmmm ok thanks ...
@Ocramius an HBO school is the same as a University of applied sciences in the US
Well in informatics it is anyway
@dragon112 HBO == university ????
@Daniel you're from the netherlands?
14:12
nope, usa here
Yes it's the practische side of the university
@Duikboot what's wrong with your script ?
basically
The 3 lines on the left needs to be in the table
right
but I can't get it working
Im going to eat my shoe from frustrations
14:15
But that'd be uncomfortable..
@dragon112 I saw some HBO students build a website it was a biiiiig mess ...
CSS: massacred
security level: -1000, using md5 for passwords, almost everywhere XSS exploits and more ...
who's using md5 for passwords?
@ircmaxell hahaha some guys who were at "HBO" level :p
@HamZaDzCyberDeV What year were they in?
14:16
@ircmaxell People who should be shot on sight :)
user652649
@HamZaDzCyberDeV That explains. The first year is basically for free. I didn't learn a single thing in the first year
So they are hardly on the HBO level, HAVO+ at best:p
They're on the Cinemax level instead
14:18
@dragon112 ah ok, well they told me the same thing. They were actually surprised that I got in and powned their passwords xD
@ircmaxell I am pro, I use encoding :X
@HamZaDzCyberDeV I actually made a little website (just for fun) when I was in the 4th year of VWO (like a gazillion years ago - 7 to be precise) and I stored the passwords in plain text...
I still have it laying around on a cd somewhere :p
Do you maybe have a suggestion how to solve my issue?
@dragon112 Well that was something like for practice ...
This one was for a product xD
Uby
Uby
So, I sent an email a while ago to a woman (she works for one of our clients) asking for a tech modification: we need all data encoded via base64.
She kindly replied to me this way: "Ok, I just contacted our tech provider and asked for base69 encoding"
Now, Freud could help us, here :P
14:22
@Uby next time request it in BIN form lolz
@Uby you don't understand, it was a hidden message
@HamZaDzCyberDeV That was not even practice, it was just screwing around xD
Uby
Uby
@Ocramius I really hope she won't notice it, there are like 5 other guys in CC
that would be embarrassing
I mean I was just a kid with like no programming skills :p
14:24
@dragon112 lolz that's a start :D
lmao @Uby
14:41
@ircmaxell what's wrong with md5 with a long enough salt? (incl. some modifications to the string so that when you try to guess, you think you have the wrong result)
@ircmaxell explain!?
@bwoebi no. Everything is wrong with that statement
(btw. no, I don't use it^^)
14:43
@ircmaxell then please explain all the wrong parts
The MD6 Message-Digest Algorithm is a cryptographic hash function. It uses a Merkle tree-like structure to allow for immense parallel computation of hashes for very long inputs. Authors claim a performance of 28 cycles per byte for MD6-256 on an Intel Core 2 Duo and provable resistance against differential cryptanalysis. (Microsoft PowerPoint file) Speeds in excess of 1 GB/s have been reported to be possible for long messages on 16-core CPU architecture. The design of Merkle tree is based on the claims from Intel describing the future of hardware processors with tens and thousands...
wow, didn't know that it exists ...
I only don't use it because I've to often read that md5 is bad...
(also md5 with salt I mean)
@ircmaxell nobody says that we shouldn't use loads of times md5, so that it is as slow as other hash functions?
43
A: Is this a good hashing password function in PHP? If not, why?

ircmaxellThe code that you have given is a port of PHPASS, specifically the "portable" algorithm. Note the qualification of portable. This will only apply to the phpass library if you pass true as the second constructor parameter. From here on out in this answer, phpass refers ONLY to the portable algorit...

14:48
@ircmaxell what about a million times md5?
Ok guys, I'm off and thanks for the help !
See ya ... !
> So pbkdf2 is approximately 37.5% stronger than phpass when using the same primitive (md5 in this case). But pbkdf2 can also take stronger primitives. So we can use pbkdf2 with sha512 to gain a very significant advantage over the phpass algorithm (mainly because sha512 is a harder algorithm with more computation than md5).
> One example of the stronger nature of bcrypt is the fact that bcrypt uses a far larger internal state than a normal hash function. SHA512 uses a 512 bit internal state to compute against a block of 1024 bits. bcrypt uses instead about 32kb of internal state to compute against a single block of 576 bits. The fact that bcrypt's internal state is so much bigger than SHA512 (and md5 and phpass) partially accounts for the stronger nature of bcrypt.
@bwoebi (int) md5($password) is safest - almost ensures login on 10th attempt :D
@Ocramius why not just mod 1 the value the string would be evaluate, if there would exist integers of very big size...
/me sighs
14:52
@ircmaxell why so serious? :)
Desparation?
@ircmaxell Wow that's pretty interesting!
The funny thing about password hashes that people still feel the need to argue over it...
When the lady smiles !!! She holds me in her hand! ♫
14:56
@NikiC hence the sighs
people still think they know better, even though no expert disagrees...
@PeeHaa埽 both for me :-D
@NikiC dude, password hashes are expensive, use tinyint(1)
2
that feeling: when someone wants to kick you badly
@Ocramius Why not tinyint(0)?!
(aka no column at all)
much more efficient
15:06
yay free login
What channel do I have to join for VPN questions?
@ircmaxell I don't know better, I'm just asking why. I want to understand...
user895378
15:22
> I checked, google can't ban you, so don't worry, no matter what you do
user895378
lol apparently google is a public utility now.
Google --- a service of the World Government
@Gordon Uhhhmmm twitter also does silent data transfers
15:26
@Gordon what's MySpace?
That table could have been a lot simpler with two columns. 1. is an US comapny 2. is not an US company
> Twitter’s policy is to notify users of requests for their information prior to disclosure unless we are prohibited from doing so by statute or court order.
3
@PeeHaa埽 ^
@PeeHaa埽 LOL
about right.
user895378
@PeeHaa埽 Yeah, the big 'net companies in China are super transparent.
@Gordon Which brings me back to my point about us vs non us ;)
@rdlowrey :-D
user895378
15:29
Of course, in America the giant companies more or less run the government so they aren't going to deny their own requests.
user895378
@Lusitanian Long time no see. Being a teenager getting in the way of your online obligations?
@rdlowrey something like that
SO will find it in its heart to forgive me
how have ya been
also the main reason has been (redacted), and also (removed)
user895378
heh
that and these crazies making ridiculous requests for PHPoAuthLib @PeeHaa埽
user895378
I'm well, thanks for asking. All the stuff we had discussed re: the server has been implemented short of the SNI which just isn't an option because of how PHP's streams are currently implemented.
user895378
15:41
Also, now you can use it as a reverse proxy in front of say, a regular php app running on apache or nginx, and layer websocket support on top of an existing application without altering any of its code.
can you then run it behind another reverse proxy?
user895378
absolutely.
varnish-aerys-nginx-apache2
lol? user asks question, finds answer elsewhere, fixes his code, adds as answer to his own question, links other, accepts. I don't need to say please, right? stackoverflow.com/questions/10655374/…
@hakre LOL
user895378
15:43
@Lusitanian lol yep. Although you won't get too much benefit from adding the varnish in front if you do a good job implementing your own app-specific caching rules as aerys mods.
user895378
That's for one box anyway. Using varnish as a front-facing load balancer is still useful otherwise.
@Lusitanian But but but Phil Fucking Sturgeon!
truee
@PeeHaa埽 is genius
very genius.
who are we, mere mortals, to question His wisdom?
@PeeHaa埽 yea, sorry about that one. I may have pointed him towards phpoauthlib.
@igorw lol
when was this?
@Lusitanian march, at PHPNE
@hakre - is that your job?
@Daniel yes, I'm janitor for the php tag. why do you ask? :)
15:52
@hakre Just curious, didn't mean that as sarcasm. You seem to do a good job of it lol :)
@Daniel That's the only reason we allow him in here
lol
@Daniel sarcasm? I still don't get how this word is used in the english language. Looks like it is incompatible with the internet.
And now freedom. Cya all laters
@PeeHaa埽 tzeeuuu
15:55
how do I turn off type hinting? do I have to set an error handler for E_RECOVERABLE_ERROR.. then what?
@hakre I agree
> E_RECOVERABLE_ERROR: An error situation occurred, which is probably dangerous for a script to continue, but does not leave the Engine itself in an unstable state. If this one is not caught in a user defined error handler, the application aborts.
30
Q: How can I catch a "catchable fatal error" on PHP type hinting?

hoballI am trying to implement Type Hinting of PHP5 on one of my class, class ClassA { public function method_a (ClassB $b) {} } class ClassB {} class ClassWrong{} Correct usage: $a = new ClassA; $a->method_a(new ClassB); producing error: $a = new ClassA; $a->method_a(new ClassWrong); ...

thx!
hey all. anyone here use jquery file upload (blueimp.github.com/jQuery-File-Upload) with codeigniter?
@RichK. and you can not turn off type-hinting AFAIK.
15:57
@hakre ok thanks! legacy drupal stuff, actually future legacy since it's d7 webforms problem...
@RichK. You don't

« first day (929 days earlier)      last day (4244 days later) »