« first day (877 days earlier)      last day (4291 days later) » 

11:00
@DaveRandom Ooooh, funny.
@andho i had need for redirects to an ssl connection, but i never had the need for a function returning baseurls.
@Gordon True, but I see no reason whatsoever for using the FQDN in a URL in a webpage anyway (when it's a self reference)
even with an app that can be deployed at a sub path of the url?
Damnit I hate this f*cking router we have in the office
11:04
Cisco really suck for SMBs
i.e: www.example.com/coolapp/
without adding the URL or base URI in the source code
@andho i usually use urls relative to the document root
<a href="/something/something">right?</a>
@andho yes
then it can't be deployed in the above mentioned manner
11:07
@andho why not?
set the document root to coolapp or mod_rewrite it
@andho It can't be done automagically, but all you need is one bit of config (a URI base)
@Gordon still wouldn't be portable
@andho then i probably dont understand what you are doing
...if you cannot change the server configuration and also don't have .htaccess
@DaveRandom yeah that's right
@DaveRandom or base can be taken relative to index.php if using a request router
11:09
@andho then it's not a serious project anyway ;)
@Gordon yeah, i'm making something like wordpress :P
@andho see, not serious :) scnr
@andho but yeah, i see your point now
i just never had that problem
I have better internet today
feels like christmas
@iroegbu oh my god, this is so wrong
Yahoo.com still exists? Blimey
That's almost as crazy as AOL still going...
11:18
@Ocramius dafuq indeed. I've just read that through 3 times and I still don't get the reasoning behind at least half of it. There's a whole bunch of stuff in there that's obviously designed to take into account some edge-case environments that I've never worked with
@DaveRandom // @edge-case
@DaveRandom I wonder why that method is not a class of it's own. I've seen overly long methods like this so often in ZF. I always hope it's supposed to be an Inline Class Refactoring for performance sake but I am not sure /cc @Ocramius
@Gordon symfony even uses public properties everywhere in the http component because of its high performance impact
@Ocramius yeah, i remember beberlei telling me about a few inlinings like that.
@Gordon Really? It's a one-shot routine that's pretty static, I don't see the value in moving it to a class of its own. Why would I want to do that?
11:22
@Ocramius performance impact 0_o
@andho ?
@DaveRandom because the method is waaaaay to long and could be broken down into more readable chunks. if you dont want to have all the chunks in the Request class, you make an object.
@andho nah
it's good today
@Gordon this is still the ugly brother of http request: Maybe should be refactored into an HttpRequestBuilder or such
besides, if you look at the method you will see that the only reference to $this is to a collaborator of $this which means the method has no cohesion to Request whatsoever and shouldnt be on Request at all. By InformationExpert it should be on Server so you dont have to reach into Server for data but just do $this->getServer()->getBaseUrl(). now we could still argue if Server is really the right class for it.
11:26
@Gordon OK I get the idea of breaking it down into subroutines for readability (especially in that case where it's only run once per request and the result is cached, there is no meaningful performance hit), but I don't really see why you'd want to move them to a different class. I personally have never seen the harm in having a class with a lot of private methods as long as they really do belong to that class, and this instance I think they do.
I guess you could have a URIResolver but I personally just don't see the value, it's yet another thing to inject or instantiate
@Gordon I'll stab @DASPRiD for you :P
And then do you have separate classes for each of those resolution routines?
(I'm open to persuasion here by the way, my OOP skillz aren't exactly amazing)
@Ocramius nah, but you could stab him for not sending me my green elephants. although I was admittedly waaaay too late to respond to him in the first place.
He still didn't send them. I ordered 2
now now, let me go and grab him
@DaveRandom well, it's a matter of cohesion. InformationExpert says methods should be on the objects with the most information to fulfil them. And that's clearly not the request object in this case. We can argue whether it really is the Server object, but from the code as it stands now, it is.
11:32
yeah, the Zend\Http\Request\PhpEnvironment request should be split into PhpEnvironment object representing the environment itself, and then just use Zend\Http\Request (as said above)
@Gordon I can see that point of view, certainly. But semantically the Request URI is a property of the request, it should be accessible via the Request object.
@DaveRandom true that, but its apparently a value that is computed from data that is not part of the request, so having a getBaseUri might be okay to have on the Request object but the computation could be in another object.
@DaveRandom no, it's an environment setting. The environment should build a request object, the request object shouldn't build itself
@DaveRandom or what @Ocramius said
11:40
@Ocramius I see where you're coming from there. I think there are two tiers of environment though, the server (the persistent environment, if you will) and the request environment (a temporary environment that only exists for the duration of the current request) and the request URI is a member of the request environment.
This has bugged me a little in the past actually, $_SERVER contains stuff that shouldn't be there and $_REQUEST is a waste of a perfectly good name that should hold the request vars such as the request URI
And all the framework models tend to mimic this misnomer/poor design choice in the language itself
@PeeHaa We should support that tag in the plugin, I've used it before now
@Ocramius Actually now I read that back it makes sense, and what I just said is supporting reasoning behind that behaviour
@DaveRandom yeah... probably
:D
> etc. This is extremely bad practice, although it works.
Wut? Why?
0
A: javascript performance with long array keys

dfsqI assume that you are using javascript array as an object: var arr = []; arr['randomWhatEver123456789'] = '...'; arr['randomWhatEver123456790'] = '...'; etc. This is extremely bad practice, although it works. for this situations you should use objects: var arr = {};

@DaveRandom ? ^
nvm I'll just ping OP :)
Why would it be "extremely bad practice"? — PeeHaa 34 secs ago
@PeeHaa well it doesn't really make any sense. The only reason I could see for doing that would be if you wanted your object to inherit the Array methods, but then why would you want them if you aren't using it as a true array?
Tacking on extra properties to an array would make me feel dirty
hmmmm. Maybe I like it dirty :P
Damnit OP deleted his answer and my comment about it :(
11:53
The thing is, you can easily do arr[0] when arr is an object, but I can't see the use case for arr['name'] when arr is an array
Yeah. I see var arr = []; being useless in that case
anyone has webandphp.com/user/register?destination=issue-12 and can send it to me via eMail? I cannot be bothered to register for a free pdf
I think you're thinking in terms of the PHP swiss-army knife array, whereas JS arrays are much more like C arrays (proper arrays, in other words)
reminds me to install bugmenot into chrome
@Gordon done
11:59
@DaveRandom thanks :)
@ircmaxell get a quad 24". it has only one foot but 4 tfts
12:16
$xml = simplexml_load_file("etim.xml");
$person = $xml->Person;

$firstname = $person->FirstName;
$middlename = $person->MiddleName;
all my life I didn't know of that
nearly sent half of my life writing something to read xml files
@iroegbu the funny thing is: now that you know simplexml exists, you will start to use it and in three months of now you come back here and tell us how happy you've been when you didnt know ;)
*spent
@iroegbu check stackoverflow.com/questions/3577641/… for alternatives
lols... I don't want to reinvent the wheel
ok... thanks
@iroegbu of course not, but you have to aware that simplexml isnt particularly good wheels.
32
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'] ...

12:28
ok... I think XMLReader is what it is...
I honestly don't want to load everything into memory
The xmls contains encoded images... each file is about 0.5MB
I want to load their content into a mysql table
1 row for each file
@iroegbu do you need to alter the content of the xml during the import?
nope
@iroegbu then import directly. without php
google LOAD DATA INFILE
that works? I've done that before on .txt
or rather LOAD XML
12:36
ok... thanks
runat="server" means
can I use that in a loop... kinda like inporting a directory of xml files
@pbvamsi it means run that script on the server-side
@iroegbu i can place an action as well right
PLB
PLB
12:45
@iroegbu w3fools.com I personally, never use w3schools as a reference.
obligatory w3fools.com link >:D
oh come on, beaten to it ._.
PLB
PLB
Actually, I try to avoid using as a reference any resource that is not official.
use MDN and w3c
PLB
PLB
There's no point linking w3schools link while official and great documentations exist out there.
user image
3
had to post it =oP
Their certification program is a complete joke
PLB
PLB
12:48
@crypticツ LOL
their exams are hilariously easy, and often the correct answer is "None of these answers; they have been obsolete for years"
PLB
PLB
@Hiroto The idea is good. One learning resource for different technologies but...
they're only interested in "all dem web hits"
12:50
Hello.
Anyone know anyway to use dynamic variables with $this?
PLB
PLB
@IvoPereira Can you clarify what do you mean in dynamic variable?
Variable that is created during run-time and its name is represented as string?
@IvoPereira, $this references an instance of the class it is used inside. also ewwww
you rarely have to use a variable variable
$this->{$var_name}
12:52
just use an array
PLB
PLB
@IvoPereira $this->{$variableName}
but you should really be using __get and __set methods
Hmm, but I need to append something to the variable.
I'm running a foreach for a week stuff, and I need to have some attributes from my model that vary from mon to sun
then i append a _hourStart and a _hourFinish
to each one.
I need to get that values. How can I do it using the dynamic var?
PLB
PLB
@IvoPereira wait a second.
Hey, does anyone know Yii?
@Trouble i'm using Yii :)
12:55
Is setting up mysql scheme to use in the config, is enough for it to load initial tables?
or I have to manually create thoes?
@Trouble What do you mean by mysql scheme? The db config? If so, yes, it is enough.
He clearly means he's using SCHEME for evil
@Ivo Pereira well I tried that, but I had database error. I created the database, but now I am getting missing tables error. Clearly it is not creating them, viewing from phpmyadmin too
Hmm, strange. What missing tables error do you have?
Well, wait...
You are using Yii to create your tables?
`'db'=>array(
'class'=>'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=blog',
'emulatePrepare' => true,
'username' => 'root',
'password' => '',
'charset' => 'utf8',
)`
12:58
Which tables?
it is example blog project
I thought Yii will look up on the scheme for mysql from data folder and create this tables. Am I wrong?
why , oh why
believe me, you do not want to use Yii
it is terrible
it is just for school project :)
what would you advice anyway? For speed aspect
speed of prototyping, speed of development, speed of maintenance or speed of performance ?
speed of performance
13:01
@Trouble very strange. I would recommend doing it by yourself, based on the main scheme, but not completely loading it
@tereško I've nothing to complain about
if you are looking for performance, Yii is not it
@IvoPereira do you know what global state is ?
@IvoPereira Thanks, well I guess I will have to do that myself. Just my first steps with it and first problems
@tereško so for performance should I look up on Ruby? Zend? Symfony?
native php (or native any other language)
PLB
PLB
@IvoPereira codepad.viper-7.com/rnaZSR I think you'll get the point. And read the manual, please.
@tereško And if both performance and development time matters?
13:05
@tereško So basically if my requirement is only MVC, I should go with pure PHP classes to get the speed? But there goes security issues like authentication for example
@Trouble then why the fuck are you using Yii ? It has nothing to do with MVC. Yii is a clone of Django which was clone of Rails , which was a prototyping framework that just happens to use similar naming conventions to MVC-inspired design patterns
Yii does no implement MVC or anything vaguely related to separation of concerns principle
@PLB then you explain the client how the development works (only project that are fast and get made quickly are "small projects")
at the time I had to choose framework for my project I had no idea what Yii actuall is, so now I am wiser a bit.
Tom
Tom
Hello, I wanted to try out Laravel 4, but can't think of any ideas of what I should make. Could anyone suggest me anything?
RSS aggregator
PLB
PLB
@tereško But mostly clients are non-technical so it's kinda difficult to make him/her sure in that.
At least I find it to be hard.
13:12
i doubt that
making website is like making a house (even the price scale is close) .. and you go on from that analogy
PLB
PLB
Nice analogy.
You don't have to explain technical things and client is happy too. :)
<3 those who send questions to the mailing list after having passed them through google translate first :D
bleh, can't use zis chat :P
13:39
I will @PLB, thanks
@Ocramius Read almost all slides about Doctrine 2. Is there any example for mysql, just to see how data is stored in database. Same way as usually? Is it done with help of Annotations?
@Eugene you need to configure a mapping, that's why it's called "ORM"
@Eugene using sqlite or mysql or bananadb or superduperdb does not make any difference
:)
@Gordon Nah, too much $$$ and I don't care for vertical monitors (stacking)
@Eugene basically you do

