« first day (1030 days earlier)      last day (3934 days later) » 

12:09 PM
Good morning
@ఠ_ఠ The author of that article either needs something pdo doesn't provide (unlikely) or the author likes a horrible API
 
:D
i like it (PDO)
I'm going to use phphass @PeeHaa
 
people that use half naked celeb chicks as their avatars …
 
@ఠ_ఠ For password hashing?
 
yes.good ? or any better one ? i'm using php 5.4
 
@ఠ_ఠ Use @ircmaxell's native password API compat lib
 
12:16 PM
morning fellow wizards of the computering world ...
 
Howdy mr Watkins
 
Howdy PeeHaa
 
Today is kiss day?
 
lol
 
@DarkHorse Today is Play in the Sand day
 
12:17 PM
@DarkHorse I haven't seen @Gordon reporting it is so no
 
Making love not war! Then spread AIDs ...
 
International Kissing Day was on July, 6
 
kiss as in exchange of saliva or kiss as in keep it simple stupid ?
 
I totally read that as salvia :P
@ఠ_ఠ Yes that
 
12:18 PM
@PeeHaa you're dutch, so drug references are to be expected
 
:P
 
LOL ^
 
it's 5.5
 
There is an international women's day, why isn't there a international men's day
 
12:19 PM
@ఠ_ఠ What is?
 
ah man I'd be so good at being dutch ... damn you geography ...
 
php version
 
@Telkitty猫咪咪 That's the rest of the year
 
xD
 
@ఠ_ఠ The native APi is. @ircmaxell's compat lib is the same implementation in userland for 5.3.7+
 
12:19 PM
 
I remember today is valentine's day in china
 
casual sexism ... brilliant ... dancing on the glass ceiling we are ...
 
@JoeWatkins :D
FWIW salvia is no fun (so I have heard ;) )
 
if you are starting a new project,i would recommend you to switch to PDO or mysqli @ఠ_ఠ
 
which street drugs are derivatives of that family of plant ??
 
PLB
12:21 PM
Morning
 
@JoeWatkins None I think.
@PLB mornig
 
I'm using PDO since 2010 @KeeleriAchu
 
@JoeWatkins none afaik. you just smoke it. See en.wikipedia.org/wiki/Salvia_divinorum
 
@PLB good eve
 
oh wow, yeah, bless you wikipedia ... won't be long before it's on every list going I expect ... if someone had offered me diviners sage I'd have bought a ruddy wheel barrow of it ...
 
12:22 PM
In fact I want to say good night @PLB
 
@PLB moin
 
PLB
Well, in fact, it's evening here but I always thought that here's always morning. :)
 
std::internet_etiquette
these plants that do this sort of thing ... they didn't evolve for us ... is it reasonable therefore to assume that somewhere out there there are forms we consider lower than ourselves that have a similar outlook of reality ... interesting thought ... probably not, probably affects them completely differently but all the same ... a bug reading a book would be pretty cool to watch ...
 
for the sake of argument, it's morning here . morning ...@PLB
 
PLB
I want to kill a task but task manager not responding. LOL.
 
12:27 PM
I've never found a good reason to use PDO :/
 
put down the power button
 
@SweetieBelle what do you use instead?
 
Google analytics' UI confuses the hell out of me :(
 
@zerkms If I'm forced to use MySQL I use mysqli
 
@PLB taskkill /IM taskmgr.exe
 
12:28 PM
@SweetieBelle so there is no a good reason to prefer PDO over mysqli
 
@zerkms Unless it's something performance sensitive, then I use mysql
 
it's just a matter of preference
mysql_ as a more performant solution? Are you serious?
 
@SweetieBelle prepare('why would ? prefer ?'); bind_param('ss', 'you', 'mysqli')?
 
@PLB swap /IM for /F to forcefully kill taskmgr ...
 
Not having named parameters is just stupid when dealing with "larger" queries
 
12:29 PM
@LightningDust you know it's really offensive to everyone when you talk about using mysql_* ...
 
@PeeHaa Because from my benchmarks it's a lot faster
 
PLB
@JoeWatkins Yeah, that's only way. But task manager should not be freezing. I am not doing nothing heavy right now. :(
 
@SweetieBelle how can it be?
 
