« first day (1109 days earlier)      last day (3849 days later) » 

9:00 PM
but with more bags
 
isn't it more like the grinch?
 
@tereško lol.
 
@CarrieKendall Congratulations on your new job btw :)
 
thanks
 
@LeviMorrison Out of interest, I'm going to be working at a college (about 2,000 students (the college I quit half a year ago)), do you think they will be using OOP?
It's a pretty shit intranet but its something
My main job is the JS, html, css etc but they want me doing some basic PHP stuff
Just trying to prepare to make sure nothings a shock
 
9:08 PM
Probably not @jskidd3
 
@jskidd3 , how far down this list have you watched & understood ?
 
@MadaraUchiha Can you tell me how you came to that conclusion? Your answer kinda makes me happy
 
Fact is, probably more than 90% of PHP developers do not understand OOP.
 
@teresko Honestly? None, I haven't looked at MVC at all, but I have watched and read a large book on PHP, and about 200+ videos on YouTube
 
s/PHP developers/developers
 
9:09 PM
Statistically, it is unlikely that your collage intranet sites are OOP.
 
@jskidd3 that list actually has nothing to do with MVC (not until the last section)
 
@teresko Apologies I skimmed the title, 1 moment
 
Actually, unless you know for certain that they use PHP, there's a higher statistical chance they use ASP.NET
 
I ran one of those Web scanners on my site, and I got: strtolower() expects parameter 1 to be string.. what does this error mean?
 
@jskidd3 that list is intended for intermediate-advanced OOP developers.
 
9:10 PM
@DanLugg Yeah it's defo PHP
 
Fellas who already know the basics.
@user2738336 It means that strtolower() expects parameter 1 to be a string...
What did you think it means?
 
@teresko So I haven't actually read/watched any of them yet, but I have read/watched other things based on some of the topics
 
But it seems to be a false positive :P Is that possible?
 
@jskidd3 Which school?
 
@user2738336 No, a false positive is not possible.
 
9:11 PM
$_POST['hello] = strtolower($_POST['hello']);
 
@DanLugg It's called Barton Peveril Sixth Form College :)
 
@jskidd3 then start from the top
 
@teresko Gotcha, where will this take me?
Like what will I be able to brag about once I've done them all
That I'm ready to learn MVC or? :P
 
I don't understand how $_POST['hello'] = strtolower($_POST['hello']); causes that error :P. Especially if hello contains the word "Hello"
 
This will teach you about the concept of OOP.
 
9:12 PM
Righty, brilliant :)
Now I just need a coffee
 
After that, understanding "real" MVC should be a breeze (relatively)
 
Don't suppose you can link me one of those as well?
 
@user2738336 $_POST["hello"] does not contain what you think it does.
Either that, or that's not the line that triggers the error.
@jskidd3 Finish the list you have at hand
 
'A German walks into a bar and asks for a martini. The bartender asks “dry?”, he replies “nein, just one”'
 
Trust me, if you understand it all (you may need to watch them several times), we'd love to answer all questions you have about MVC.
 
9:14 PM
@jskidd3 Well something is running PHP 5.2.6
 
@DanLugg 1 sec
Better thing to view
thats the URL to the intranet
 
Well web.barton.ac.uk/parents/governors/index.php is leaking an X-Powered-By:PHP/5.2.6 header.
 
@DanLugg You will also see when you resolve that URL the 1998 style login page. That's the main reason I've been employed ;)
Good stuff
 
In the php source I try to find my way around. Is there any doc that can help me with this?
 
Can I ask how you got to that? (for educational purposes :P) :)
 
9:18 PM
5.2 gl
 
Shit I knew how to do that already
Smashes head into wall
 
There's alot of unpatched stuff on 5.2.6, no?
 
5.2.6 EOLed years ago
@jskidd3 that is, it was no longer recommended for use years ago.
 
@DanLugg please don't hack sites from your home
 
9:21 PM
@MadaraUchiha Lmao, should I bring that up on first day?
 
@tereško ^^ Another public service announcement from Smokey The Bear
 
@jskidd3 Asses the damage
 
"By the way the current version of PHP was EOLed years ago... you shouldn't be using it"
 
If possible, update PHP version silently and put out the fires.
 
@DanLugg randomize your MAC and get a wifi connection in the city
 
9:22 PM
@tereško A) I'm at work. B) I don't care enough to bother ;-)
I haven't gone wardriving in a long time.
 
Where can I find which php versions have been EOLed?
 
0
Q: Saving user preferences, web application

SrleFor example, application will serve different articles from different categories to users which are logged in. User "A" only want to read posts from "Funny" category and user "B" only from "Sport" category. I need some mechanism which can automatically serve different templates to user A and B wh...

 
latest was 5.3.x , it reached end of life this summer
 
@Srle When you post a link to your question, put [tag:cv-pls] in front of it.
15
 
9:25 PM
@PeeHaa Cheers
 
