« first day (392 days earlier)      last day (4780 days later) » 

10:26
'The last message was posted 11 hours ago.'
:)
user680786
@GlitchMr ah, you broke the counter, it was experiment
:P
0
Q: move_uploaded_file gives "failed to open stream: Permission denied " error after all configurations i did

user63898im keep getting this error when trying to configure upload directory with apache 2.2 and php 5.3 on CentOs i loged in as root in the php.ini: upload_tmp_dir = /var/www/html/mysite/tmp_file_upload/ in httpd.conf: Directory /var/www/html/mysite/tmp_file_upload/> Options -Indexes ...

drwxrwxr-x 2 root root 4096 Nov 11 10:01 images
775?
I guess that this guy runs server as nobody...
10:49
hey there
guys how to know last insert id in prepared statements?
 
2 hours later…
12:48
@NikiC i've read your blog post now. It's informative, but I dont think the changed description in the manual foreach operates on a copy of the array values unless $value is referenced by preceding it with & is wrong.
it is?
@ircmaxell i've tried the various examples @NikiC gave but none will operate on the actual values in the array unless I reference them in the foreach. so even if php copies the array in some cases, it apparently will copy the values unless I use &.
copy-on-write...
13:13
hi
@Gordon Yes, none will operate on the values, that's the purpose of by value and by ref iteration
@NikiC so why do you think its "another type of wrong" then?
But still the array structure may get copied even if you iterate by value ;)
@NikiC true, but that wasnt the point of the change and its not even implied in the change and its not even important for any practical purposes or only in very tiny situations where you are memory bound
@Gordon Well, no, I think it is wrong as it is now. If you simply iterate an array with refcount=1 by value there will be no copy, even though your change might suggest that
then why doesnt it get changed when i assign a new value?
13:18
$value is just sharing zvals with the current array element. As soon as you assign it a value it does no longer share: The array element will not be referenced anymore and $value will be an independent variable with a separate zval
hmm, i see what you are aiming at
no, not a copy
nothing is copied
you simply assign some value to a variable
nothing is copied from the array
ok. so what would be a better phrasing then?
I would remove that copy thing altogether ;)
The sentence "As of PHP 5, you can easily modify array's elements by preceding $value with &." should be enough
I think I found a performance regression between 5.3 and 5.4
13:23
in respect to what?
@Gordon I'll edit.php.net the page so you can see what I mean ;)
why does it have a refcount of 2?
one for the var, one for the call ;)
and refcount 3 one for the array element, one for the var, one for the call
and when i put a & all of them will have a refcount of 1
I'm running my CryptLib vector package (which is computationally very expensive), and 5.3 is consistently between 10% and 20% faster to run them than 5.4 RC1 is
@ircmaxell Last time I tested it I had results the other way around ;)
@Gordon @Gordon Yeah, because the call need to separate the zval. You'd need to call time pass by ref it ;)
13:27
hrm, odd
yeah, it's running on average 90secs vs 100 to 110 seconds for 5.3 & 5.4 respectively
i'll test later
@NikiC ok, so when using foreach, PHP will assign the current element to $value by value. it basically has nothing to do with whether the array gets copied or not.
yes
@Gordon correct, usually causing a copy-on-write "copy". Unless the ref flag is set on the array
which is why adding a reference to the function declaration will slow down the array if you don't iterate by reference
so its just your regular assignment whereas putting a & is assigning by ref.
13:33
Bingo, found the problem with the regression. 5.3 wasn't finishing three of the tests
now it's 105 vs 115 seconds (5.4 to 5.3). So less than 10%, but still significant
@NikiC in this case, yes. that copy part should just be dropped altogether
looks ok to me. Should the behavior be documented to point out that copy vs copy-on-write vs reference is detailed?
@NikiC sounds good
@ircmaxell Don't think so. Will only be confusion to most people ;)
Nice, my blog post on psr-0 is #3 on google for a search for "psr-0": google.com/search?q=psr-0
@NikiC agreed. lets keep it focused on pragmatic usage not technical detail
@ircmaxell it is on #10 when i open it. any my own post is on #6
13:51
ah, interesting
yours is #8 on mine
mhmm. google shaping reality again
@Gordon yours is #6 on mine
And ircmaxells is #10
probably location?
could be
perhaps.
could be location or past search history
@ircmaxell or a bit of both
13:52
or it could know it's me (I am signed in), and just rank mine higher
Uhm, do you see my post as "probably language?" or "probably location?"?
Because I see it with "language" but when I edit it it says "location" ^^
Ah, get it
If you start an edit but don't save it the edit is still saved and you see the edit next time you edit ^^
@ircmaxell But phpdevelopers link to your blog post is at #7 :D
13:55
Wait, so mine is lower than the linkbait for the post?
jep
#3 for my post, #5 for my post on reddit, #7 for my post on phpdevelopers here
^^
Oh, and just thought of an argument against the "but you don't have to use it" line that's been pulled
True, but since it didn't play nice, if I used a library that used it, I would be screwed since I'd be forced to use it with its limitations
Tek
Tek
Good day everyone.
14:07
how's it going?
Tek
Tek
A little tired. Had to remove carpet the other day out of my room, so I had to move everything out. (Cat ruined a good portion of it and I couldn't live another day with it in bad shape)
nice
I am still whiped from yesterday (took my sister and her 2 kids into NYC to see the Radio City Christmas Spectacular). It was fun, but exhausting...
oh crap, i didn't notice that someone broke DE
Tek
Tek
Oh nice. Looks like there'll be one here in Dallas.
Tek
Tek
14:12
Was it worth it?
Every minute of it
they loved it. I feared they may be too young (4 and 7), but they loved it. So it was great
Tek
Tek
They need to add some CDN to their site. Their previews are loading super slow on a 40mbps line
:p
lol
the show itself was decent, but the 3d part was just dumb
Tek
Tek
Considering you enjoyed it, I didn't expect you to say that at all
Well, as a whole it was great. But that doesn't mean there aren't things that don't need improvement
Tek
Tek
14:22
Definitely something to note, I'm sure my my sister and little cousin would love it
Some parts are in 3D huh? :o
yeah, they have 2 videos they play. Both make plenty of use out of the "do stuff to show its 3d" meme. Like reaching out towards the audience, throwing things at them, etc...
but all the kids sounded like they loved that.
so perhaps it's just me that found it corny and dumb
Tek
Tek
haha, I'm sure it wasn't your first time seeing 3D
so no doubt
it wasn't. But I'm a fan of tasteful 3d, like Avatar was. Not "let's make dumb tricks to show it's 3d"...
Tek
Tek
You should perhaps see Thor in 3D as well, loved some of the depth on it. I loved the movie so much as well that I went to see it in 2D and it just wasn't the same.
I did. I liked it, it was tastefully done
Tek
Tek
14:29
Haha, glad you agree :D
Same with Green Lantern
Tek
Tek
I missed out on that one, my friends told me to stay away from it
But some others are just done for the gimmic, which is kinda dumb
@Tek It wasn't the best plot out there, but it was pretty good none the less. The effects and acting was awesome.
Tek
Tek
Sweet. It's on netflix on blu-ray. Will definitely pick it up
Now to know if it's on 3D before getting it...
Yeah, the plot was the only thing that was lacking. And it wasn't horrible, just could have been better (I'm not into comic books, so it wasn't a religious thing)
Tek
Tek
14:32
haha I hear ya
back in a bit, have to pay attention to my whore cat or he'll cry continuously...
Hi guys! Is today is saturday?
0
Q: Magento upsell_products raises error "must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection"

razbakovPutting this line to view.phtml ... <?php echo $this->getChildHtml('upsell_products') ?> ... raises this error: Recoverable Error: Argument 1 passed to Mage_Catalog_Block_Product_Abstract::_addProductAttributesAndPrices() must be an instance of Mage_Catalog_Model_Resource_Eav_Mysql4_...

@ircmaxell avatar not being just for the show-off? Oo
i felt that was one of the worst movies ever
14:58
hi @KamilTomšík
@Gordon It's a Cameron movie ^^ It can't be that bad by definition.
@NikiC hi ;)
@NikiC it was worse than that
Tek
Tek
Since we're already off topic, anybody here like really spicy foods? :)
@Tek nah, I don't like too spicy
I really wondered what broke the DE build
There were no commits right before it broke
btw: this week I was doing some java portal stuff, and I've came across eclipse debug plugin for enterprise java. well, I must say, java came a long way since last time we met - when exception is raised or breakpoint occur execution is halted and browser just waits, which is great, you still can't replace whole codebase while running but still... it's just great.
is anything like that planned for php? (zend studio?)
15:13
No idea, I never even used XDebug ^^
what's current state of debugging in php eclipse plugin?
@Gordon Could you maybe help me to get the German translation working again?
The error message is:
ERROR (file:////local/web/sites/edit.php.net/data/phpdoc-all/de/reference/zip/entities.ziparchive.xml:1:2)
&.local.web.sites.edit.php.net.data.phpdoc-all.de.reference.zip.ziparchive.addemptydir;
--^
xmlParseEntityRef: no name
@NikiC i guess it may not start with a dot
Tek
Tek
@KamilTomšík Have you not used xdebug for PHP?
no, ever (in the sense of never :))
Tek
Tek
15:17
@KamilTomšík You should try it. It works flawlessly with pretty much any IDE
I've tried it even on VIM
@Gordon I checked some other entities.*.xml files and they all start with a dot
@NikiC how about the - then?
that's the same everywhere too ^^
The strange thing is that there were no commits for at least a month before it broke
@NikiC interesting. will the error go away when you shorten the entity?
hm, i just checked the russian and english translation and they have normal names, not those strange &.local ones
15:22
@NikiC is the entity defined somewhere?
@Tek I'm interested in that http suspend - does eclipse pop out when exception is thrown? is browser paused? and can you hot-swap codebase? because that would be just awesome. the first language I saw doing this was smalltalk and now java seems to be at least in a halfway. I'm curious what php is going to do about it
@Gordon It looks to me that those are auto-generated files that somehow are generated incorrectly.
Tek
Tek
@KamilTomšík No, Yes, and define 'hot-swap'. Exceptions are thrown in the browser and look like so: fieg.nl/wp-content/uploads/2011/03/xdebug_exception-540x115.png
@Tek Kamil is talking about real debugging ;)
It is when the code reaches a breakpoint, execution halts and you can inspect variables
This is something XDebug can do
But I never tried it
Tek
Tek
Yes... you can do that with x-debug. And that's what I was talking about.
15:29
@Tek when exception is raised, browser waits (blank screen), ide pops out and shows you what happened, and hot-swap means you still can edit your code, make a fix, and let it finish current request
Tek
Tek
@KamilTomšík Like I already said, with X-debug the php script is halted ala exit() and shows a stack trace (info varies depending on x-debug config). I was afraid that's what you meant, I don't think hot-swapping is possible. But shouldn't be a huge inconvenience. Pushing F5 to pass the breakpoint, saving the file again and pushing the debug shortcut again to land on the same breakpoint isn't too bad. (Shortcuts on Netbeans anyway)
I was curious if that is possible in php or if it is planned
Tek
Tek
@KamilTomšík Don't know about the technicalities but due to PHP's scripting nature I don't see how that's possible
okay, those entities.*.xml files are definitely autogenerated
they are ignored for the repo
b01
b01
16:17
Any use PHP Pake on windows before?
never heard of it
b01
b01
16:30
I use it at work, but wanted to use it at home also
It's supposed to be what rake if for Ruby
16:46
"Added class member access on instantiation (e.g. (new Foo)->bar())."
Nothing special :P.
Not surprised, it's RC...
Rest of PHP 5.4 RC1 are bugfixes...
But maybe that's good thing...
and speed increasing..
Where?
class member accessing it's cool :P
... I cannot think of any case where it would be useful...
@GlitchMr Okay, looks like the problem was related to something completely different. Two entities missing for new 5.4 features. But philip said he just fixed it ;)
@GlitchMr It probably has application in badly designed software ;)
16:49
I would rather see function_call()()...
You can do it in Python, so why not in PHP?
I generally think that PHP should generalize its grammar
>>> function a() {return function() {return 2}}
undefined
>>> a()()
2
JS :)
and using $name = (new User)->getCurrent()['name'] really simplify my life :)
...
getCurrent()['name']
... what?
But where is that information?
@GlitchMr array dereferencing was added in 5.4 too ;)
16:54
@NikiC: I know...
@GlitchMr Then I didn't understand your question
But how this class can get name of user
You haven't specified it
if user info in session and when you create instance, getCurrent function returns an array from session.. somehow that :)
Makes sense...
jf_n_s_i()...
17:11
tries to make PhpStorm run phpunit from one PHP version using some other version but fails...
4 messages moved to bin
hmm, i'm confused, Gordon, could you please tell me whats bin?
17:27
spam folder
 