@JoeWatkins That's a shame, when mysql_ isn't 10-100x faster than PDO I'll stop using it. :/
 
@SweetieBelle How many queries do you run per request?
 
12:30 PM
@PLB wrong, you are running windows ...
 
@PeeHaa Usually 1
 
the sql processing time + network overhead would eat any difference between using different DB clients
 
So instead of 0.00001 you spent 0.0001 seconds on the query?
 
so I'd bet you've just made your measurements wrong
 
@JoeWatkins mysql_ works unless you're incapable of sanitizing inputs, and if you're incapable of sanitizing inputs, please don't work with databases period.
 
12:31 PM
@LightningDust at least pay attention to documentation it will eventually be removed, get comfortable with mysqli or you will find yourself in deep shit sometime in the future when you have no way of communicating with sql anymore ...
 
@SweetieBelle it works. Aaaaaand it's gone in the next major release :P
 
@JoeWatkins When it's removed, it will become an external library and I will install it as an extension. So will every hosting company everywhere, because there are a lot of people still using it. :P
 
There is a reason it is going to be obsolete
 
don't be naieve, it will take weeks for it to become unmaintained and months to be a security risk ...
 
@SweetieBelle No. Hosters really aren't going to install the pecl ext
 
12:32 PM
@JoeWatkins Major companies are still using it. Why do you think it would become unmaintained?
 
@PeeHaa he is trolling us
 
@PeeHaa If you think hosts are going to turn away business because people are using old database connectors, you're likely to be shocked.
 
@SweetieBelle Major companies are most certainly not using it any longer, so what do you state here?
 
@SweetieBelle right....
 
What % of PHP developers still use mysql_?
 
12:33 PM
DON'T FEED A TROLL
 
@SweetieBelle 100% of the uneducated
 
@SweetieBelle Professionals? not many
 
@zerkms I'm 100% serious.
There's a lot of good PHP developers still using mysql_, even if just on legacy projects.
 
PLB
@SweetieBelle Only those who maintain old projects I guess.
 
@LightningDust it's not maintained by any of those companies, APC is or has been used by every website you want to mention no doubt, yet with the integration of opcache it became pretty much abandoned pretty much immediately ...
 
12:34 PM
@SweetieBelle you either have no idea what you're talking about or trolling
 
@PLB Exactly
 
in either case it doesn't worth feeding you
 
@SweetieBelle Quesiton is not what others do, question is what you do.
 
@zerkms you're not really constructive.
 
@zerkms If you're incapable of benchmarking and concluding that a wrapper to a C library is faster than a native library, you're probably not able to contribute to the discussion.
 
12:36 PM
@SweetieBelle now you're not really constructive either
 
@SweetieBelle can you provide the numbers?
 
@hakre I use Oracle. If I have to use MySQL I use mysqli, unless it's a legacy project in which case I use whatever it uses (usually mysql_).
 
and esitamate the difference between all PDO/mysql_ related overhead compared with network + sql processing overhead?
 
@zerkms 1000-10000% gap between mysql_ and PDO
 
who is @SweetieBelle dont see em ...
 
12:37 PM
Around 500% gap between mysql_ and mysqli
 
in the whole process timing
 
@SweetieBelle Well Oracle has stopped support for PHP mysql_* so if you come from oracle, better not use that. Instead use mysqlnd which is supported by Oracle.
 
that includes the network interaction and DBMS processing
 
@SweetieBelle uhhhm. Now benchmark prepared statements with raw queries
 
@SweetieBelle does that include the whole process (including sending query and fetching results)?
 
12:38 PM
@zerkms Yes, but for very small queries
 
are you sure?
 
For larger ones the gap will be smaller but I'm not interested in benchmarking SQL queries
I'm interested in benchmarking PHP extensions
 
could you provide the absolute numbers then
 
I can't make mysql faster.
 
for the whole process
 
12:39 PM
@SweetieBelle Well, you must have misunderstood something, the PHP mysql extension is a wrapper around the C library provided by Oracle.
Which btw. is outdated since ages.
 
@hakre That's why it's faster...
 
@SweetieBelle in average the fastest mysql query is performed in 10ms
 
@hakre That is just FUD and you know it. Everybody should just use mysql_* period.
 
"1000-10000% gap between mysql_ and PDO" -- this means that if it's true for mysql_, then PDO will take at least 100ms
is that correct?
 