@DanLugg lol
@Srle Your question is too broad. Try editing your question to become more specific.
Add what language you have, what you've tried, focus on one aspect of the problem at once, and not the whole problem.
(Because it's a large problem)
Now, if ya'll just excuse me
I'm going back to Postgres manual for some more light reading
 
I'm going home to eat fast-food in my underwear, and then perhaps join you in reading Postgres docs.
Night folks.
 
@jskidd3 Depends how old their code base is ^^
 
@tereško you mean it will reach
 
@LeviMorrison 5.2.6
Too old.
 
9:29 PM
Indeed.
 
(Not technically, but practically)
 
> Please note that the PHP 5.3 series will enter an end of life cycle and receive only critical fixes as of March 2013.
 
@tereško enter an end of life cycle. It's only EOL after this cycle will have finished next year.
 
Hi There could any one give me a help with some SQL using NotORM ?
Thanks.
 
But if you are rewriting code now, you may as well shoot for at least 5.4
 
9:32 PM
Do they just go EOL after time?
 
@LeviMorrison well, if we begin now, it won't be finished before php 5.4 is sec fixes only. So, target at least php 5.5.
 
Vote based.. I see
 
@jskidd3 At some point in time, you have to let go of legacy versions.
 
@jskidd3 only for php5.3. Current and future versions all have defined EOL's by the wiki.php.net/rfc/releaseprocess.
 
9:35 PM
Right that makes sense
This might sound like a stupid question.. and tell me im an idiot for saying it if it is.. but if the college are highly likely to not be using OOP at this stage is it a better idea I focus my time on other topics in PHP?
 
@jskidd3 What other topics are you thinking about?
 
So, php5.4 is sec fixes only after php 5.6 is released and EOL when php 5.7 will be released.
 
@MadaraUchiha Although I'm pretty good with already I could do with some extra relational database practise.. although thats not exactly PHP
Maybe I should just take a break and wait until I start next monday? :p
@bwoebi Right I see thanks
 
@jskidd3 I think the two are not mutually exclusive, and both are important for successful web applications.
 
@bwoebi Is it generally a simple process bringing PHP files up to date, say moving them from 5.3 to 5.4?
 
9:39 PM
@jskidd3 depends on the application^^
@jskidd3 e.g. problems with call time pass by ref etc.
 
Righty
Also, one other thing
To be classed as an intermediate PHP programmer should OOP be under your belt?
 
yes
 
Then OOP I shall start now, starting with that list
That @teresko sent me :D
 
why am I getting an impression that you would be unqualified for a position of an intern ?
 
I don't know, why are you
 
9:44 PM
@jskidd3 You really need to understand the way classes and inheritance work in PHP, but that's much different from OO. There are many projects that use classes that aren't what you would call OOP.
 
@tereško the difference is, he's learning. That's more we can say about 95% of the newbies that come by this room.
 
@teresko The internship is primarily based on HTML, CSS and JavaScript. A smaller part of the job is having a basic understanding of PHP, mainly how to pull and insert things into a database and make a pretty interface whilst I'm at it, those are all things I'm qualified to do
 
@LeviMorrison Thanks!
 
Also, I'd probably not even look at the comments on those articles.
 
9:45 PM
Lol :p
 
Chances are high that all comments there are rubbish ^^
 
10:13 PM
i feel guilty while i read the messages above.. oh well. need to learn fast.. (i'm such a noob) >.<
anyway, im out. bye guys!
 
Can someone explain this: 3v4l.org/iA7E3#v432
It's a string and it's not a string at the same time?
 
Why wouldn't it be a string?
 
@PeeHaa Because it doesn't throw an error Fatal error: [] operator not supported for strings?
Sort of implies that '' is not a string.
 
Am I missing something because it does throw a fatal
 
Or I'm particularly stupid today.
 
10:18 PM
ooooooh now I see what you mean
Looks like an empty string is treated differently
Some magic casting perhaps?
 
Probably, just curious what exactly since that's probably not the only case.
 
Where are those C addicts when you need them
 
@webarto $v becomes an array, magic.
 
Shooting C again?
 
10:24 PM
@PeeHaa Hah!
@salathe :) I've read code like $v = ''; $v[] = ... and I commented that it should be $v = [], and I turned out to be stupid, thanks PHP :)
 
@webarto well, it should really.
 
If you have read code like $v = ''; $v[] = your commenting was correct
 
@webarto I don't think it's you that's being stupid there.
 
I would have started shouting at that point :P
 
I would've gotten hung up on the single-letter variable
 
10:27 PM
Haha, $v as in variable.
 
I have a small question...to call a method from a class without instantiating it, does it have to be declared "static" or can I just call it like class::method()?
 
$v = new Vendetta;
 
@Dan That doesn't really sounds that hard to test
 
I'm talking about "best practices". It works for me, but I'm wondering if it's right.
I'm trying to pick up as few bad habits as I can
 
Once PHP starts throwing notices at you you can be sure it is not "best practices"
 
10:30 PM
In general static methods are a bad idea anyways... why not just make a function.
 
@Orangepill I guess sometimes I might want just a single method from a class without running the constructor?
Not sure. From what I'm reading it's for backwards compatibility with PHP4..
 
Then you want a function not a class.
 
Not sure. From what I'm reading you have not correctly enabled error reporting..
 
@PeeHaa I know the error it would throw.
 
So why are you asking whether it is bes practice?
 
10:32 PM
So yeah, just looking to clarify from the chatroom where people always know more than myself : )
 
