« first day (1195 days earlier)      last day (3979 days later) » 

00:19
@BenjaminGruenbaum does ldc imply a new object has been created? pastebin.com/w8nr5f4T
00:38
good nigh!
01:24
good morning!
morning everybuddy
01:44
is there a function to print the data (which means print the document via printer) after searching value (with a search query "%like%") which matched on your database table? sample if i type rose, all data with rose will be displayed and how to print this? tcpdf is a separate file for a pdf output (ready-to-print docu). i can't have a search function there.
@Cecil print via server-side or via client-side?
client-side
@Cecil did you have a look at stackoverflow.com/a/16239785/1592648 ?
@crypticツ: what i mean is that, print the searched data..
Hi all! anyone here know how to use codeigniter-payments properly? their docs are quite confusing~
02:00
Can anyone help me why this is giving me 500 server error
RewriteRule ^admin/([a-zA-Z0-9/-]+\?(.+)$ /admin.php?uri=$1&$2 [L]
I was only changing the regEx and it's valid..
@BillyMathews "it's valid.." really?
@BillyMathews There is a missing bracket ")"
ohh no it isnt
DUN-DUN-DUNNNNNNN!!!!!
bright eyes. bright future.
can anyone help with my prob?
02:04
Ok, it is now validated but it still isn't working properly
the rule isn't matched
so what should it match ?
When i run this command in ubuntu 12.04 it said This program is deprecated

ffmpeg -i input.avi -ar 22050 -ab 32k -r 25 -s 480x360 -vcodec h264 -qscale 2.5 output.flv
@HamZa it matches correctly on RegExr
'admin/(some url)/($_POST stuff)
it's a $_GET
Can anyone help with my problem ??
02:11
that's what I mean
@Cody You don't even ask a question in your message, so nothing to help with.
I'm wondering why you have var=5 ?
Why don't you have ?
/admin/edit/user/var/5
?
because I want to be able to $_GET variables that are passed to the url in my admin .php file..?
02:26
@crypticツ Sorry ;)
When i run
ffmpeg -i input.avi -ar 22050 -ab 32k -r 25 -s 480x360 -vcodec h264 -qscale 2.5 output.flv
it works fine in windows but in Ubuntu 12.04 it said This program is deprecated
What can i do about it ??
Try
RewriteRule ^admin/(.*)$ admin.php?uri=$1 [QSA]
Oh, even better:
RewriteEngine On
RewriteRule ^admin/(.*) admin.php?uri=$1 [NC,QSA,L]
NC -> match case insensitive
QSA is the magic for all the vars after ?
@HamZa qsa = querystringappend
/and I can't remember my mum's birth day.
haha thanks
I got the manual by my side http://httpd.apache.org/docs/current/rewrite/flags.html
@HamZa absolute genius! :)
It's not that often that I use htaccess, so I do quite struggle a bit
02:39
Hope I gave you a good challenge ;)
@HamZa yet another reason to move to nginx, less rewrite crap.
@Danack lol, damn setting up nginx was so damn hard for me. I gave up and went for lighthttpd
@BillyMathews yup :P
color 02
echo it's almost 4am
/me goto sleep;
echo cyaa
@crypticツ Apparently Laravel also does the "thanks for the PR we'll take that without merging" thing.
Any please help with my prob
03:02
@Cody if someone wants to help they would have already helped. It's not even an php issue. Just search on google and you'll find your answer
@Danack arrgh, Github should have some mechanism to detect if a commit that has been rejected is later submitted by an admin and notifies the author of rejected commit and publicly shames the admin for doing it
03:24
hey guys. what do you think is the best way to the Linux distro of the server running PHP?
check /etc/ for *-release?
or run lsb_release -a
@cantsay does lsb_release -a work?
that's right it's underscore
@Danack wow, what the fuck?!
@cspray I had the same thing happen to me =o( I was pissed
03:32
That apotheos guy on GH handled that a lot more diplomatically than I think I would have
And what the fuck at the responses?
I honestly didn't realize this was even something that would be an issue. But, honestly it kinda pisses me off and it hasn't even happened to me
thanks guys. lsb_release doesn't exist on my server though. I found an answer here - stackoverflow.com/questions/16334577/…
thanks anyway though
why can't i scroll down to my pop up? pastebin.com/Es8xFJ4w
@Cecil which bit isn't working? the window isn't opening or it's not showing the correct URL?
the window is opening but i can't scroll down
03:53
@Cecil change 'width=548,height=562' to 'width=548,height=562,scrollbars=yes' but it doesn't work in Chrome
according to w3schools anyway. you'll need to wait for someone else or ask in JS chat
exactly did not work in chrome. well, okay.. thanks
04:14
upgraded to sublime text 3 :S
@Danack i actually read the wikipedia link before asking the question. One of me friends argues tat two objects will be created.. so before i argue with him i wanted to make sure that as @BenjaminGruenbaum said, compiler may-not create any... but this link: stackoverflow.com/questions/15760661/how-many-string-object states that one object is created .. i cannot get how did they deduce one object is created.. i don't see the new opcode..
 
1 hour later…
05:43
Heya, everyone
hiding all error doesn't work for me. I tried to hide in this way
Ohh! I made it solved. I had to write the hiding code for every page
Thanks Everyone :) Later :)
 