@SweetieBelle It makes no sense to benchmark unsupported stuff. If you're concerned about speed, take cubrid.
 
12:40 PM
@SweetieBelle there is no difference in speed between mysql, pdo and mysqli.
> The overall performance of all three extensions is considered to be about the same. Although the performance of the extension contributes only a fraction of the total run time of a PHP web request. Often, the impact is as low as 0.1%.
 
I'll re run benchmarks later
It was a ridiculous gap
 
Go for it
The real bottleneck will always be a crap db design instead of the API
 
@SweetieBelle you might find a difference between the MySQL native driver (mysqlnd) and the old MySQL client server library (libmysqlclient) though. See dev.mysql.com/downloads/connector/php-mysqlnd
 
@PeeHaa do you mean that the time I spent switching from " to ' was just wasted?
and changing every $i++ to ++$i
 
@zerkms Ow no. Converting all double quotes to single quotes is just mandatory. Everybody who is serious knows that :D
 
12:44 PM
Hm, I still feel this question was incorrectly closed (yes, there's no code, but the solution is pretty hard to come up with): stackoverflow.com/questions/18136865/array-split-probability Thoughts?
 
Now I can go to bed with knowledge that my projects work fast especially by using the right quotes
 
we-love-php.blogspot.com/2012/07/mysql-or-mysqli-or-pdo.html These findings are nowhere near as extreme as mine, but still showing 500% gap between mysql and PDO.
 
:P
 
And same ~500% gap as I found between mysql and mysqli for less than 500 fetched results
 
@SweetieBelle could you point to that exact 5 times difference on that page?
 
12:45 PM
This is just in: static content loads 600% faster than parsed content.
 
oh I see now
 
Conclusion only use static content
:-)
 
@zerkms no it's always worth because you need a new keyboard faster which is good for the computer markets :D
 
@zerkms "PDO is 2-5 times slower than MySQL/MySQLi"
 
PLB
@Wrikken 1. OP has not tried anything. 2. AFAIK, this problem is already solved and respective algorithms can be found.
 
12:46 PM
@SweetieBelle you cannot say that
 
@Wrikken Reads like a 'canihaztehcodez' question to me. No effort from OP
 
@zerkms It's a quote from the page
 
that means that at that particular time dbms + network + php worked faster
 
Hehe, that static content might sound like a joke... but preprocessed content & some CDN push works wonders ;P
 
for some reason
@SweetieBelle that person cannot say that as well
if you need to test the driver - find a way to test only the time it consumes
 
12:47 PM
@SweetieBelle and chat.stackoverflow.com/transcript/message/11182480#11182480 is a quote from the Manual, so now you got quote against quote
 
without any 3rd party resources that you cannot guarantee to stay the same
 
Well, not tried anything... Not shown to try anything. If I have an algorithm that doesn't work I'd be loath to publish that too...
 
"Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results.
@Wrikken emphasize mine ^
 
@Wrikken The point of SO isn't to get someone to write an algo for you, it's to try what you know, then let others help you get the rest of the way
We're like Powerade, we don't run a race for you, we give you a boost so you can finish.
@Gordon Benchmarks don't lie :P
 
Ah yes, well, I'll stand down then... I'll just hope the OP gets some use from my comments :P
 
12:51 PM
They do, if you do them incorrectly
 
@SweetieBelle synthetic benchmarks are useless
 
those benchmarks test network stack + DBMS + php's function call
depending on configuration of former 2 items it may vary
 
@zerkms Feel free to write better ones.
 
@Wrikken You could always ask OP to improve the question and drop a reopen request in here and if it is warrented we are more than happy to reopen the thing
 
@SweetieBelle I don't need that - I know that the difference is negligible
and if someone thinks mysql_ worth using it because it's "faster" - it's their business
it's like another discussion on if to use $i++ or ++$i
tip: the latter is "faster" go change all your sources
 
PLB
12:54 PM
@zerkms I strongly disagree with this. It's community's business because worse projects are worse the community is (at least, considered to be).
 
@PLB no, the worse other closed projects are - the better for me
since I become more valuable
 
@zerkms Well, good luck to you. I hope you earn more than I do with my terrible projects. :)
 
BTW @SweetieBelle did you know that md5 is waaaaaaay faster than bcrypt?
 
