« first day (932 days earlier)      last day (4242 days later) » 

00:00
@tereško the real point is that people should learn programming. which of course starts with the basics of the language and not an advanced framework.
learning programing and learning language are two completely different things
ok.. i might get hammered for this but, when did JS go from a scripting to a programming lang? (or did it?)
some time around 2005th
lots of frameworks invent their own meta language, e.g. drupal, wp, joomla. and amazingly enough some people can be productive in that subset.
@tereško how exactly? what made the change?
00:04
crockford and xhr
tldr, but looks like it's worth it
@tereško XHR has nothing to do with it, it's an awesome 'feature' though
it has a lot to do with it, since that gave rise to mainstream rich client applications in browser
javascript turned from a toy in a proper programming language
it had more to do with perception then anything else
initially it was marketed as a toy , because Sun & Netscape wanted to push Java as the way for browser interactive applications ... and it stuck
anyways, i'm AFK
have fun @tereško
user652649
also jscript, jaxer, rhino contributed
@tereško my point is that learning a framework will not teach you about variables, loops and conditions. those are the things you need to learn, and learning PHP is one way to do so.
I think we agree :)
Anonymous
00:22
check the first ever webpage back online again, created by Tim Berners-Lee and the WWW team
How can I make all my form errors show up in one place rather then each error below or next to the form field that has the error
user652649
@TimBernersLee your HTML is not valid
@PHPfan wow, 75/80 char limit, looks horrible
I have seen it done
Anonymous
lol
00:26
@benlevywebdesign sen them all in a div
@kaᵠ I know how to use divs but how do I control the errors...hold on
@PHPfan I guess they installed varnish
here is my form validation script
`(function($,W,D)
{
var JQUERY4mval = {};

JQUERY4mval.UTIL =
{
setupFormValidation: function()
{
//form validation rules
$("#form1").validate({
rules: {
name: "required",
email: {
required: true,
email: true
},
subject: "required",
message: "required",
},
messages: {
name: "Please enter your name",
email: "Please enter a valid email address",
subject: "Please enter a subject ",
message: "Please enter a message"
},
submitHandler: function(form1) {
form.submit();
}
});
}
}

//when the dom has loaded setup form validation rules
00:43
@benlevywebdesign I though you were talking about php o.O
well thats what the form is written in
but not for validation
@benlevywebdesign better luck in the javascript room
yeah
another thing: is using <fieldset> a bad idea for making forms
can anyone link to me the PHP reference question which covers the most common php dupes?
having trouble to find it atm
Hi guys. I have a quick question. I'm trying to create this random number generator for a registration form. Do you know of any code sample, or example where I can see something similar.
00:52
@Nactus mt_rand(), multiply and floor() it as you need
Fabricio, thanks much.
Though, if you're talking about making a captcha, there are some good libraries out there =]
@FabrícioMatté A simple search query ?
http://stackoverflow.com/search?tab=votes&q=%5bphp%5d%20reference%20closed%3ano%20is%3aquestion
In terms of the design of this thing, I was thinking to have it stored in a db and use it for registration purposes, so ... for instance when users register into my web I'd like to be able to input this random number that has been given to them previously (either in person or via email)
@HamZaDzCyberDeV I wouldn't call that "simple" and still can't find the one that covers all common questions there, I mean
headers already sent, T_UNEXPECTED, that kind of thing
there is one question that covers 20 of those I believe
382
A: Headers already sent by PHP

marioNo output before sending headers! Functions that send/modify HTTP headers must be invoked before any output is made. Otherwise the call fails: Warning: Cannot modify header information - headers already sent (output started at file:line) Some functions modifying the HTTP header are: head...

I'm not looking for a specific one
but rather the general PHP common questions reference
@FabrícioMatté There isn't since there is a lot of "common"
00:57
That wouldn't fit in one question
still not those.. Well I'll @ you when I find it, if it wasn't deleted for some reason
thanks @kaᵠ but it isn't any of those either :(
Simply search by
[php]
add a keyword "headers"
sort by votes
thanks for the tip, wondering whether I didn't dream about that question now
though, the cv-ring should know about it
you mean the cv-broom :p
lol true :P
seems like the question vanished without any trace left, weird
I'll try with advanced google search as well, it has a good cache of SO questions
01:02
better than so's serach
@FabrícioMatté you can check the deleted questions :p
Can I? Sure with 10k rep I can see deleted questions, but unfortunately not search for them :(
Looks like it was deleted, otherwise it should show up on my favorites list.. I think
@FabrícioMatté data.stackexchange.com ?
01:05
I'm not very good with the query explorer but will try it as well =]
ohh damn
I think we should maybe create a reference for the date functions in php ...
I'm tired of questions "How to get the difference ..."
I'm sleeping lol
@kaᵠ Thanks, it was the first question you linked earlier lol my bad, this one stackoverflow.com/questions/12769982/…
@FabrícioMatté -----------------------------------------> it's there --------------------------------->
01:10
I just completely forgot why I needed to find that question now, oh well
@kaᵠ did you solve that problem ?
too cool
oh now I remember, it was for a comment on meta
@HamZaDzCyberDeV had an intermediary solution when time ran out, lost too much time on A on a stupid mistake
ah ok
Im still strugling on how to... :p
Good night everyone !
01:18
ha
Your problem is your usage of mysql_ and not PDO. — Cole Johnson 18 mins ago
the question title is > mysql_num_rows not working properly
night @HamZaDzCyberDeV
night hamza
01:48
const π="3.141592653589793238462643383279502884197169399375105820974944592307816406286‌​2089986280348253421170679";
hey @ka
@kaᵠ
@MalikUsman hi @MalikUsman :P
whats up?
actually i need your help @kaᵠ
i am getting this error
Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://gdata.youtube.com/feeds/api/videos/5Oic" in /home/content/16/8007716/html/video.php on line 28
I want to hide this error if something gone wrong then it show empty response
@MalikUsman just open this in you browser: gdata.youtube.com/feeds/api/videos/5Oic
OK
SEE my script
$vidID = $_GET['video'];
    $url = "http://gdata.youtube.com/feeds/api/videos/".$vidID;
    $doc = new DOMDocument;
    $doc->load($url);
    $title = $doc->getElementsByTagName("title")->item(0)->nodeValue;
    if($url){
    //echo $title;
}
else {
echo "No Video Found";
}
its giving me that warning i want to hide that waring
02:04
that ^ doesn't make sense
where's the if ? nvm, bad formatting
well i am not good in php lol
see if is there :D
well solved :D
i used
error_reporting(0);
@kaᵠ here
?
user652649
02:25
@kaᵠ boehm-stirling.com/motoren.html annoying audio warning
2
03:05
@ircmaxell want to use this in password-advice? stackoverflow.com/questions/16380419
03:52
facepalm
@MalikUsman You didn't solve anything
@cspray omg you're in the room. I emailed you, I pinged you and you finally show up.
@MalikUsman That error is still there, still getting triggered. You just don't see the warnings
@crypticツ You emailed me?
Sorry. I have been busy lately. I got married!
12
yes, it's about the cv-ring page. Let me check the email addy I sent it to: sprayfire.framework at gmail
@cspray congrats! =oD
@crypticツ Ah, yes. I'm about to check that one actually
@cspray also, we got cv-pls.com so the documentation will be moving there.
03:55
Ah, ok
Great
I was wondering about that actually. That somebody more, uhh, involved should probably take it over
And yes please feel free to use whatever you want from that
@cspray thank you =o)
@cspray the site files will all be put on github so if you ever want to modify something just submit it so it can make it to the site.
@crypticツ Okie dokie
04:43
@rdlowrey I don't like that feature. I really don't. When I have 7+ terminal tabs open, I don't want it to be changing rapidly. I just want it to know which task I told it to do.
05:20
Anyone know of a free and reliable hosting service which would be suitable for hosting a single XML file (typically less than 500KB)?
I am working on an idea which might be of use to other Unity 3D extension developers. Those who want to take advantage of my utility would need to host an XML file, but some of these guys do not have hosting. So how can they host a simple XML file without forking out? The XML file would be consumed by their customers in the asset store.
Hi guys
05:55
hey guys
have a question for u
i hv a websocket app, and part of the functionality is for admins only
so i need to verify if a user is an admin
what i do currently, on an admin-only page, is to generate 2 random numbers and sha1 hash them, store the hash in a db and echo the 2 numbers in the page js
(the hash is associated with the user id)
when the page js opens a websocket connection, send the user id and the 2 numbers, the server only allows admin functionality when the hash matches
good enough?
06:11
Post your hash generation code, also are you using HTTPS?
$n1 = (string)mt_rand();
$n2 = (string)mt_rand();
$hash = sha1(sha1($n1).$n2);
not HTTPS
0
Q: Simulating a remote website locally for testing

Benjamin GruenbaumI am developing a browser extension. The extension works on external websites we have no control over. I would like to be able to test the extention. One of the major problems I're facing is displaying a website 'as-is' locally. Is it possible to display a website 'as-is' locally? I want to be...

@TwiNight you should be using HTTPS otherwise you are open to replay attacks tor instance. Anyone who can sniff out those two numbers can run admin operations then. Also you should not be using such a weak form of authentication. Two random numbers being sent to server is not good security.
@BenjaminGruenbaum are you talking about maybe editing your hosts file?
@igorw while I agree with that I'd rephrase it to say classes with no API are useless to prevent the impression that this has to do with private only /cc @PHPfan
@crypticツ if i use https what would be a secure authentication?
06:22
@BenjaminGruenbaum I'd say wget -m the website but I am not sure what "locally as is" means and even when mirrored there is no guarantee it will display the same.
@crypticツ Yes, this might be related
@TwiNight I would use sessions. Read up on session security here owasp.org/index.php/Testing_for_Session_Management and make sure your adhere to those policies.
@Gordon I want to 'take a snapshot' of a website including all resources that I will be able to save later and test in conditions as close as possible to the original ones
@crypticツ thx
@BenjaminGruenbaum see if wget will do then
06:26
@BenjaminGruenbaum maybe spider the page so you have local copy. Load that copy locally on server, edit your hosts file so exampledomain.com points to local server, then accessing that domain will actually show local copy. Your extension should not know the difference. Unless it's doing something that you may not have local copy of due to the spidering not picking it up.
@Gordon thanks for showing me DJ Antoine, downloaded a bunch of his stuff, like them a lot =o)
@Gordon @crypticツ That sounds like it could work, this seems like a very common use case though (testing a particular web page), isn't there an automated tool to make my life easier?
@crypticツ you're welcome :)
@BenjaminGruenbaum I think the tool is usually testing the extension on the actual site =o)
@crypticツ We do that :) The problem is that sites change, sometimes bugs are hard to reproduce and we would like to isolate issues as much as possible
06:44
@BenjaminGruenbaum wget -m example.com is pretty much automatic
@crypticツ if you like DJ Antoine, you might also like Mike Candys
@Gordon Would that work with the ads?
@BenjaminGruenbaum depends on how they are loaded into the page. If they are generated when the page is generated, yes. if they are generated dynamically (e.g. ajax) then maybe. Depends on whether the mirrored JS can do the call then.
Ads are usually generated with iFrames
@bwoebi Do either a PR or bug report + a mail to internals
We can't merge API changes just like that
The mail to internals is the important part of it ;)
08:00
good mornings. the birthday cake is not a lie :)
@hakre lol, I see I'm not the only one going through that guy's past questions
whoaaa! today is a lot of holidays
Bevrijdingsdag
European day of protest for equality for people with disabilities
European Day of Europe
Remembrance Day against Violence and Racism
Hebammentag
Kodomo no Hi
Day of the heart-sick child
Welthändehygienetag
World Laughter Day
So we get to pick one? If so, I pick World Laughter Day
08:10
It should be "World Closevote Day" :)
@crypticツ that one requires you to laugh for 3 minutes at 1400 german time
Morning guys. Hungover in Berlin at the conference, last night was pretty good
08:32
@crypticツ yeah, sweet spot :)
@Jimbo yay!
@crypticツ I'm totally with you! (3:25 to go if it is right what gordon said)
@rekire that question is already removed ...
I was a little to slow
09:03
@NikiC shall I try to merge with PHP 5.5 or with trunk?
when doing the PR?
user1125394
git question
I am new to PHP, how should I go about learning it? A proper well defined path?
user1125394
is the .git folder 'linked' with the folder name containing it
user1125394
I mean renaming the folder will change something?
09:12
^ please close against this (more or less canonical) dupe.
@user1116341 practice, practice and practice
@HamZa thank you.. :)
@bwoebi trunk
@user1116341 If you want to learn online from zero try http://www.codecademy.com, if you understand french then there is http://siteduzero.com
But those are just the basics ...
09:17
I just completed the PHP module on codecademy.com, now I am looking for where to go from there.. :)
posted on May 05, 2013 by Liip

Yesterday i tagged version Beta 1 of jackalope-jackrabbit, our PHP Content Repository (PHPCR) implementation. PHPCR is an API to manage tree-structured data, modelled after the Java Content Repository JCR specification. Time to summarize what jackalope can do today. For people already familiar with Jackalope, I summarize the recent changes at the bottom. State of Jackalope-Jackrabbit The basi

@user1116341 congrats. I completed it yesterday as well. What do you want to learn next?
@hakre, more advanced stuff, as codecademy was basic introduction to PHP, right?
09:18
@user1116341 sure. But you can advance in many directions. Anything you're interested in specifically?
I ask because you normally learn Advanced stuff by focus on something specific.
@hakre I have just started with learning the CodeIgniter framework for PHP.. watching the video tutorials on Nettuts right now.. they are pretty good.. :)
@hakre Well I am not very sure.. But would like to learn as many things as possible..
@user1116341 , if you are new to PHP, stay the fuck away from frameworks
09:20
oh come on guys. how is a newbie supposed to know
What happened?
@user1116341 Okay, one way to learn PHP is to learn about the language first. It's a large language.
So you can start by answering basic PHP questions here on SO.
Answering other persons questions is a good way to learn.
Oh I see.. :)
@Gordon is not, but please don't censor emotions. :)
If you are really new to it all, you could pick up this book .. it will cover the essentials
09:23
And don't fall into the mysql-trap: Learn database interaction with PDO. That probably is the biggest beginner problem I'm aware of.
and stay away from frameworks, till you have a good grasp on OOP principles and concepts
@hakre that's actually covered in that book =P
One of my friend suggested that I start with codeigniter and I will learn PHP as well.. Is this the right way? I am not facing any problem with CodeIgniter as such, it is easy to understand.
.. well , then ignore us and listen to your friend
CodeIgniter is too easy to learn something. They promote some really bad ideas but sell it as "the way to go". It effectively hinders you from solving problems with easy PHP programming. Just saying, we all make mistakes.
Your friend did this with the best intentions I'm sure.
I understand what you are saying, thank you for all the insights. I will start learning more about PHP now and go for the framework later on. Will check out that book too. Thank you everybody! :)
09:26
“The greatest harm can result from the best intentions" .. wizards second rule
Yes, good intentions can turn the beauty of gold into evil.
Can we add each other as friends on this site?
no , there is no such functionality on SO
09:57
@tereško hey id like to know what sort of API your data mappers usually have
I have fetch() save() and delete()
and they are all in an AbstractMapper
@Gordon where is his fetch() method though
@user1116341 no, this is not like on facebook. here we place bounties.
> What is the best way to [write into a file from a PHP script]? Create some shell scripts and run them with shell_exec() (and pass parameters), or use something like node.js or something else?
10:32
@David also on the DataMapper
@Gordon one thing I have always been unsure about with DataMappers is JOIN statements
do you know any good place to learn about using JOINs with a mapper
is it ok to just have other methods besides the regular fetch() method which do the SQL JOINS
i find it very hard to find a place to find out about that
they all just seem to show examples of fetching from one database table
10:52
@David instead of going that route consider using Doctrine2. A lot of the problems you will face are already solved in it
I have heard about it alot
and i Know writing your own proper data mappers can get very complex
how heavy is Doctrine
or how lightweight is it should I say
11:24
@David well, it's a generic ORM so it will likely include things you dont need and it will impact your performance. It's not particularly lightweight either. It has a learning curve. But quite frankly, don't bother about how lightweight it is. Or do you have project where that is a top priority?
Mornings!
@PeeHaa埽 Happy Bevrijdingsdag
Thanks :)
morning
Anonymous
morning
Anonymous
11:34
n happy easter
holy cow its too long http://stackoverflow.com/questions/16383374/need-to-optimize-code-with-php-get-input-values-from-many-rows-check-the-values
omg look at that long variable assigning list
whoa!!
Anonymous
@NullPointer yea, saw it
Anonymous
the guy needs some psychiatric help
@PHPfan lol how you can write htmlspecialchars for each variable ?
Anonymous
11:37
hmm. what?
Anonymous
@NullPointer I was bored, sorry
hey, anyone ever use symfony-cmf ?
@crypticツ what happen to your daily Entry its awesome :(
@NullPointer it's time consuming =o( I have to spend over an hour depending on how many messages to read through 24hrs of chat transcript
11:46
> I will quickly show you something to make use of loops to shorten your first code.
@PHPfan I will quickly show you something to make use of php functions to shorten your code
@Gordon I saw that =o(
@PHPFan extract(array_map('htmlspecialchars', $_POST), EXTR_SKIP)
extract() :-S
Anonymous
@Gordon I'll check it. I never knew about extract() and array_map()
Anonymous
thanks for the downvoter btw
11:49
@PHPfan well, you can forget about extract. It's almost never useful. But array_map, yes, that's essential.
@PHPfan I didnt downvote you
@Gordon I am back now. I just don't like libraries that are too big and you only use a bit of it and you don't fully understand what everything does, it just works
i prefer knowing the ins and outs of everything I use
but that is hard to do with everything
@David: do you entirely understand how your CPU works?
Anonymous
@Gordon I'll check about array_map I have heard that a lot
@David that is the right attitude but some things you just have to use
Anonymous
@crypticツ downvoted me. thanks
11:51
@zerkms no but that is different.
very different
@David it's not
@zerkms I can't make a CPU myself, I can create DataMappers for my project but it will just take time
there is another level of developing zen: it's when you're solving business issues, not follow "like/not like" ideas
@David I'm sure you can do a CPU. But it will be terribly slow
yeah and it would take me 20 years of learning and alot of money
this issue between making your own DataMappers or using a 3rd party library is different
@David you mean you can make microprocessor ?
11:54
an intel core i7 haha
@David so provide your estimation for implementing DataMappers (do you mean ORM that implements the data mapper pattern?)?
@z
@PHPfan no she didnt. look at her profile. it says votes cast today 3. and her rep is at +10 so there is no way that she did it, because her rep would either show 8, 6 or 4 depending on how many of the votes cast have been answer dvs. dont accuse people when you cannot prove it.
@zerkms what do you mean estimation
time estimation?
11:55
@David yep. For more-or-less stable version
I would tell - it will take at least one month for something production-ready
to create my own or use Doctrine
to create something that might compete with Doctrine/Propel
hmm
what is doctrines API like
keep in mind that "I don't need that much of features" never works. Every "trivial" solution becomes a monster in couple of months after integration into real project
@David ?

« first day (932 days earlier)      last day (4242 days later) »