$user = new User();
$user->setUsername('Ocramius');
$em->persist($user);
$em->flush();
dude, I really suck at this chat :D
13:50
Ctrl + K
For pasting large code message
Remove those `
or just click the "fixed-font" button that shows up when you type a multi-line message (next to send)
still no result :D Nvm :D
@Ocramius edit code message and when editing pres Ctrl + K and send
$user = new User();
$user->setUsername('Ocramius');
$em->persist($user);
$em->flush();
yeah, it just doesn't allow mixing up things as far as I can see
Anyways. As I see I can't go anywhere without Annotations, right? They map columns to properties of the class, right?
13:54
@Eugene there's different ways of specifying the metadata, but it has to be defined somehow
@Hiroto no contest
@Hiroto Bitch please
at least when it comes to performance
13:55
And configuration
i'm reading a blog post
Tomcat?
/me hides
Also @Hiroto "The magento experts"?!? WTF is that you are reading ;-)
@PeeHaa and sanity
13:57
@Ocramius netty :)
@igorw or short-circuiting /dev/urandom to :80
incredible throughput
@ircmaxell Yes! sanity
@Ocramius nah, /dev/true
PLB
PLB
Has anybody used haxe/php compiler? Does it generate optimal code?
the hint should be that you have "generate" and "optimal" in same sentence
@tereško compilers can optimize better than most humans, in the general sense. A human can optimize better for specific cases...
14:21
@Ocramius well sir, you've convinced me. :) Will give it a try.
SELECT '<?php' INTO DUMPFILE '/var/www/xploit.php'
@Ocramius neat :D (from your blog)
Anonymous
14:43
hmm...
Hi, I need help with php curl, how can I set all the headers just like the actual request
morning
Good morning
@NikiC m,ornign
@webarto oh, that old one
is it still valid? :D
yeah, old but good
dunno :D
> You're probably okay.
The C++ room is real funny
Every single time I enter that room they are currently bitching about PHP ^^
15:09
dude, that's some serious WTF O_O
@ircmaxell what's that?
> Ubuntu: An ancient African word meaning "can't install Debian"
Anonymous
function date_counter($value){
$date = new DateTime();
$date->sub(new DateInterval('P'.$value.'D'));
$m_date = $date->format('d/m/y');
return $m_date;
}
@webarto LOL, access 2007?
Anonymous
why does that fun give me errors
Anonymous
is there anything wrong with it??
@DaveRandom Ubuntu has many advantages
Lol, it throws random mysql_* errors
@IanCarroll It does. "Not being OSX" and "Not being Windows" are the two key ones.
Anonymous
it says Fatal error: Call to undefined method DateTime::sub() in /home
Anonymous
15:13
I need help people..
@DaveRandom Yeah, Windows sucks.
@ircmaxell How nice. WTF oriented programming
@PHPNooB Just a guess, how about new \DateTime
@PeeHaa that would describe my current job
@PHPNooB How about reading the docs? php.net/datetime.sub
Look at the version number and then compare to your version number
15:15
@tereško :-(
@tereško Stating the obvious here - but can't someone with your skills easily find another job?
@PeeHaa I lol'd so hard
Anonymous
I have read the doc, that is even where I got the code
@PHPNooB You probably copy pasted code. That's not reading the docs
Anonymous
I just want to know, if I have made syntax error
15:19
@PHPNooB Well since the error message says Call to undefined method and not Syntax error, I'm guessing that the problem is a call to an undefined method rather than a syntax error
@PHPNooB I already told you, look at the version number in the docs ;)
It says that ::sub was added in 5.3 and you are probably using 5.2
Just my random guess
You can do the info call in PHP to see your version
Anonymous
but my server has php5.3 version. it worked in my localhost, but not in the server
user895378
Morning @all.
@PHPNooB check that you really do have 5.3...
15:22
@PHPNooB If it works on your laptop, make sure your server has 5.3. I'm doubting you even checked
Anonymous
am checking the server. i thought it would have the latest php v.
@PHPNooB On Ubuntu at least, default "PHP5" install is 5.3.2
I haven't even install 5.4 yet, should do..
Monring Mr lowrey
@PHPNooB php --version
morning @rdlowrey
Ubuntu (; ) or "uMunthu" (Chichewa) and "Botho" (Setswana) is a southern African ethic or humanist philosophy focusing on people's allegiances and relations with each other. Some believe that ubuntu is a classical African philosophy or worldview whereas others point out that the idea of ubuntu is a philosophy or worldview developed in written sources during the second half of the 1900s. The word ubuntu has its origins in the Bantu languages of southern Africa. Definition There are many different, and not always the same compatible, definitions of what ubuntu is (for a survey of how ub...
Basically, it means philosophical bullshit.
@Jimbo Ain't nobody got time for that
Anonymous
PHP Version 5.2.17
Anonymous
so, it is 5.2.17
check if the drives aren't made of stone
15:33
stackoverflow.com/badges/155/electorate <--- I dont understand this badge
Anonymous
i tought everything was upto date
@PHPNooB are you on 10.04?
Anonymous
what is that .?
@deadlock voted on 600 posts and amongst those just voted on a minimum of 150 questions
Basically, just vote on a shed load of questions :)
Anonymous
15:35
I am hosting with resellerclub, how can i get around of this problem.?
@PeeHaa ok now I get it.
Isn't that the easiest gold to get?
yea
But it just requires upvote absue which I dont like :D
0
Q: What's the proper use of $unitOfWork->getScheduledCollectionDeletions() in Doctrine 2?

eillarraI'm trying to detect changes in a many-to-many relation in an onFlush event. If new entities are added to the relation or the relation is updated (always keeping an element), I can detect changes using $unitOfWork->getScheduledCollectionUpdates() and then check for getInsertDiff() or getDelet...

I have to give some bastards upvotes for that
15:36
Just use the site and the badges will come automatically
well that bounty escalated quickly
@deadlock or downvotes
@PeeHaa really? now I am happy :D
;-)
all time by type month week day
205 up 105 question
15:38
@rdlowrey rofl
user895378
Just because I don't like it doesn't mean it doesn't work for other people :)
user895378
If something does what you need it to do and it fits in your workflow ... good for you. By all means, use it. Addendum: I've been wrong before and will continue to be so many times in the future.
Anonymous
this is what i get for hosting with Indian companies.
user895378
Is it just me or does the HHG2G look suspiciously like a first-generation amazon Kindle?
user895378
15:42
Well, it looks like mine, anyway. the one I had before it stopped working the day after the one year warranty expired.
@rdlowrey lol
@rdlowrey If you wouldn't have lived in a 3rd world country you would still have had warranty
user895378
OMG nowhere in the Kindle manual did it say, "don't read your Kindle in the sauna."
@rdlowrey I'm a huge over-engineering fan, so I also may be wrong many and many times :)
I think I'll buy me a Kindle Paperwhite
It looks so much cooler than a normal Kindle
user895378
15:46
Yeah, aside from the planned obsolescence I really like the Kindle.
@rdlowrey Wonrg?!?!? Never! Different views and opinions every 2 months? Hell yeah :D
@rdlowrey obsolescence?
user895378
@NikiC (joking about how amazon "planned" for my device to die immediately upon warranty expiration so I'd be forced to buy another)
@rdlowrey It just shows their amazing engineering skills ;)
@rdlowrey LOL
Anonymous
15:57
WOW, mysites php version got updated to 5.3 just now, they did not even give me enough time to complain
Anonymous
the script is working thanks all
@NikiC I have no idea

« first day (877 days earlier)      last day (4291 days later) »