« first day (670 days earlier)      last day (4275 days later) » 

6:00 PM
I just don't want to spend the time lol
 
@LeviMorrison just browse , plenty of answering to be done there :P
 
eaj
CakePHP question: If all of my forms (other than the login) are only available to logged in users, is the SecurityComponent still useful (assuming I use $fieldList on Model->save())?
 
@LeviMorrison it is PITA
 
@eaj just because you cannot see the form does not mean that you cannot post to it
then again , you are using Cake ...
 
6:07 PM
mmmmm.... cake
 
Chocolate Cake?
 
@tereško I just thought of a benefit of abstracting the domain object's data into a $_data array (the one with magic methods, etc) - When inserting into the db you won't have to check for null/invalid values on fields that aren't set
 
which is all fun , unless you actually want null values
 
eat more plum cake folks. it's the time of the year.
 
Optional fields that are default NULL have to be validated and set to a value that mysql will accept, which will mean lots of if()s or a big switch
 
6:16 PM
@orourkek , if you do not have the objects parameters defined, then it becomes harder to understand the code
and there is no need for such array , since you could always do get_object_vars( $this )
 
So in a method like DomainObject->validate(), how would you check each value? Individually?
validate() would be called before sending the DO to the DM for insertion, as an example
 
each value usually has different validation rules
 
@tereško foreach(get_object_vars()) kinda goes out the window, unless you use a switch to determine what type is expected in the db table, no?
 
it depends on what you actually want to do
it was not meant for use in validation
 
hmmm, one sec
an abstract example: hastebin.com/vonukijajo.php
would you suggest having default values for the member vars?
(to make pre-insert validation trivial/not required)
 
6:24 PM
@Lusitanian Nopez :P Might be the client. I have a good bottle of whiskey on my desk and just got home walking the dog. I'm so going to get rid of this issue now :)
evening all
 
@PeeHaa herro
 
@orourkek Sounds like meta-data to me.. perfect for annotations
 
@LeviMorrison I just saw a bug a minute ago that mail validatoin does not allow domains without tlds
are you sure that you got that the right way around?
 
poor user1581488
 
6:30 PM
@tereško how would you keep track of the validation rules for each? hard-code them into the validation method(s)?
 
user895378
If I can get just one upvote on a competing answer I'll get a gold Populist badge. Come on people, surely someone thinks the accepted answer is worth another upvote :)
 
@rdlowrey tried on this one, but it didn't work :{
 
^ and when closed, please vote for deletion.
 
user895378
@orourkek You're a hero. It'll award it eventually :)
 
6:37 PM
it's a great answer
 
user895378
I desperately want to get a gold badge that isn't "Fanatic" :)
 
no shame!
 
rdlowrey, Myrtle Beach, South Carolina, United States
6.5k 1 8 28
 
rad
waddup people!
 
@rdlowrey not enough jquery :)
 
6:39 PM
@PeeHaa I used revert, because the OP had deleted all the question
 
user1596138
Anybody wanna help me figure out why my php script to send forminfo to my email only works in firefox...
 
@Jocelyn I noticed :)
 
there is no such thing as too much jquery anyway :-D
 
rad
anybody up for my problem related to perl? stackoverflow.com/questions/11993415/…
 
user1596138
6:40 PM
It worked yesterday in Safari and opera... Then this morning it just... didn't.. lol.
 
@JosiahSouth Do you have a short snippet of relevant code with a specific question / error message?
 
@rdlowrey Try answering lots of questions asked by a user with < 50 reputation.
Usually they will accept the answer but not up-vote it, so you will get the Unsung Hero badge.
 
perl...sorry I give up.
 
user1596138
Thats another thing... Is there an error console for php??
 
user895378
@ShaquinTrifonoff Yeah, I'm actuallly fairly close to that. I need 5-10 zero score accepted answers to get it.
 
6:41 PM
@JosiahSouth yup it's called a browser / command line
@JosiahSouth I suggest you look into that stuff before asking for any help
 
user1596138
@peehaa care to elaborate..? I don't need smug crap... I'm new specifically to php, not life.
 
rad
@Jocelyn I think its an issue with permissions
 
@JosiahSouth I answered you and this is what I get?
 
rad
I am not sure though
 
user1596138
No lol you didn't answer me. You demeaned me.
 
