« first day (513 days earlier)      last day (4434 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
@Leigh I would be glad if you could explain where @rlemon can look to solve the problem. :)
 
@OmeidHerat grep -R "class session" * in the project root is a good start
 
@rlemon That pastebin isn't your actual index.php file. What is on line 12 of /var/www/index.php
 
require_once('lib/includes/session.class.php');
 
@Leigh I am pretty sure he doesn't actually define the class session in two locations but rather add the file twice. but still.
@Leigh I wouldn't call an error 'specific' as long as it includes at least this much of information: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/ome/www/index.php on line 49
 
@OmeidHerat if he's using a *_once function to include it, doesn't matter if it was included with regular include/require before, it has to be a different file name, or already defined
 
4:06 PM
@Leigh I don't want to be a Jack, but that wouldn't make the error specific.
 
there is my index.
line numbers may not add up correctly.. but is it on the line posted above.
 
All it takes is a stray class session{} somewhere in any of the included files or the included included files... without a debugger i'd aggressively comment out all the previous includes and see if you can get a different error.
 
What about
Say i had this code: "set_downloads($file[0]);"
I can't just put it on the page, because it will run every time the page is loaded
Is there anyway of only letting this load on event
 
@Paul they are mostly boilerplate stuff... and all files have been 'reviewed' and nothing redeclares it.
is it possible that it is not with session, but that is what it is reporting on?
 
@rlemon while not really a debugging solution, but rather an alternative, you can use an autoloader. spl_autoloader is a good option.
 
4:12 PM
@rlemon another hidden thing could be an auto_prepend file which defines that class
 
@OmeidHerat I plan on it. however having not used one before I opted to just include the files manually in the index.. (try to keep somewhat organized)
 
talk my word on it, autoloader will make things even more organized and cleaner. :)
 
the only thing I can think of is the openID class I dropped in there. but this does not have a 'Session' class or anything similar named. as well all of this works fine on the production environment.
 
@rlemon Do you have xdebug ?
 
nope, but I can install it.
ugh girlfriend showed up for lunch. i'm getting yelled at to step away from my desk.
bbl
 
4:15 PM
it's worth it, specially if you have an IDE that supports - which I reckon you should - you can go through the code line by line as it gets executed and find the error in a snap.
 
4:35 PM
im having multiple errors when setting up cakePHP
CakePHP: the rapid development php framework

Warning (2): include_once(/var/www/cake/app/Config/database.php) [php.net/function.include-once]: failed to open stream: No such file or directory [CORE/Cake/Model/ConnectionManager.php, line 68]

Warning (2): include_once() [php.net/function.include]: Failed opening '/var/www/cake/app/Config/database.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') [CORE/Cake/Model/ConnectionManager.php, line 68]
 
@anonymouslyanonymous you have an even bigger problem, using cakePHP. :D
 
ok, should i switch back to symfony?
 
I wasn't being serious, but I personally don't like cake, I suggest Zend FW and symfony.
 
@OmeidHerat
 
but they are each good at what they are designed for, symfony is a stack, take it all or none. while zend is really modular.
 
4:40 PM
what would be a good start for a beginner ?
 
but if you are not good enough with PHP itself, then I suggest you to NOT use any framework. tell you get a good hang of the language.
^ No framework.
 
i have used php pdo mysql built a small employee test run management thing with a bit of ajax in it, php classes
 
but it's good to follow a coding standard and a try a few design patterns, Like MVC. but don't even try Singletons - which is an anti-pattern anyways - unless you just want to know your enemy.
my thumb rule for using frameworks in any language is that if you can understand the framework and reverse engineer it you are good to go. unless you are just trying to get something done rather then learn a language.
 
i guess i need a framework because i have to build a large website
 
then use a CMS or an already built script, there is a high chance that you get what you want.
 
4:45 PM
evening all
 
ok ill try that thanks
 
evenin'
 
user895378
hello room
 
hello @rdlowrey
 
user895378
Can anybody point me to a definitive list of PHP language constructs?
 
4:53 PM
@rdlowrey The only definitive list: lxr.php.net/xref/PHP_TRUNK/Zend/zend_language_parser.y :)
 
user895378
@NikiC hehe that's what I figured :) thanks
 
user895378
Just what I needed
 
I just finished the HTTP Accept and AcceptLanguage. @rdlowrey
Now its sleep time for me
 
user895378
@Paul Awesome. Hopefully later tonight I'll get to take a look at it. 'night
 
@rdlowrey first initial R, second D, last name Lowrey??
 
user895378
4:57 PM
@rlemon Right on
 
nice, i'm r.d.lemon
 