1 hour later…
07:12
Morning
morning
I got a weird problem. I am trying to upload folder with JS FormData and PHP. When I started uploading it is sending around 20 files, but in PHP it is receiving only three files.
What do you guys use to minify css, js and html?
08:06
@Patrick In historical time, I was using netbeans plugin. I guess, there should be something like that for your IDE.
@Leri I don't want it minified right away, only on the production server and only the response of the server, not the source code
@Patrick I use LESS for CSS, haven't been minifying JS and HTML, I must confess.
@Patrick this?
@Leri yes, I looked at that. I was wondering if there is something that also minifies HTML (as google does) and maybe shortens css classes etc in both css and html. If not I'll just use minify
mornin
08:17
hi, @Leri @Mr.Alien
@AlmaDo hello pal :)
@Patrick Hmm, I guess you can safely remove whitespaces before/after tags with regex but that may break content in some edge-cases.
@AlmaDo Morning.
one of the worst mornings i am having
Guys, could someone please teach me how to search the php language constructions definition in php-src?
it's obvious how to find functions, but what about constructions like unset?
I found zend_do_unset is that it?
@zerkms AFAIK, they are in zend_compile.c and name is zend_do_{construct_name}. However, don't rely on me. Better to get answer from internals.
08:23
yep, that's where I found I should see first, so asked to confirm
good morins
good mornings
I need some ideas how I can "mix" multiple webapps in the same webroot on an apache httpd based system.
so far I do deployments from git but a CMS app is creating a bunch of static files and I all see those as new/created.
I thought about stuffing things into different directories but then I need to manage to direct requests to the different subfolders internally (mod_rewrite comes to mind).
And I'm wondering if there are other ways to do that, perhaps a bit more snappy?
@hakre custom front controller that calls the corresponding CMS front controller according to whatever rules you set?
08:39
@Patrick is there mod_custom_front_controller with apache? :)
I mean I really would like not to introduce new code but solve it through configuration of higher-level components.
@hakre no idea haven't used apache in a while, but I meant a php front controller
Also whatever you do, make sure its pretty obvious or well documented how it's done :)
user652649
morning
morning
@iroegbu add ium - comes with all the good stuff minus vendor lock-in.
hmmmm... ok
08:49
@iroegbu If I accept permission request, it means I trust the site and if site misuses my trust is not a Google's problem. imho.
good mornings
@Leri I assume the problem is, that users give permission and then forget. Also often when giving permission they can not forsee how far this goes. Online empires like Facebook are based on such schemes, and sure Google has to come after pushing G+.
Hmm my english is not good enough to explain the base64... Anyone who can re-read my answer and correct some mistakes?
2
A: Data Image base 64