@Jocelyn That's funny. deleted 901 characters in body. He did practically 'remove' his question.
 
yes, he removed everything and added a line to say "Someone told me he would use my username, then I remove my code"
it was a comment by @webarto about LittleBoBByTables (SQL injection)
@rad I'm not the right person to help you with perl or linux-related questions. But someone else will surely be able to help you
 
Debugging should be one of the first things one should learn when programming. If you have trouble with that you have already failed @JosiahSouth
 
rad
@Jocelyn I am sure somebody will :) I love this site!
 
who wants a "MySQL headache"? stackoverflow.com/questions/11993389/…
 
6:47 PM
> Problem: Query takes over 30 minutes to run. I would like to get this down to under 10 seconds.
 
@NikiC I know that the implementation has flopped back and forth. There have been multiple bugs on it.
 
rad
@Jocelyn thats headache and racist too! ;D
 
I had not even noticed the field names!
 
@NikiC It appears that emails require TLD.
It seems then I would want an option to NOT require TLD.
It needs both behaviors in my opinion.
 
@LeviMorrison Isn't that a known issue?
 
6:56 PM
but contrast that to viper-7.com/wk8jC5
I am fairly sure that at some point I ran the tests and it did allow emails without a TLD.
Certain versions validate it and others don't.
 
@Jocelyn who what where
 
It seems that the intended default behavior requires a TLD. That's perfectly fine, but there should be an option to not require a TLD.
If it didn't require a TLD, it should have an option to require it.
Just restored the CV backlog.
 
@webarto I was wrong, it was a comment by @PeeHaa (read the first comment): stackoverflow.com/questions/11993233/…
 
@Jocelyn yeah yeah, I don't recall that question, that is why I asked.
 
7:00 PM
@PeeHaa Yeah, that's the bug I was referring to
 
saw it cause rasmus answered it just now
 
"Removed. Someone said he would take my username. Thanks for the help guys" LOL
 
How do you force a space between code blocks in a question, without having characters there? (if you can)
 
@PeeHaa: you are frightening the kind and hard-working PHP newbies :-p
 
7:01 PM
Okay, I think I'm getting to the bottom of the mysqli_fetch_field() issue. It seems to return charsetnr 192 for all columns, regardless of collation. So maybe it has some kind of collation-promotion :/
 
@rdlowrey woot!
 
@orourkek Well done!
 
@NikiC :P
 
I just voted, he did the heavy lifting :}
 
@orourkek <!--
 
7:04 PM
@PeeHaa tyvm!
 
np
 
@rdlowrey You're on StackApps too!
 
user895378
@ShaquinTrifonoff I signed up for StackApps with the sole purpose of upvoting the cv-pls plugin :)
 
user895378
@orourkek thanks!
 
user1596138
@peehaa I know that. That's why I asked.
 
user1596138
7:07 PM
I absolutely hate php. And have no clue how everything works.
 
user1596138
I do well learning from experience. Not books. But it takes time and sometimes you get stuck.
 
@JosiahSouth Have you checked the manual at some point?
 
@JosiahSouth I like learning from experience too.
 
@JosiahSouth Of course getting your hands involved is important, but please don't give up on reading. It's critically important in this field.
4
 
0
Q: How to validate domain object data before database operations?

orourkekI'll use an abstract (and simple) example to illustrate the question: CarDomainObject, as follows: (example mysql data types are listed beside the members) class carDomainObject extends DomainObjectAbstract { public $uid; //int public $make; //varchar pu...

 
user1596138
Alright. I need a good book or two...
 
user1596138
Annndddd.... @ShaquinTrifonoff has solved my problem...
 
rad
does anybody know how do unzip or uniso an ISO file?
 
@rad With PHP?
 
user1596138
Winrar used to support extracting iso's.
 
7:12 PM
"uniso" :}
 
user1596138
@rad
 
user1596138
@Rad or theres a multitude of iso mounting software for all systems... Just copy the contents? If you're using linux it's built in, if you're not... you should be ;P.
 
rad
in UNIX shell :-|
 
@rad system("mkisofs -R -J -v -T path/");
See the comments (and the answer) here: stackoverflow.com/questions/5077272/…
 
user1596138
Oh haha you should've said you wanted to use the shell for it... How were we supposed to know?
 