user895378
Dad had to engage in a bit of vanity and give me the same first name :)
 
we be initial brothas
Robert? :P
 
user895378
LOL clairvoyant much?
 
Richard possibly?
 
user895378
4:58 PM
Robert
 
middle is Douglas?
 
user895378
Daniel
 
damn, would have been too good.
ohh well, rdl meet rdl.
 
user895378
well met, sir.
 
user895378
5:12 PM
If PHP's array callback construction were a cute little baby I would still punch it in the face.
 
user895378
It's currently making my life very difficult ...
 
5:55 PM
@NikiC: that post is gaining some traction on twitter. We've got some expectations to live up to :-D
 
@ircmaxell It has?
 
Hey all
 
6:13 PM
And I've gotten at least a dozen new followers today alone
 
Hi @Neal
@ircmaxell Done :)
 
:-D
 
@ircmaxell I think I can write the next part tomorrow :) I have CS in the first two hours, so I could use that time ^^
 
Don't rush to get it out
since then we'll need to rush to get out later parts.
Instead, we can write them all quickly, and schedule to publish for a week at a time (or twice a week)
 
@ircmaxell I'm not rushing. I just empirically know that these two hours are normally the dullest of the whole day, so I want to put them to some use ^^
 
6:29 PM
:-D
 
@Donut Hi hi
 
6:48 PM
Hello, everyone.
 
Hi @LeviMorrison
 
hey @LeviMorrison
 
The chat seems quiet today.
 
It seems..
 
@rdlowrey I see you deleted a repository
 
user895378
6:54 PM
@LeviMorrison Yeah, I decided it's best not to have it up there until it's legitimately at a stable point ...
 
@rdlowrey Ah, you changed your gravatar. Threw me off :)
 
user895378
@LeviMorrison As for the main thing, I'm painfully close to having it ready. Differentiating between valid array-style callbacks and lazy-load definitions has been a bit more complicated than I expected, but I'm starting to get the tests passing and it should be good in a couple of hours
 
user895378
@LeviMorrison Yeah, just did that a few minutes ago :)
 
@rdlowrey I won't be developing my project at all today, so no worries. Also, I need a better name than Swizzle ;)
 
user895378
@LeviMorrison I find that mining early-childhood experiences often yields positive results on the naming front
 
6:58 PM
@rdlowrey I was trying to think of movies where an animal dies, following the Artax theme.
Mufasa seems to be a little bit too much.
 
user895378
Personally, I hate cheesy names like "CodeIgniter" that lead to a whole string of branding for components like "sparks." That's ridiculous. You're not a fortune 500 company. It's a freaking code library.
 
user895378
Don't try to market me into thinking your code is good, just demonstrate how it's good
 
@rdlowrey , cakephp and fuel are doing it too
 
That's a top 10 saddest list for movies where animals die. Artax made #1
 
user895378
7:02 PM
@LeviMorrison It's a valid point. Very sad. Made a lasting impression on me
 
user895378
@tereško Yeah it's silly. I mean, I understand the logic and it makes sense for attracting the unwashed masses, but people who know better don't want to learn framework-specific jargon
 
@ircmaxell Should the PHP data-structures be non-inheritable?
 
.. read it three times, and still cannot get what you meant
 
0
Q: Reverse Tether Verizon MiFi

stevetherI use the MiFi in the office for laptop internet use since our network doesn't have a wireless router. However, this prevents me from seeing the office network, shared servers, etc when I need them. I'm thinking about reverse tethering the MiFi. What I mean by that is, using the USB on the MiF...

 
spam .. flagged
 
7:08 PM
THANKS BRO
 
5
A: How to organize a larger PHP project

NealYou should organize it very, very carefully.

Ha!
Thanks pplz :-P
 
@LeviMorrison Why not?
 
@ircmaxell To cut down on abuse :)
It was tongue-in-cheek.
 
lol
 
7:18 PM
@ircmaxell to which? :-P
 
@Levi
Anyone want to give me some more for news.ycombinator.org/item?id=3694650 ?
 
user895378
@ircmaxell Already there
 
:-P
 