Joran Den HoutingYou can use it like this: <img alt="Embedded Image" src="data:image/png;base64,{base64 encoding}" /> It's used to generate new images, or to store images as plain text. You can read more about base64 encoding here on Wikipedia: http://nl.wikipedia.org/wiki/Base64 How does it work? The chara...

I tried to explain as good as I can, but it's quite a complicated process :p
08:57
@JoranDenHouting Well, the question is actually not a concrete, technical programming question, but a request to teach someone something indivudually. Does normall not work that well on a Q&A site, therefore even if you put a lot of love into your answer, some questions work better than others.
Good point @hakre
Anyone know/remember the link for that Robert Martin Clean Code talk where he discusses making easily extendable clean code. In the example I think he's making a Java Parser
Found it:
09:07
Oooooh, vimeo finally on html5 =D
hi, @salathe
user652649
is there some hacker that wants to make a test with pdo + mysql? xD i may have found something weird / bug / not documented with pdo mysql. in short i thought that PDO::MYSQL_ATTR_USE_BUFFERED_QUERY would buffer the whole recordset in memory, but checking the memory_get_usage() it seems to buffer just the first record (cc: @DaveRandom [i know you like this kind of things {do you?}])
@Wes a buffer normally is only partial (if we talk about a bit more data).
I actually had only the other problem, PDO crashing consuming too much memory by not buffering the result:)
user652649
@hakre yes but it is advertised as alternative of fetchAll(), and $mysqli->store_result() stores the whole recordset. hence i'm saying the behavior looks weird
09:14
Yo @AlmaDo and @salathe
hi, @Fabien
09:53
> Oops! It looks like this commit was submit by <user> without attribution; performing git reset on the 378 most recent commits.
Ultimate fanboy t-shirt:
user image
4
@Ocramius Fan*boy*
?
@Jimbo you got a term for "fangirl"?
/me throws a girl at a fan
Androgyny is the new masculine.
@Wes Sounds like you are using libmysqlclient and not mysqlnd
mysqlnd uses zend memory management, memory_get_usage() only reports memory allocated via those mechanisms. libmysql manages its own memory allocations so it's memory usage is not reported
user652649
10:03
isnt mysqlnd bundled with php now? i'm using php 5.5
user652649
ah!
@Wes Look at your configure line (php -i/phpinfo())
user652649
Client API library version mysqlnd 5.0
Hmm, dunno then, that's kind of odd. How are you testing it?
user652649
is randomly a legit way to test? xD
10:08
:-P
What is your configure line, is it just --with-pdo-mysql or --with-pdo-mysql=<something>?
user652649
in short i thought that using a buffered query i was allowed to rewind a cursor $stmt->fetch(..., FETCH_FIRST_whatever) but even with that i can't (as opposed to mysqli's data_seek(0) wich works fine with buffered resultsets)
user652649
i'm on windows now @DaveRandom so config is --i-do-believe-in-random
Good morning all can anybody help me i am getting error Cannot pass parameter 3 by reference in line number 4 here is the code pastie.org/8659608
10:23
@Wes PHP code you are using to test plz?
user652649
1 sec
not much, on the train to Benelux
you?
still deciding if I should pick up the car
10:28
pick up the car? Context?
well, go to phpbnl :P
got speaker dinner tonight?
yup :-)
ic, so today is no-go - tomorrow likely social event (no-go as well)
no? why not?
well, can't hop in without a badge :P
10:32
hehehe :-)
@Wes Pretty sure the BUFFERED_QUERY attr should be passed to prepare() instead on set on the connection, it's a statement-level attribute I think
user652649
checking
hmmmmmmmm
arg, crappy internet is worse than no internet
4
user652649
@DaveRandom nope, it gets totally ignored if set on prepare(). i'm getting the same result on both true|false
10:42
on that note, closing laptop and enjoying the ride
user652649
@ircmaxell true :P
/me is glad to be back at work
[1:22:29 AM] Boris Momčilović: for someone who started two days ago - there's noone in the team who can match what you did
Boris Momčilović: but you're giving out sparks, and people are reacting - I hope that everyone pick up that vibe
:D
/me cracks whip ... back to work !!!
@JoeWatkins mediawiki? Got there in the end? :O
nah not mediawiki
> It's a cosmetic change that helps nobody—just like renaming other standard functions to make them more "organised".
wtf Derick
10:54
@DaveRandom what don't you like, calling it a cosmetic change, or the comparison with renaming other standard functions?
I don't like the implication that renaming (aliasing) the standard functions and generally organising things a bit more sensibly naming-wise "helps nobody"
The str_?.* functions being the prime example
@Wes You can execute the same prepared statement multiple times with different bound placeholders.
That's kind of the point of prepared statements.
I have messed up my permission settings on /var
Now I don't have access to it... anyone help me fix it?
I'm new to linux
@DaveRandom I'd probably want to castrate anyone who actually tries to fart around with making function names more "organised".
user652649
11:01
@MadaraUchiha with nextRowset() right? but that doesn't answer my question, because i can iterate over a single rowset at once
@Wes No, not with nextRowset
@salathe Why? If all that happens is aliasing, it won't be any kind of BC issue. What's wrong with getting people using a sane naming convention moving forwards?
MOrnig
user652649
@MadaraUchiha how?
prepare(:a :b)
bind(:a, value1)
bind(:b, value2)
execute()