rad
7:17 PM
thanks man
one more question
in UNIX, is there a way to pass the password along with sudo in a single command?
 
@ShaquinTrifonoff Hi.
 
user1596138
Ok, so I have a form on one page, when I submit it to my php script it emails me the values I need (it's for a classified ad...). Then on contact.php where the form submittied I have another form, this form is for a paypal button. My price is never the same so I have a hidden input field on the first form that I need to copy the value of into the same field on my second form on contact.php. Make sense? How would I do this in php?
 
Hi @Troy.
 
@ShaquinTrifonoff How are you doing?
 
lol
Why do computer programmers get Halloween and Christmas confused? Because Oct 31 == Dec 25. I'll get my coat, shall I? — andrewsi 21 mins ago
 
user895378
7:22 PM
@PeeHaa lol nice
 
I'm surprised you didn't know that already :P
 
user895378
I haven't ever heard that joke before
 
@PeeHaa I've heard that one before.
 
Nopes never heard of it before. I suck! :P
 
@ShaquinTrifonoff Did you create the 404.html file? Did it work?
 
rad
7:25 PM
is anybody here familiar with sudoers?
 
@Troy No, it didn't... [here is the comment I've been typing] I found that sometimes a 404 error will trigger a 500 server error, so setting ErrorDocument 500 '...' worked for errors, but then with 403 Forbidden errors, the default 500 server error would display. But then the server stopped doing that, and on 404's, it would display the index.php page. So... now I'm coding index.php to detect if the page does not exist, and if so, display the error page.
 
@ShaquinTrifonoff I see..
 
rad
guys
how do I use sudo -p ???
I need to pass the sudo password in a single command
 
user1596138
Why do you need to pass it in a single command? @Rad
 
rad
@JosiahSouth I am executing that command using a perl program, is there a way to pass the password if it is prompted by sudo? it would be the best if all that can be done in a single command
 
@ShaquinTrifonoff Sent you an email.
 
@rad The best option would be to run the Perl program as root.
 
rad
@ShaquinTrifonoff I have built a html/javascript/php form that would compose the command and the php program would call the perl program, user apache is being used in this case. I am using sudo so that I can be root...
 
user1596138
@rad @rad Oh I see..... As far as I know there isn't a -p function for the password. I think -p is prompt? i've never used it.
 
rad
7:38 PM
@JosiahSouth yes, -p is prompt
 
user1596138
@rad Oh, password still though... I see.
 
user1596138
Shouldn't you just use su?
 
rad
@JosiahSouth I dint understand it completely though, "override the default password prompt and use a custom one"? what is the custom one??
let me try su
 
@rad echo "password" | sudo -S ... <-- try that
 
user1596138
I think it means you can change the prompt... So instead of the prompt reading "password:" you could make it say "cows:" or something similar.....
 
rad
7:43 PM
@JosiahSouth lol
@ShaquinTrifonoff sure, will try
apparently, my program takes about10 minutes to execute
sorry about that
you can find my code here in the question stackoverflow.com/questions/11993415/…
I just posted it
 
user1596138
@rad I'm serious haha
 
rad
@JosiahSouth I get it :)
 
user1596138
hahaha ok
 
rad
@SomeKittens ahhoh
 
7:55 PM
?
...how on earth did that get two upvotes?
 
user1596138
lol terrible...
 
hey guys ! I got a couple good advice, but still did not got the correct answer for this
4
Q: Cannot call the same static method from identical method from the same class

WalkmanI have this error controller in my Codeigniter 2.1.0 application: <?php class Error extends CI_Controller { public function __construct() { parent::__construct(); } public function index() { set_status_header(404); $data->menuItems = Main::_men...

any codeigniter advice appreciated :)
 
codeigniter advice: Don't use codeigniter
11
 
why ?
oh, I know ! I should use Kohana, right ? :D
 
wow, another one
0
Q: Require @ in registraion

NathanI have an html and php registration form, however people can currently register using anything, how can I require them to have an @ and .com in the email for registration. Perhaps I'm an idiot and just not wording it correctly but google is not helping much :/ thanks!

John Conde also believes that email validation has never been asked before
 
8:06 PM
Dojo rocks
 
(╯°□°)╯︵ ┻━┻
filter_var('bob@example.com', FILTER_VALIDATE_EMAIL);
is a +10 answer these days
 
rad
wow, it +'ed exponentially ;D
guys, I wanna ask this question again as I havent got any answer yet: Is there a way to pass the password in the sudo command without having it prompted?
 
@rad Did my code work?
 
For once @NikiC you agree with me :)
 