Boo you @casperOne :-(
 
user895378
@ircmaxell I found myself looking for access to a list of all the PHP language constructs earlier today. Source was the only place to find it
 
7:22 PM
:-D
I tried searching quickly yesterday for a list of all core functions that accept a reference string parameter. Or at least one. I couldn't find any...
 
@ircmaxell why the hell you link to http:// instead of https:// ?
=P
bad maxell , no cookie
 
@tereško copy/paste
 
it kinda makes it even worse
 
nah, I don't reference via https unless I care about the content
and I don't care about that content...
 
hi
 
7:30 PM
0
Q: SQL Multiple request

bklups$catIDs is a serie of values, displayed like this : 11,12,13,14, … on my sql request i put : WHERE c.IsActive = 1 AND c.PkID = '" . $catIDs . "' but it doesn't accept more than one argument with the following code it displays only the last value (not all) i try an explode to eliminate the ','...

 
Gotta start somewhere.
 
@LeviMorrison That's my catch-phrase. But in this case, it's completely applicable...
 
I know that for many coders their first language is PHP. That's fine. It was my first programming language and I wrote some awful code back then, I admit. But I'm absolutely astounded by the stuff that continually gets posted on StackOverflow . . .
 
Hey Levi, If you're looking for a good question I've got one on codereview you might want to take a look at.
Would be a shame if the bounty on it went to waste. codereview.stackexchange.com/q/9696/9086
 
7:46 PM
@GordonM I answered it. You might not like the answer . . .
0
A: DI Container: You're doing it wrong?

Levi MorrisonI think the real problem here is your over-zealousness of using classes. Consider this snippet of your code: $password -> addProp (new prop\Required ()) -> addProp (new prop\Min (array ('limit' => 5))) -> addProp (new prop\Max (array ('limit' => 15))) ...

@ircmaxell Was reading the chat log: https://github.com/volomike/Faster/blob/master/app/_models/Sample/Test.php#L28
Hilarious! He uses PDO and doesn't bother to add the 20 keystrokes it would take to make it safe from SQL injection?
 
@LeviMorrison Had thought about that. The problem with that approach though is the Field would be constructing the classes specified in the array. Is something worth thinking about though. The real thrust of the question though was "Isn't a DI container meant to mean you end up writing fewer lines of code? The one I built from the example ended up with me writing far far more lines of code!"
 
@LeviMorrison and wtf does this line: foreach($rsRows as $rwRow){break;} ??
well I know what it does. But why? :P
 
@PeeHaa: My guess would be he's trying to get the first item off the resultset. Hilarious way do going about it though!
 
8:03 PM
@LeviMorrison , most of the code looks made with random generator
 
Hey just wondering if anyone can explain what's up with`Spreadsheet_Excel_Writer` on pear. Presently in Beta? Is this accurate?
I haven't used PHP for excel files in a while, isn't this the standard library for such things?
 
@Incognito If it is in pear and it isn't PHPUnit, it's probably old.
3
As for your question: I don't know.
 
> 0.9.3 (beta) was released on 2012-01-26 (Changelog)
Looking on the site. I'm a bit perplexed.
 
I remember using a version of it at my old job. It threw a lot of E_DEPRECATED and E_STRICT errors if I remember right.
 
Was there some other package that does excel files?
 
8:12 PM
Though if the last changed date is accurate they're still working on it.
@Incognito: Well you could always export CSV files, though it's a somewhat limited way of doing it.
And Excel's CSV importer is a bit... quaint :)
 
shrug I'm just dumping to columns and boding a header row.
 
CSV would probably suffice then.
 
No, this is really weird, now it wants the beta channel OLE.
Yeah I'll do CSV.
 
@LeviMorrison And then argues about it!!!
 
8:25 PM
Can someone point out what's wrong with writing to php://output?
In the context of using php://output as a file pointer when using fputcsv.
I think it's over-writing http or something.
Err. Weird. It works now.
=/
 
user895378
Any opinions on this: ... ?
 
user895378
Say a function needs an array or ArrayAccess parameter. For a single edge case inside the function you need to count the parameter. Is simply using an (array) cast on the parameter prior to the count acceptable in place of throwing an exception if the object implementing ArrayAccess doesn't also implement Countable?
 
Don't cast the parameter
 
user895378
Yeah, that's what I was thinking ... thanks
 
that's just about never a good idea...
 
user895378
8:34 PM
@ircmaxell you're like my programming conscience
 
:-P
 
user895378
Anytime I know something feels naughty I know I can pose a question and you'll say "No" :-)
 
That's not true
I do plenty of naughty things^H^H^H^H^H^H^H^HNot Best Practice things...
 
too much info @ircmaxell and @rdlowrey ...
 
user895378
@PeeHaa lol
 
8:35 PM
@rdlowrey I wouldn't worry about it too much, either. How many people implement ArrayAccess but NOT countable? Also, adding that interface is not very hard . . .
 
@LeviMorrison More than you'd think...
 
hi every body
 
Hi @Ahmetağa
 
i am bargainer web designer and i finaly finish my first web site i want to know is there any way to save my website from hack ??
 
user895378
hello
 
user895378
8:39 PM
@Ahmetağa This is such a BROAD question ...
 
hmmm
look is there some thing i have to do it in my cods to provide a security for website
 
user895378
You might try googling XSS (cross site scripting) and SQL Injection to get an idea of the basic ways people can break your scripts.
 
i build a static website with html and some jquery for slide show n buttons menu
 
Please help me solve this interesting and annoying CI-problem: stackoverflow.com/questions/9660196/… I've been working on it for hours and I can't find a solution :/
 
8:46 PM
or let me ask u in this way who provide the security for my static website my cod and server or only server?
 
9:15 PM
posted on March 12, 2012 by Pádraic Brady

(Photo credit: bertboerland) In recent weeks, I consulted with the second most intelligent species on the planet: Dolphins. Dolphins are renowned across the known Universe for their awesome programming skills. After all, it was they who developed such insightful works as “Evolution By Example”, “Dude! We Wrote The Laws Of Physics!”, and “How Many Humans Does It Take To Screw Up A

 
@ircmaxell Can you check out @Feeds and tell me whether it is worth reading? :P
It's soo long :D
I know that you like reading long stuff :P
 
@NikiC use an XML parser/generator. then you dont need htmlspecialchars anymore :P
 
@NikiC :-P
 
@Gordon :)
good night
 