@SweetieBelle I didn't call your projects terrible
 
@PeeHaa Yes, I also know that MD5 is way less secure than bcrypt.
 
12:56 PM
;)
 
@SweetieBelle and what I didn't want to do - is to compare by earnings
 
False analogy :P
 
Not really. mysql_* will also be less secure because maintenance will be stopped
 
@zerkms It's wrong to suggest that a project using a specific extension is automatically a 'worse' project. You can write secure code with mysql_ and you can write insecure code with mysql or PDO. It's just harder.
 
@SweetieBelle: You should really visit one of those technical talks by Oracle where the developers of the library are talking themselves.
 
12:57 PM
@PeeHaa If mysql_ stops being maintained, I will stop using it.
 
@SweetieBelle I didn't make such suggestion. Otherwise point me to the exact quote
 
@SweetieBelle Writing insecure code with mysqli or pdo really isn't harder
 
Just drop mysql_ even when you're using the native driver with it. the suggestion in the manual is written for a reason.
 
PLB
@zerkms How do you think why I earn more as .NET developer? Because most of projects are not crap and are really successful, so client thinks that project written on .NET framework is more reliable, so s/he pays more.
 
@zerkms You're right, PLB did.
 
PLB
12:58 PM
In fact, my php projects are more reliable, but php has bad reputation.
 
Hello guys, one question. When using prepared statements in style ('sssss', $var...), are date and time considered strings (s), or something else?
 
@hakre Maybe you don't have to support/maintain legacy code. I do. :(
 
@PLB " How do you think why I earn more as .NET developer" --- oh please
 
Totally unrelated @SweetieBelle. Do you have a github account?
 
@PLB would you next compare by p**is length?
 
12:59 PM
@PeeHaa No, I have a launchpad but there's nothing valuable on there. Most of what I work on is closed source.
 
ah k
 
@SweetieBelle I have as well ;)
@BikerJohn s is for strings.
 