rad
8:16 PM
@ShaquinTrifonoff yes it did, but I am working on the core problem right now
 
@MikeB I always agree with you
 
awaits snarky followup
 
No snarky followup :P
 
filter_var('bob@example.com', FILTER_VALIDATE_EMAIL); returns false or string, right?
 
mysql resource actually
 
rad
8:18 PM
@ShaquinTrifonoff any idea? Is there a way to pass the password in the sudo command without having it prompted? In a single command I mean, like sudo -p mypassword test.pl
something like that
 
 $is_valid = filter_var('bob@example.com', FILTER_VALIDATE_EMAIL);
suggests it is boolean... when in fact, it doesn't have to be...
 
@rad See the 'sudo Manual'.
It doesn't look like you can, unless you echo the password to sudo -S.
 
rad
@ShaquinTrifonoff echo the password to sudo -S ?? how do I do that?
sorry I am new to this
 
@rad What I posted before: echo "password" | sudo -S ....
Does it work or not?
 
rad
@ShaquinTrifonoff oh, I though we were asking about the extraction of data from ISO, sorry
I am not sure how do I put it in the perl code?
the code is right here: gist.github.com/82e81240a3ec2a996fb6
and, do you mean "echo whatever_password | sudo -S ..." ??
@ShaquinTrifonoff echo password | sudo -S dint work :(
 
8:33 PM
@NikiC Count me in :) - one more to go!
 
@rad - The string to be echoed has to be in quotes, e.g. echo "i7S8jd9din3" | sudo -S ....
I don't know Perl, but there is a system command.
 
rad
@ShaquinTrifonoff so the password "i7S8jd9din3" will be passed to the command, right? Let me try that
that dint work:(
 
@rad It should work if you use system. See this link.
 
rad
@ShaquinTrifonoff yes I am using system
 
sudo reads the password from stdin, so if you echo the password to sudo, the command will execute. (At least by theory. Did you read the link?)
 
8:48 PM
sometimes i am disturbed by the ignorance of my acquaintances
> All that stuff that’s stressing you out — it won’t matter in 5 years. Perspective is a good thing to learn.
what a piece of bullshit : i am stressed about money , time and mortality
 
rad
@ShaquinTrifonoff wow, I like it :)
yes I did
 
@tereško Looks like they definiately don't understand. @rad - I found that by searching for sudo script password.
 
rad
@ShaquinTrifonoff thanks man, I like the logic, but I am wondering why is it not working for me? my command is:
echo password | sudo -S mount -o loop /tmp/test.pl-cache/CentOS-5.4-x86_64-bin-1of7.iso /mnt/CentOS
 
@rdlowrey git push today?
 
@rad It looks like you have forgotten the quotes around you password. Try echo "password" | sudo -S mount -o loop /tmp/test.pl-cache/CentOS-5.4-x86_64-bin-1of7.iso /mnt/CentOS
 
rad
8:52 PM
@ShaquinTrifonoff no, I do have quotes, here is the line that has the issue:
system("echo 'tamale' | sudo -S sudo mount -o loop $c{centosiso} $mp") and die "mount failed: $!";
 
user895378
@LeviMorrison in the next 10 minutes. There are still some things I want to clean up architecturally -- it's become such a large undertaking at this point -- but everything works really well as far as I can see.
 
rad
@ShaquinTrifonoff tamale is the password if you wanna know, lol
 
@rad You'd better change it now that the world knows :-)
 
user895378
@LeviMorrison And there's 0% test coverage on the code right now, but that will change between now and the end of the weekend. The API at least, should be stable. I don't want to add any more features until the current code is fully locked-down and tested, but going forward I want to implement Client::sendRaw so you can send your own raw HTTP message without any processing.
 
@rdlowrey 0% test coverage?
Really?
So unlike you.
Are you okay? Do you need to see a doctor?
 
user895378
8:58 PM
@LeviMorrison lol well it is a complete rewrite of everything. The underlying implementation fundamentally changed. But the other option is just to wait a couple of days to get coverage on it before I push.
 