@NikiC <nite/>
 
9:24 PM
@NikiC This particular one is fairly fun to read, but if you want the real technical message: htmlspecialchars is not flawless and he illustrates a few (somewhat-irrelevant) exploits.
 
@Gordon Blasphemy! 7 characters aint XML!
Every XML file has 10k+ characters.
By definition.
Regardless of content.
If there is no content one can fill up with meta stuff like DTDs or whatever
 
@NikiC of course it can. you just saw noobie examples in the past. thats why you are afraid of it. although the one above is clearly missing a schema
 
@Gordon That's what I'm talking about. XML without schema. You should be ashamed of yourself!
@LeviMorrison Ah, okay, then I might read it some time later.
@ircmaxell The comments about your thumbnail are always funny :D
damn, I said night, so is night. night.
 
@NikiC :-(
 
9:29 PM
@NikiC i figured omitting the schema would be okay for a json type like guy. they dont know what that is anyway
 
@Gordon But json guys use json, a sane format, not ugly xml
but now really night ^^
 
@NikiC I know, I saw
 
@NikiC json is semantically meaningless. thats not sane.
 
9:44 PM
Am I the only one who cringes whenever I see anyone use simplexml_*? XML is not simple, so why should the api be?
Honestly, the DOM is not that hard . . .
 
@LeviMorrison I don't cringe but I do like the DOMDocument classes better than SimpleXML
 
user895378
@LeviMorrison I only use SimpleXML for extremely basic XML reading. Anything else I strongly prefer DOM.
 
13
A: what the difference between PHP's DOM and simpleXML extensions?

GordonIn a nutshell: SimpleXml is for simple XML and/or simple UseCases limited API to work with nodes (e.g. cannot program to an interface that much) all nodes are of the same kind (element node is the same as attribute node) nodes are magically accessible, e.g. $root->foo->bar['attribute'] ...

 
Also:
> The easiest way is to browse through current MVC frameworks and see how they do it
RAAAAAAAAAAGE!!!!
I guess if you are particular about the word 'current' then it might be okay to say that.
 
user895378
Allright @LeviMorrison I'm going to need you to put the gun down and step away from the ledge.
 
user895378
9:54 PM
Everything's going to be okay
 
I need to code something to get my mind off this.
 
user895378
@LeviMorrison Yeah, reading too many SO Q's and A's can make you forget why you enjoy coding ... good to re-center sometimes. Break time for me. Back later to tie up so loose ends, achieve 100% coverage and push a v0.1 commit :)
 
@rdlowrey :)
 
10:42 PM
@LeviMorrison lol ... been there , done that , had to disinfect computer afterwards just to feel clean again
 
11:05 PM
@LeviMorrison I wish I could start your comment about PEAR a thousand times over
 
11:34 PM
Is it possible to add a title to a link when using github markdown? If so what's the syntax?
 
@PeeHaa I don't think this is possible. Went looking for something similar to this and came up fruitless.
 
@CharlesSprayberry :( Thanks anyway
 
user895378
11:56 PM
@PeeHaa and @Charles I'm pretty sure it's just:
 
user895378
[link text]: http://www.address.com "title"
 
@rdlowrey lemme test it
 
user895378
At least I've used that on github wiki pages ...
 
@rdlowrey sweet. tnx
 
user895378
np
 
11:57 PM
@rdlowrey Awesome
 
00:00 - 16:0016:00 - 00:00

« first day (513 days earlier)      last day (4434 days later) »