bind(:a, value3)
bind(:b, value4)
execute()
pseudo-code ^
The same query gets executed twice, with different values in the placeholders.
11:02
@DaveRandom you think simple aliasing is enough?!..
user652649
yeah but then what will $stmt->fetchObject() return then? @MadaraUchiha
That's part of the original point of prepared statements, aside from squashing SQL injection.
@DaveRandom Where does that lovely little snippet hail from?
@salathe Why not? str_pos() => strpos(), both continue to work, what's the problem?
@Wes Well, after the first execute, the resultset from the first execution. After the second, the second resultset.
@DaveRandom why have two functions when one is plenty enough? unless you plan to deprecate strpos() at some point
^^ good plan.
@salathe PHP already has aliases for functions.
@MadaraUchiha OMG really?!
Why not utilize it in our favor and make the language more consistent?
11:05
</sarcasm>
lol
@DaveRandom got your test email
Just now :D
@MadaraUchiha apart from OCD tendencies, why make it more consistent?
user652649
$connection = new \PDO($dsn, $user, $pass);
$stmt = $connection->prepare("SELECT .... WHERE s LIKE :search");
$stmt->bindValue(":search", "r%");
$stmt->execute();
$stmt->bindValue(":search", "a%");
$stmt->execute();
while($r = $stmt->fetchObject())
echo $r->foo . "\n";