@rdlowrey No, today is git push Thursday.
May as well commit what you've got :)
 
@rdlowrey place a phar file somewhere, then you have a excuse for 0% coverage.
hi @edorian
 
waves
 
@edorian are you in HH at the weekend?
 
Yeah :)
 
user895378
8:59 PM
@edorian Right on cue, Mr. PhpUnit shows up as I'm about to push something that isn't test-covered :)
 
okay, kewl. :)
 
rad
@ShaquinTrifonoff it dint work :(
 
@hakra Assuming you will be too?
 
@edorian yes, I will be there.
And next weekend is Froscon :)
 
Nice. Will you tell me who you are? :P
I'll also do froscon
 
user895378
9:01 PM
@LeviMorrison Yeah, I mean I've done so much manual testing on the command line I know it works. It's definitely a "buyer-beware, alpha push." Just know that lots of test coverage is on the way this weekend along with resulting commits.
 
user895378
Plus I just want to get the stable API up there.
 
@edorian Only if you sware to not tell anyone :) And I thought you were @ froscon.
 
oO I'm @ froscon, even talking there twice .. confused
You made it rather clear you don'T want it to be known and i respect but it's up to you
I've seen the 0% code coverage thing
But TL;DR
 
@edorian I was hoping to actually debug it finally before leaving to HH
 
All i read was "I hope I can do some debugging session later this day which should reveal better information." and given that you do something I was happy :)
 
9:04 PM
I will say hi naturally, just a bit joking, you know ;)
@edorian Yeah code coverage needs some love.
 
I was hoping we'd 3.7-alpha1 until HH but ... meh
 
It has done so much for me already.
Finding dead code for example. It's just great.
The State of PHPUnit and Clean PHP Code - very nice.
 
The second abstract is not mine
I'm jumping in for a no-show
 
@edorian but now it's no surprise any longer :)
 
@rdlowrey Tests are overrated if you have users :)
 
user895378
9:08 PM
hehe
 
@edorian Users are far better in finding bugs.
 
user895378
Users are incredible at finding bugs ...
 
It's a pity that users are not so much part of development then.
 
@hakra Well they pay for it
one way or another
 
i was offered a programming job for $7 an hour online today.... after calling him out and saying that that was less than minimum wage he called me an idiot because he already has a programmer in india whose willing to do it for $7/hour.... >.<
 
9:11 PM
lol, nice
 
calling you an idiot is also a nice way to motivate you to actually do it for 7$/hour I guess.
 
this guys a complete idiot though. it was in the "request a quote" part of the forum...
 
Good, Fast, Cheap. Pick two.
 
That would be 15k$ a year
 
@Nile sounds more like a "nice try" to find an idiot.
 
9:15 PM
@hakra huh?
 
@Nile the "offer"
 
@hakra Whats the state of PDT?
 
@hakra yeah it does...
 
@edorian No idea. I'm evaluating PHPStorm since longer. Haven't tried the new release.
 
PTI
Ok, you where the only person i knew that used eclipse
 
rad
9:17 PM
good night guys, I am off
 
@edorian I still use it but not that regularly.
 
The phpstorm are really nice people, testing phpunit rcs, giving feedback, fixing stuff
 
user895378
@LeviMorrison just pushed. Quickly updated the example gist. The main new features are streaming request entity bodies (just specify an open stream resource as your request body) and full parallelized requests. Also, connections are kept-alive only for the life of the current process and the max simultaneous connections to a specific host defaults to 5 but can be set as high as 10.
 
But can be set higher, right?
Let's be honest, I could use this thing to crawl my own development site for problems. Since it's a dev site, no worries about hammering the thing.
 
user895378
Client::setHostConcurrencyLimit($maxConnections) will normalize all values to the range [0-10]
 
user895378
9:20 PM
I guess, but 10 simultaneous connections is already really unnecessary.
 
lol
Once I build the crawler, I'll let you know how it goes and if it should be upped.
 
user895378
The class automatically manages them for you -- the moment one request finishes its connection is checked back in to the pool and is immediately available for other requests to the same host to use.
 
user895378
But if it's a problem it's an extremely simple thing to change, so yeah, just let me know if it causes you heartache :)
 
user895378
On second thought, it actually might be nice for load testing ...
 
@rdlowrey PHP would probably run out of memory for that.
 