Most of the professionals in here have to maintain some legacy puke sadly :(
 
Yes, at work we have some sites which are still running wheezing old code from 1990s and early 2000s.
 
@hakre okay, but are dates and time considered as string?
 
1:01 PM
@BikerJohn it depends
@BikerJohn for mysql query it's a string or a number
 
PLB
@SweetieBelle Well, I did not say anything about your projects. I am just saying that community should be worrying about bad projects.
 
@zerkms mysql query, yes.
 
@PeeHaa The last decade called, it want's to tell you that maintenance from MySQL's side of the fence stopped back then.
 
@BikerJohn mysql accept multiple formats that include both string and number representations of dates
 
@PLB I agree, I just don't think we should immediately assume that a project that uses mysql_ is a bad project, or that a project that uses PDO/mysqli is a good project.
 
1:02 PM
@salathe lol
 
@SweetieBelle it's not. The point is: mysql_ doesn't have a good arguments to be used for the new project
(unless you're limited by php4 only)
 
And saying so, you should not see any mysql_ unwrapped in legacy code.
 
PLB
@SweetieBelle I have seen lots of uses pdo/mysqli which are vulnerable to sql injection.
 
@zerkms thanks
 
@zerkms I haven't used mysql_ in any new projects for ~2 years. Given the choice I avoid MySQL altogether and use 11g.
 
PLB
1:04 PM
New projects that use mysql extension can be considered as bad with a simple reason: They will outdate when support of that extension will be stopped.
 
@PLB Same, I've seen some horrific use of PDO.
 
@SweetieBelle that's a good update :-)
 
@PLB SQL injection is less a question of the library but more of understanding by the person writing the code. This is similar with other common injection flaws.
 
@hakre Agreed, but mysql_ makes writing safe code harder than PDO or mysqli does as those have functions to protect you.
 
1:05 PM
actually, anyone who has some experience didn't use mysql_ naked
it was wrapped into a custom db class, which does have some kind of prepared statements
 
I used mysql_ naked…
 
@PLB I wouldn't automatically consider them bad, I would question why they chose mysql_ over an alternative (though personally, I constantly question why anyone uses MySQL (the database, not the driver) at all).
 
@salathe that's horrible :-)
 
@salathe We really don't want to know how you are dressed while coding :P
3
 
I used mysql_ naked as well. It's long ago... ;)
 
1:06 PM
@zerkms My co-workers weren't impressed.
 
lol
 
PLB
@SweetieBelle There's no valid reason to start new project that uses mysql extension.
 
I use PDO naked as well.
 
@Wrikken just in case you're interested, there is a more interesting version of that question here stackoverflow.com/questions/14316636/…
 
PLB
Because once it's completely deprecated project either dies or needs to be rewritten.
I expect this to happen really soon (6-12 months) and the project that lasts only 6-12 month is not really successful.
 
1:09 PM
@PLB When it's completely deprecated it will be put into an extension, and someone will maintain it (quite possibly a major company still dependent on it). I don't think an extension used by millions will just be left to die.
 
@SweetieBelle A major company, like Oracle? They're happy enough to let it die right now.
 
PLB
@SweetieBelle Yes, probably. But why you need to add another difficulty?
 
@salathe Why would Oracle maintain it? I doubt they're using it internally.
They probably don't use MySQL internally.
 
@SweetieBelle The project already has been abandoned for some time now. What makes you think suddenly people will pick it up now?
 
@SweetieBelle Why would Oracle maintain MySQL code... hmmm...
 
1:12 PM
@Danack: thanks, I'll see if it matches op a little
 
@salathe Why would Oracle maintain a deprecated MySQL extension for an external programming language?
 
@SweetieBelle Yes, why would they?
 
I don't know, you seem to be suggesting that they should. I don't think Oracle care about that extension, why would they?
 
It's their extension.
 
It's not the one they advise you to use.
 
1:14 PM
My point exactly
 
That doesn't mean nobody has a vested interest in maintaining the extension, does it?
 
3 mins ago, by PeeHaa
@SweetieBelle The project already has been abandoned for some time now. What makes you think suddenly people will pick it up now?
 
Not directly
My point is, nobody has a vested interest in maintaining the extension.
If someone had, they'd have stepped up years and years ago.
 
Something about beating something like a horse of some kind
 
@salathe Isn't it just a wrapper around the mysql C API (libmysqlclient -- which is still maintained)?
 
1:21 PM
@SweetieBelle depends whether you're using mysqlnd or not
 
@salathe Using libmysql, I don't think I've ever used mysqlnd.
 
it would be very nice, if some one help me to find a good ORM for pure php
i am looking for the best :)
 
@salathe Unless mysqlnd is default now
 
@LightningDust Erm - you really ought to use mysqlnd - there is a horrible 'use ALL the memory bug' in libmysql stackoverflow.com/questions/11915415/…
 
1:24 PM
@SweetieBelle again, that depends on how you install(ed) PHP
 
@PeeHaa self duplicator, link found. one hour on sunday took too long for him so he felt it's time for repost.
 
:P
 
@salathe php5 from Debian apt repo on Wheezy (sid on dev machine)
 
@SweetieBelle In that case, I don't know what the "default" is. For PHP's default, see php.net/migration54.extensions-other
You could check by looking at the configure line I guess.
 
1:27 PM
@SweetieBelle The defaults depend on version - php.net/manual/en/mysqlnd.install.php
Aka all the more reason to upgrade to at least 5.4
 
@Danack I know my dev environment is 5.4
Just checked, production server is 5.4 as well
 
PLB
@KeeleriAchu Use of undefined constant best...
 
@salathe Any way to tell from command line or from phpinfo() spew?
@salathe PHP 5.4.4-14+deb7u3 (cli) (built: Jul 17 2013 14:54:08)
 
@SweetieBelle php -i | grep "Client API version " should telll you which mysql lib you are using
& php5-mysqlnd is in the debian repo's, BUT does not 'provide' php5-mysql last time I checked... And could be a dependancy hell if other packages depend on that.
 
Client API version => 5.5.31
MYSQL_LIBS => -L/usr/lib -lmysqlclient_r
 
1:36 PM
That would not be mysqlnd (it mentions mysqlnd specifically AFAIK when installed)
 
@PLB !!!
 
So is mysqlnd still supported then or?
 
@SweetieBelle: it's not in that setup
 
The following packages will be REMOVED:
  php5-mysql
The following NEW packages will be installed:
  php5-mysqlnd
Yeah, wasn't nd
Thanks @Wrikken
 
How widely is imagick supported by popular hosts? Is it safe to dev for it?
 
1:40 PM
@StefanDenchev Touch and go.
@KeeleriAchu There is no such thing as a best ORM. Use the one that suits your needs.
 
Hm, last time I used hosting plans instead of VPS it was about 50% imagick supported indeed, but that's a little while ago.
 
Hmm... Is is usually difficult to convince a host to include support? Haven't had many run-ins with hosts, really...
i set it up recently on a private server and 'twas fairly simple, i suppose...
 
Well, most decent hosts would't have any problems installing it. Pricefighters may be difficult though.
 
fingers crossed, then ^_^
 
La La La
 
PLB
1:55 PM
@Tredged Hi. How are you doing?
 
@PLB I'm fine, relaxing how about u ?
 
PLB
@Tredged Working.
 
Sundays? No rest, huh :P...
 
@PLB Aw :(
 
PLB
@StefanDenchev Side project(s).
 
2:01 PM
Yeah, i've been coding something the whole weekend (read: "pretending to do it while completely ignoring it") as well...
 
@StefanDenchev Me too :D
@StefanDenchev Been 'coding' all weekend, got less than 1 KLOC :(
 
Working on it right now (not)...
lol
 
@PLB Hows the weather there?
 
some love here plz :)
 
PLB
@Tredged sunny and hot
 
2:06 PM
1
Q: PHPPowerpoint : Grid Lines + Custom Chart Line Colors + Label Y-axis

asprinI'm using the following code to create a chart with the PHP Powerpoint library. $currentSlide = createTemplatedSlide($objPHPPowerPoint); $seriesData = array('ABC'=>97,'BCD'=>97,'CDE'=>97,'DEF'=>97,'EFG'=>97,'FGH'=>97); $lineChart = new PHPPowerPoint_Shape_Chart_Type_Line(); $series = new PHPPowe...

 
PLB
And of course, I am sitting at home. :D
 
@NokImchen Hello
 
Chart? Why not Excel?
 
i have a string of binary numbers like "101000100110...n", i want to save it in binary format i.e. save not in 1's and 0's but in the decimal format. However, converting it to base 256 will take too much time. So , is there any way to save it fast?
 
PLB
How about Netherlands?
 
2:08 PM
@StefanDenchev Need to be powerpoint presentation - that's the requirement
 
@l0oky hi :) i just woke up , slept after lunch :)
 