1 hour later…
18:30
@Y2ok spam folder. given that you posted the same two messages twice I assumed you was some kind of spam bot. sorry, if you wasnt.
@Gordon "Fix IE9 login page with gooh too ! Re-thanks ;)" óÒ Did I just read IE9 there?!
@NikiC when it wasnt working with FF I tried with IE9
@NikiC but that was by far not the only bug. online editor is completely unusable with IE9. I sent a list to Yannick
@Gordon Thank god, I though you were using IE9
"Gave gooh php-src karma by accident. We don't want him lured into making php-src commits quite yet, so let's force PHP Documentation for now. Thank Peter and the kittens for spotting this." :D
@NikiC hehe, yeah. i know
is looking for the file where the edit.php.net rights are saved
19:02
#!/usr/bin/php
Hello, <?php

$a = 42;

switch ($a) {
    case 42;
        echo 'world!';
        break;
    default;
        echo 'you :(!';
}
Find what's wrong with this script :P.
... if there is something wrong :P.
oh wait... that's intentional PHP feature...
Weird...
case 42;
But I still find it weird...
I though it's error
I find it weird because it looks like default constant in null content...
what ?
php.net says 'It's possible to use a semicolon instead of a colon after a case' - o_O I didn't know it :)
user50049
19:50
PHP happily lets you use most conditionals as statements.
user50049
Python requires a deliberate pass to do that, PHP (often wrongly) assumes you realize what you typed. Just like C.
user50049
Syntatically, they are still closer than apart when it comes to anything past a {
Well...
; is empty statement
So, if(1); is actually if(1){;}
are you just stupid or trolling ?
20:06
@tereško: Why you ask?
20:25
either way it made me laugh lol
@tereško are we being nice again? :)
21:15
hello
@IndianGirl hey!
@IndianGirl hello
@DmitryTeplyakov русский?)
@kolyaflash а то :)
@kolyaflash точнее с Украины)
@DmitryTeplyakov круто)) Я бы вдул этот индийской девочке...
@DmitryTeplyakov опа. я с луганска
21:20
@kolyaflash :-D
@kolyaflash я с Донецкой области
@DmitryTeplyakov считай соседи :)
@kolyaflash ага)
@DmitryTeplyakov ты я смотрю тоже недавно тут. Блин, прикольный очень ресурс.
@kolyaflash та вот решил зарегаться - посмотреть. Реально офигенно, когда тебе за 2-3 минуты пару человек отвечают..
Та да) Реал тайм форум)
21:33
@DmitryTeplyakov I have a problem pz help me to solve it. I want to stop a PHP execution process after 10 second. How to do it ?
Heloo everyone. Anybody here?
@IndianGirl and what must happens after 10 secs?
user680786
@IndianGirl @kolyaflash writes that he likes your photo and even want to kiss you. He writes it in russian.
user680786
@IndianGirl set_time_limit(10);
user680786
@Kirzilla hi
21:35
set_time_limit(10) where ?
@OZ_ LOL )))
user680786
@IndianGirl in start of script
@OZ_ ппц..
I got a little question. I'm not good with MVC and trying to understand YAF PHP extension. Please take a look at this sequence yaf.laruence.com/manual/images/yaf_sequence.png
user680786
@DmitryTeplyakov please, write in English, be polite
21:36
оо... русский
Actually I have a page which runs via cron job. So it is taking unlimited loop
user680786
@IndianGirl so in code of this page try write "set_time_limit(10);" or check time in loop
Ok I'm checking
@IndianGirl how about fix this script to prevent infinity loop?
21:38
I don't now where is the problem. I m confused
user680786
@IndianGirl show us your code
Can I paste here ?
user680786
@IndianGirl yes, and you'll see button "fixed font"
pastebin.com?
1 mnt
This is the code here pastebin.com/40F70Syk
This counts Total child of a Id (MLM) in left side
user680786
21:41
@Kirzilla well... it's MVC. What is your question? More about MVC in web-applications you can find there: symfony.com/doc/current/book/http_fundamentals.html (and there is similar scheme)
It is working but shows infinity loop
user680786
@IndianGirl because of endless recursion
user680786
in line 30
@OZ_ чо? какой нах MVC? Это пипец.
@OZ_ What happening when checking autoResonse or enableView after calling controller? What is being checked?
user680786
21:43
@kolyaflash please, use English
But there is a while condition
while ($row = mysql_fetch_row($result)) {
@OZ_ no recursion in line 30.
@kolyaflash lol
is it ?
user680786
@kolyaflash yes
21:44
$_SESSION['hackx8'] = $_SESSION['hackx8']+$count;
while ($row = mysql_fetch_row($result)) {
nodecount($row["0"]);
}
user680786
@IndianGirl by pastebin lines counter
yes
But there is while condition before nodecount($row["0"]);
@OZ_ fetch row have a certain number of iterations
I have not understood
@kolyaflash aha, it is not MVC sorry... Is is just request / response framework. But adding Model to this will make this framework MVC, I suppose.
21:46
@OZ_ equal to the number of result fields
user680786
@IndianGirl yes, but it's recursion. So, while your function have ANY result, that function will call itself and will have ANY result, and then call itself and endless
user680786
@kolyaflash it's not usual call, it's recursion
ohh
Then how to stop it when there is no result. Any Idea plz ?
@OZ_ number of this "while" iterations equal to the number of result fields. no more.
user680786
@kolyaflash function callme() { for ($i=0;$i<4;$i++) callme(); } - it's endless recursion, even if we know that i is 5 numbers
21:49
@OZ_ фак. сори. понял.
I did not notice that it calls itself.
Yaa I too
But how is this possible? Why?
If it endless then what is the mean of for loop ?
user680786
@Kirzilla it's checking, do your client needs View to get response in HTML format, or pure text is enough - that's how I understand it.
@OZ may you give a Idea that how I can stop unlimited loop , plz
21:52
@IndianGirl rewrite code. I think.
Чорт... простите конечно, но я первый раз в жизни увидел настоящий индусский код :)
@kolyaflash ты еще хочешь ей вдуть?
@DmitryTeplyakov пожалуй воздержусь))
@kolyaflash лол
@kolyaflash В реальном коде ассамский, я из Ассам, Индия
ну полный ппц тут твориться... лол
амерский чат :))
лол
просто удивлен, сорри, чат американский, а тут одни русские
user680786
21:56
@IndianGirl try to write it without recursion. recursion with SQL-queries will always works long
@IndianGirl So... Glad to meet you. I'm from Ukraine. We also do not write better code.
user680786
@Kirzilla she just use translate.google.com, and at least she doesn't talks like beavis and butt-head
@OZ If I try to write without recursion , Then How I can count the downline child of a Person ?
I know little spanish, just it
@OZ_ ty for explanation!
user680786
@IndianGirl you can build your tree with Materialized paths and then use "LIKE" operator to found all childrens in one query.
22:00
Little hint plz ....
I'm very new to MVC - please explain, what controller's method usually returns? Renderable object (View, for example) / var containing ready html or json or what else? What is best practice and where can I read about stage when Controller's method returning result to client.
user680786
@IndianGirl it's when ID's are organized to path.
Hoy Hoy
user680786
@Kirzilla well, I prefer to use Symfony's way - return Response object, to be ready transform it into HTTP answer. So inside this object we should have rendered text and headers (if necessary). More info with examples: symfony.com/doc/current/book/controller.html
user680786
22:03
@ircmaxell Hi
@OZ_ ok, your answer is clear for me. So we should assign rendered variable to Response (s/th like `$this->getResponse()->setResponse($View->render()), right?.What if I'm throwing Not Found exception in controller's method?
@ircmaxell hello, can I answer some question about Zend Framework?
user680786
@Kirzilla well, maybe it will sound too obvious, but.. catch it.
@OZ_ sorry stupid question about Not Found exception.. lol
22:09
@Kirzilla another useful return value is name of next action (in case of redirect)
@ircmaxell hi
@DmitryTeplyakov are u using Zend Framework? What are your impressions?
@KamilTomšík Hm, nice! Never thought about it... Chain of redirects... I have to think about it. Thank you!
@kolyaflash It's really cool :) I like it
@Kirzilla no problem, that one is borrowed from jsf - you might have a look on that as well
although it's completely different architecture
22:14
@kolyaflash versus pure php - it's cool)
gtg have a fun
@DmitryTeplyakov are u used any else frameworks?
How goes it @NikiC
I am using WAMP for php project. Can I teste cron on my localhost or linux system is must ?
test
@IndianGirl WAMP is shit.
22:18
Do design webpages in dreamviewer, WAMP is good i think
sups means ?
@kolyaflash No)
@IndianGirl In this case, you're right.
user680786
@IndianGirl "what's up"
22:20
Nothing, I want to test cron on my local server... how to do it ?
will set_time_limit ( ) work when script is run via cron command ?
@kolyaflash thank u for the link
@IndianGirl of course
@kolyaflash In ZF bad thing is it has not models in right meaning of 'models'..
@DmitryTeplyakov really bad
22:26
@kolyaflash It has ORM for working with database, so 'Models' in ZF in most cases associated with working with database, it's wrong. Right way is realize right model yourself.
@IndianGirl if you terminate scipt - it do not all things it must. I think it is wrong..

« first day (392 days earlier)      last day (4780 days later) »