user895378
9:22 PM
oh, true.
 
user895378
@LeviMorrison All right, I'm away from the desk for a couple of hours. Back later to field questions/complaints :)
 
@edorian yeah, they have an interesting script how they invoke phpunit from the ide.
also they are quite good with bugreports. really a good software company.
 
"interesting" is a nice word for "fixing our bc issues with php style duct tage"
 
can someone say me abot mutant/polymorphic ciphers/encryptions, i know the basics....
 
know the basics...? uh huh
Yo! It's @edorian!
long time no see!
 
9:34 PM
@ircmaxell Sup :)
Did the phpnw thing work out?
 
i mean just for starters what i got from wikipedia
that has a root algo, but kind of masks its algo by repeating itself
but doesnot change the original algoritm
but i want to know in detail
 
@blackbee nobody here is going to teach you anything...
 
na what to teach, just to tell, or tell me some resources
 
@blackbee google.com and in your case "telling" === "teaching"
 
9:38 PM
i searched....... but to know security what matters is specificity
 
@edorian Yup, I'm booked to go
Landing on Friday morning the 5th, and flying out on the 21st
 
@blackbee learn how to speak english first, or with your defense, my response will be: learn how to type english. then learn how to ask questions.
 
there are resources where people have written sha1(sha1()) makes things secure, but now i learnt encryptions donot work like that
 
@ircmaxell Wow. Long stay
 
@edorian Going to tour europe for the remaining 2 weeks
 
9:40 PM
Are you going to be in your UK office for some time=
Even better :)
 
Nope, that was the old job
 
Oh.. yeah. Makes sense :)
 
Now, flying out on Monday to central europe, and will just spend a few days in each city that I want to visit...
 
@ircmaxell happy journey :)
 
looking forward to it
 
9:42 PM
Chances are that by then I'll be living in Berlin or Zürich or Amsterdam.. I'll know soonish but you are invited anyways ;)
 
@ircmaxell Sounds like fun. I'm jealous ;)
 
@edorian none of which are on my list so far :-(
 
What did you plan?
 
Manchestar
 
I always think of "central" Europa as "Germany and stuff around it" cough. Maybe you meant continental Europe
 
9:49 PM
^ your point is?
 
@edorian If you go to Amsterdam don't forget to taste some Dutch liquorice :-)
 
@ShaquinTrifonoff Already taken care off
 
@blackbee Why have you posted a link to tereško's Gravatar?
 
i was testing
:D
 
@blackbee that's not what this chat room is for...
 
9:51 PM
@ShaquinTrifonoff Friends coming tomorrow from Amsterdam, I'll say at the doors, liquorice or GTFO.
 
@blackbee that's not a point...
 
@Nile why are u pissed off with me
 
wow, just wow...
 
well these days i don't have points. .... i am just circling
 
9:53 PM
@blackbee you constantly come in here and ask questions that are easy to google. your english is terrible "when you type" and you're not a real programmer.
 
ow, i am a virtual programmer..... well then i must say, google doesnot like me either
 
@blackbee you also spam the chat room with useless links to teresko's avatar
 
how many times a day do i do that. when i posted pastebin links now one was interested...
and a gravatar link made me a spammer.... then its better being a spammer
 
@edorian I did mean continental...
@edorian Nothing yet. THinking about Paris, Barcelona, Milan and something like Florence or Prague...
 
anyone talking php in here? :)
 
9:56 PM
@blackbee learn the basics before you learn to program. you're worse than a w3school graduate.
@Neon and yes :)
 
mysqli_query($dbc,$yes);
 
@Neon: sorry, nobody knows PHP in the PHP chat room :-p
 
Simple issue is driving me crazy...$start = strtotime("2012-08-16");
I need to get the date portion on this from my MySQl DB
The date is already in this format 0000-00-00
 
@Neon you may be interested in DateTime::createFromFormat() us3.php.net/manual/en/datetime.createfromformat.php
 
@rdlowrey I hate PHPUnit right now.
I'm comparing two objects but it just tells me they aren't the same.
That's not helpful.
 
9:58 PM
they are not, because they don't have the same ID
 
Give me which field failed, or a diff, or something.
    $mailer->expects($this->once())
        ->method('send')
        ->with($this->equalTo($expectedMessage));
 

« first day (670 days earlier)      last day (4275 days later) »