@NokImchen xD
 
@l0oky i have found a new algo, was trying that algo. Will work on arithmetic coding later :)
 
@NokImchen Is that code from c++ I converted useful to you?
 
of course, but i cant trun :D still error :P
i'll fix the bug later 2nit :)
 
2:11 PM
@NokImchen Ill try fixing it too
I shouldn't give you the script with errors but since you were waiting for it I gave it to you
 
ah, thanks a lot man :)
i'm working on another algo, so i cant fix it now...
@l0oky ah, no prob at all.. :)
 
@NokImchen What algorithm
 
@l0oky compress any file :) like compress even the zip, mpeg, tar, jeg, mp3 files. A losseless compression algo :)
 
@StefanDenchev yes, ? oh! thanks for the link :)
 
2:14 PM
It's a link :P
 
@StefanDenchev heheh sorry, i though u calling my name! sorry, my slow brain :(
@StefanDenchev the answers says Disclaimer: this code just illustrates how pack should be called; it should not be used for large strings. well, my string is more than 10k in length. So, i need another method :(
 
@NokImchen How long are you going to depend on another methods? why wont you make your self one
 
@l0oky i'm making myself. Not depending on anyone's algo :)
 
okay.
 
@l0oky :)
 
2:22 PM
@PLB Damn here it sucks like always :( only rain ..
 
PLB
@Tredged It was rainy here as well one week ago.
 
@PLB ah ok
 
2:45 PM
can't tell if this is trolling or something...
0
Q: imagecreatefromjpeg crashes on Canon Powershot images

Marcel VerweyI have a upload function which is working fine. However on some images the imagecreatefromjpeg function crashes without giving any error. After some troubleshooting I found out that this only occurs when uploading photo's that are taken with my Canon Powershot camera. There are other people with ...

 
"There are other people with the same problem, but I couldn't find a solution so far." :P
 

« first day (1030 days earlier)      last day (3934 days later) »