@MadaraUchiha people note that I have been marginally polite
 
@tereško Noted.
 
I was never an intern, never worked in office, meh...
Related read: 37signals.com/remote
 
@webarto That's really interesting. I aspired to go down the same route only I feel I should work in an office for a year or two to get the feel just so I'll appreciate working remotely more
That and at the moment I feel lonely :p
 
Well, if you have a good company near by to work in, no reason not to.
 
10:47 PM
Yeah I suppose :)
 
I work remotely 'cause I'm from 3rd world country.
 
That guy should get internet ban.
 
Not true, default method is GET. — webarto 8 secs ago
Unless I forgot HTML again :D
 
am I reading this right?, stackoverflow.com/questions/19613569/… PHP code execution. Set X-Forwarded-For to some PHP code and set $_POST['name'] to php_file_on_server_to_append_to.php
all I see in the comments is about XSS holes
 
That code is so wrong.
 
Hey. Any of you guys good with Wordpress? Specifically $wpdb usage?
 
What and idiotic question and answers.
Ah, good ol' global $wpdb.
 
11:15 PM
:P
My issue is with $wpdb->prepare()...
 
Just tell your issue.
 
When using apostrophe's in your values, you're supposed to use double apostrophe's, but $wpdb->prepare() is for some reason spitting out \\\' for them.
any idea why?
 
@ZacharyChristopoulos You're calling some function twice that is escaping a string to be sent to mysql.
One quote ['], is being converted to [\'] and then converted again to [\\\']
Are you sure that that's not what is meant to be happening? i.e. how do you know it's wrong?
 
are strings escaped when posted by chance? -.-
 
(I'm not saying it is right - but you ought to know how many times that string should be escaped.)
 
11:21 PM
That could be why... I'm pulling it out of a post.
*$_POST
Lemme try stripping the slashes before preparing... one sec.
 
Good ol' addslashes.
 
Don't think so - if they were it would be a different type of esacaping.....
@ZacharyChristopoulos Don't.
Don't just do shit at random until it works. Find out where it's being escaped and figure out if it's being double-escaped or not.
i.e. don't fix bugs with dumb hacks.
3
 
Yup... looks like it added slashes when it posted the form.
 
@ZacharyChristopoulos Do you have magic quotes enabled by any chance?
That would be reaaaaaally crappy btw
 
hey guys :)
 
11:26 PM
I don't think so O_o
how could i check?
 
@mamdouhalramadan hey
@ZacharyChristopoulos phpinfo()
 
@PeeHaa - how are you. Hope you're doing good :D
 
Tired and almost on my way to shower -> bed
 
hahah, then good night in advance ;)
 
tnx :-)
 
11:28 PM
It says it's off
 
good
 
Still doesn't explain the reason why slashes are being added haha.
 
I need to ask you something guys>
I'm struggling in a useless discussion here ( in my prespective ). However the point is
in mysql if you have a product table with 1-n relation to discount table. and when I delete the product I want to keep the discounts on without being deleted for future reports. So I don't actually need a constraint applied. right!?
 
addslashes() is no where in my project.
 
but my friend here thinks that I should have a constraint on delete cascade same on update. and keep a backup on the discounts. !!!!!!
does that make sense?!
 
11:31 PM
@Jack not a single person replied to the internals thread on signing release tarballs >.< figures...
 
@mamdouhalramadan No, that sounds nuts.
 
that's what I'm saying.
So, actually I don't need any constraints :D
 
@mamdouhalramadan It doesn't sound like you need them. There's a lot of programmers who do feel uncomfortable not using constraints. However - do you actually need the deleted column value for each deleted parent item for your reports, or do you just need the rest of the row?
 
in the report ( even if the item has been deleted ) you need to know what kind of discounts those items where based on. by saving the item number on the client accounting system.
in short it's just for track back.
 
Hmm - sounds more like you should just be setting those products to be inactive then, rather than deleting them.
While the keys of the deleted products still have 'meaning', they should probably still exist in your DB.
 
11:44 PM
Thanks for everybody that helped. I figured it out. "WordPress ignores the built in php magic quotes setting and the value of get_magic_quotes_gpc() and will always add magic quotes (even after the feature is removed from PHP in 5.4)."
 
Oh, Wordpress.
 
I see where you're coming from. and I agree 100%, actually I have is_active flag in the item table, but the client wants what the client wants.
he wanted to delete the item/product. then keep the discounts made on it. but as long as the item relation with the discount is based on unique item number which is available on his accounting system or data sheet or whatever he has. then he can just query on the discount table directly without joining the item/product table. if the item is deleted. else, a regular join will be there for him.
 

« first day (1109 days earlier)      last day (3849 days later) »