right @MadaraUchiha ?
why have functions? We have bitwise or with and ..
@salathe Because of the PHP hammer...
11:06
We have to go look in the manual and/or let our IDE help us with the function names/arguments/usage anyway, what's the big deal over a name?
@Wes You aren't using the results from the first execute though. Only the second
@DaveRandom I'd be tempted to respond with something like: "Y'know, I guess it doesn't matter what you call the function, cause chances are it'll conform to at least one of the several conflicting schemes that are randomly strewn about PHP like a messy room"
@salathe Eventually. It's been done before (mysql_numrows, socket_set_blocking, set_socket_blocking), I see no problem with doing it again. The old names can be move to a different section of the docs so they don't get in they way
user652649
@MadaraUchiha that's the point of my question :P read it again pls
Inconsistency is an unnecessary road block to new (and even old) devs, it's yet another thing to remember
user652649
@DaveRandom and you think "consistency" is going to help there? I beg, humbly, to utterly disagree.
@DanLugg Thing is, there is now a convention, all that's really being suggested is that we actually stick to it...
@salathe Do you keep a naming convention in your projects?
I bet you do. Why do you do that?
@salathe Help, not fix ;-)
@MadaraUchiha I respect the naming convention of projects I work with, sure.
11:10
@salathe Why's that?
I have no problem with writing new code that keeps to a strict convention, PHP core or otherwise.
(Note that everything you say can and will be used against you in the court of room 11)
@salathe It is a minor and entirely cosmetic change, but it doesn't seem (to me) to have any negatives and it does have some positives. I've not seen a decent argument against it that doesn't amount to "we fear change".
I do have a problem with the wholesale renaming of thousands of functions embedded in our muscle memory.
@salathe Not renaming, but aliasing.
11:10
I could use that memory for other things, like where I put my keys.
The old names would still work, and new people get to enjoy consistency.
I also think simply renaming/aliasing is only doing a half-assed job.
lol @DaveRandom
@salathe What would be a full-assed job then?
@MadaraUchiha That was supposed to point to yours :-P
If you're aiming for consistency, go all out and make the whole API consistent (e.g. argument names, argument ordering, return values, exception thowing, etc.)
11:11
@DaveRandom Yeah, I figured :D
Now that, I would get behind. :)
@salathe Argument names have very little meaning since @NikiC won't push his RFC through :P
@salathe OK yeh, that's a fair comment
@salathe I fullheartedly agree.
@MadaraUchiha ahh boo hoo @NikiC won't do something
11:12
lol
@salathe It's not that he wouldn't do something
user652649
@MadaraUchiha y u so friendly to me? i'm an ass xD aand, don't want bounties, just answers xD
@MadaraUchiha Was it you who said the other day about having to poop when you get out of the shower?
user652649
in fact the only reason to get rep on SO, is starting bounties
I offered him my help, I offered him a workforce of 2-3 other people to help him rename the very argument names you were referring to in your last comment, and yet he declined.
11:13
Either way, you know where I'm coming from... consistency is nice but mere renaming/alaising isn't going to make "the language" consistent.
So yeah, I get to be disappointed since that's the single feature I'm missing in PHP at this moment :D
@salathe Well, you can't change the entire language at once.
Unless you plan on publishing PHP6.
@MadaraUchiha sure you can!
@MadaraUchiha exactly.
Great. But I want to see it happening before I hit 70 :D
@MadaraUchiha go for it :)
@salathe Pfft, my C is like my Chinese.
I don't speak Chinese. I know Ni-hao and Shi, but that's about it :D
11:15
@MadaraUchiha that's okay, we'll use HHVM and write all the core code in PHP :D
@salathe Now that, I'll get behind. :D
i thought HHVM was slower than php
lol
*tumbleweed*
\chases tumbleweed
user652649
@DaveRandom bam! epic answer :P thanks
11:25
@Wes Yeh sorry I totally wasn't paying attention to the question at first :-P
@Ocramius where to buy? :D
somewhere in china
how to compress html in php ?
@TheBeacon you don't need that
@Wes yes, it can look weird but only until we understood what we were doing :) I found my solution then as well within the day, so no biggie actually.
user652649
11:31
@DaveRandom awesome, so the point is 1 prepared statement = 1 cursor, you should add also this alternative pastebin.com/dLb1wuPc to your answer, you know, for the benefit of future readers :P thank you
@Wes That's not guaranteed to work (it may with MySQL dependent on versions but there are certainly drivers it won't work with).
user652649
ah! good to know... not really interested in portability, but learning is cool xD thanks again
user652649
@hakre i'm starting to think i should just ignore that param... xD
I have a table with a column foreignid which contains values from 1 - 10. Is there some sane / fast way to query the thing getting the percentiles per value ? So if there are 10 rows and of those 10 rows 5 times foreignid was 6, 6 would be 50% and perhaps 4 30% etc?
@PeeHaa total or per each value?
11:45
@PeeHaa "fast" in which sense? SQL?
@PeeHaa one word: denormalize
hey all
How can we redirect to a system error page in Joomla on encountering the 500 internal server error
?
Am I supposed to put add the constructor method in the interface if I inject things into the object through the constructor?
12:01
I stand corrected, no, you usually don't.
The interface is there to define a uniform external API for the objects which implement it.
It doesn't care how the object implementing it would do it.
Thanks
@Patrick constructors in interfaces are a very bad idea ;)
array iterator_to_array ( Traversable $iterator [, bool $use_keys = true ] ) -- does anyone else see something misaligned here?
I wasn't sure if the uniform external API also includes object initialization. But makes sense to keep them out. If things change you need to switch the object initialization anyways to the new one
iterator_to_array traversable_to_array
@Patrick The constructor isn't (read: shouldn't be) part of the API because that's an implementation detail. Think of the API as a contract that exists both before and after an implementing object exists; it's constructor/destructor shouldn't have bearing on it.
It doesn't matter when or how they come into existence, only that they do, and that they behave in such a way while they're around.
12:15
@PeeHaa sqlfiddle.com/#!2/58fc6b/1 although the sanity/speed of that is debatable (uses COUNT(*) for a start)
@Padyster well fix that error o_O /?
@PeeHaa as like this? sqlfiddle.com/#!2/4dec2/2/0
12:38
Blarg.
Hi I am Using PHP sdk for uploading video on a facbook page
but when i log in i get this error
App Not Setup: The developers of this app have not set up this app properly for Facebook Login.
Can anyone help me with this?
@user2936213 Where do you login ? Also, is the app correctly configured ?
yes i have made an app on developers site
and i tried logging in from my localhost and server also
but getting same error
Have you checked Facebook developer docs on how to use Facebook login? If you've already set your app up it isn't configured correctly.
Yeah i checked but m not getting this error
Please help
12:48
actually my requirement is to display a 500 error page on 500 internal server error @HamZa
@user2936213 I think you should specify the URL where you're hosting your app. So, it shouldn't work on localhost
i did that also
@Padyster 500 internal server error is mostly because your server isn't configured correctly.
@user2936213 ok, I think I can't help you further. It's mostly just a matter of debugging
@DaveRandom Does not count(`column`) perform faster than count(*)?
Ok i did it
Its solved now
thanks :)
12:52
@user2936213 how did you solve it ?
i just changed the url in app settings
@user2936213 lol ok
thx
one more thing its not working for any other user
@Leri in very specific cases. Normally, difference will be minimal (see this sample )
only i can login
else everyone get the same error
why so?
12:56
Probably for the same reason it wasn't working for you in the first place: you didn't have it configured correctly
@user2936213 Maybe because you need to "publish" the app or something like that ? I won't be surprised if that's the case ...
this is the link
please check it
for example you can't just put an app on the appstore just because you have a developer account
@Padyster Some google-fu led me to wiki.dreamhost.com/Custom_error_pages
http://pastie.org/8660188
curl returns boolean value in result. why?
@HamZa try logging in with that link you will get the error
12:58
@AlmaDo For large data it does. Changing count(*) to count(`id`) reduced execution time several times. That was my first or second project. I had to normalize huge amount of data.
@D_Vaibhav Seems like some of the code surrounding that curl_exec is probably relevant
@user2936213 dude, sorry but I ain't logging in. Also, I think I've blocked all apps on my facebook. I see it as a threat to my privacy and security
user652649
@Leri index matters
As if FB knowing everything isn't enough ...

« first day (1195 days earlier)      last day (3979 days later) »