« first day (215 days earlier)      last day (4747 days later) » 

12:36 AM
@Zirak I love all of the April Fools jokes
PHP reminds me of Python and Python is awesome: xkcd.com/353
 
whoa, how'd you put it inline?
 
just copy-paste the url
this chat is terribly smart guy
 
I posted the url above? It didn't pop up inline.
 
direct url to the image
 
12:50 AM
ah. of course
 
it also can parse links to SE posts, wikipedia
probably to twitter
Holy shit http://www.waspknife.com/about.php
yep, also twitter
 
Amazon as well
 
yep, with some referrals things injected, iirc
 
Sure
 
do they (referrals) make sense for buyers?
or it is some profit to jeff & co?
 
12:56 AM
profit for them
 
Howdy everyone !
i am wondring how can I check the caller function name
I mean to see which function has called a function
@ircmaxell got anything for me ?
 
don't
 
you think such a thing exists ?
or just give an extra argument everytime I call the function ?
 
debug_backtrace, but 99.9% of the time it's the wrong tool to use...
 
 
4 hours later…
5:41 AM
hi
 
hello @dskanth
Good morning
ANY MAGENTO DEV?
 
6:02 AM
pretty good.
 
@KevinYang... pretty good what?
 
morning - guys , gals and everyone in between
 
@teresko Morning :)
why there is silence?
 
6:18 AM
people are still sleeping
 
Well its 12 of noon here
?
@teresko can you solved out my problem..related with magento
 
6:36 AM
highly doubt it
besides , i'm kinda busy .. the Yii hates me
.. well .. its mutual
 
oh :D ok
leave
will try to find another source :)
 
7:12 AM
hello
 
7:33 AM
.. way too much magic in yii
 
7:59 AM
posted on May 19, 2011 by Liip

Earlier this year one of my colleagues told me during the daily scrum that he plans to attend the PHP conference PHPDay in Verona, Italy. I thought that was an excellent idea and bought a ticket the same day. It turned out that at the same time and place also the JSDay would take place, the first Javascript conference in Italy ever. That was just perfect since so far I was always a little scare

 
Tan
8:42 AM
Hi all. I need help with a regular expressen. I want numbers and the symbol - or +.
i tried with this @"[0-9]+(\.[0-9][0-9]?)?"
but iwht this i will only get numbers. how do i add to get the - or + before the numbers
 
8:54 AM
you have to escape the + and - , as \+
 
Tan
Thanks for help it worked
 
9:09 AM
Hello all
 
9:40 AM
hey all
 
 
1 hour later…
10:52 AM
hi
 
hello
 
11:14 AM
wow, the android room is crazy !
 
11:38 AM
anyone with CodeIgniter experts?
 
Discussion for all things PHP - Don't ask whether someone is here or can help. Just ask us. If anybody can and wants to help, they will. But no can know before you ?actually asked your question.
You should just post it. Someone will help if they can
 
11:56 AM
Hi, i want to upload images,and resize them when want to show them in the image gallery slide show,i tried to use imgsize.php and imageresize.php which i found trough net but not working for me(not giving any error but not displaying images too),please suggest any other class.
 
@ketaki Use something like timthumb : code.google.com/p/timthumb to resize on the fly
 
@John P....thanks wl chk it
 
hmm...should I spend the next hours documenting my classes, or use that time to write useless html?
 
posted on May 19, 2011

Here's what was popular in the PHP community one year ago today:PHPFreak.dk: Review: NetBeans 6.9 Beta for PHP Test.icial.ly Blog: Why are interfaces widely ignored in the PHP world... DealTaker Blog: PHP & MongoDB Sitting in a Tree: Part 1 The Register: Exam board deletes C and PHP from CompSci A-levels Raphael Stolt's Blog: Installing the PHP redis extension on Mac OS X Phil Sturgeon's Blog:

 
12:11 PM
Morning
 
@ircmaxell good evening
 
how goes it?
 
@Ket
@Ketaki, try miagick or gd?
jees, *imageick
 
same old, same old. Closing time in a bit here
 
@ircmaxell g'morning
 
12:22 PM
sup
 
Creating GUI instead of doing real work. Damn GUI
You?
 
1:01 PM
posted on May 19, 2011 by PHP Classes

Top 10 Reasons Why Firefox is still Better than Chrome for Web Development By Manuel Lemos Sometime ago many of us, Web developers, have switched from using Firefox to Google Chrome because of important features like speed. Now that Firefox 4 was launched it addressed some of the issues we had with past versions, thus making it better at least for Web development. This article explains

 
1:51 PM
hey @irc gud evening
@john gud evenin
 
@Edvin - This ain't IRC
 
@zirak gud morning
 
And good evening to you too.
 
@christ irc for max
 
@Edvin - Aha, got me on that.
 
1:52 PM
anyone tell me how to give read more link in wp blog recent list
 
Anyhow, seems we're the only two.
Eh?
 
oh nooooo
 
"give" to who?
 
hey in wordpress blog
 
Styling sucks. Why can't users be pleased with scrolls?
 
2:07 PM
posted on May 19, 2011

Ralph Schindler has a new post to his blog describing some of the what he's done to understand dependency injection in PHP and includes some illustrations to share that information. Whatever the reason, one of the newest concepts (at least over the past 3 years or so) that has emerged as one of our heated topics of debate is how to manage object dependencies. Interestingly, the argument of

 
hey guys , it's the Judgment day ( 2011.05.21 ) : ebiblefellowship.com/outreach/tracts/may21
 
Isn't that next year? Or 11 years ago?
 
2:43 PM
posted on May 19, 2011

In a new post to his blog Johannes Schluter suggests an alternative to using prepared statements in PHP applications using a database - creating a handler method that allows for dynamic queries as well as proper escaping of values. Now prepared statements were a nice invention some 30 years ago abut they weren't meant for making things secure and so they do have some shortcomings: One issue

 
3:20 PM
posted on May 19, 2011

Web Developer Juice has posted the second part of their series looking at some of the "magic functions" that PHP has to offer - special functions that do automagic things in your scripts and classes. Part one can be found here. In my previous post ( PHP Magic Functions ), I discussed about __construct, __destruct, __call and __callStatic. Lets explore a few more magic functions... In this

 
3:37 PM
wow, I have half a mind to flag that last article as offensive
what a pile
 
4:02 PM
> Enjoy the magical PHP and happy coding …
 
um, why are you using offensive chat flags on that?
 
@RebeccaChernoff some kind of "boycotting" of that article.
 
so don't click on it.
 
I'm offended by the article's usage of the language :P
 
I don't see the motive to flag it as offensive here, in chat.
 
4:04 PM
sorry, never again
 
It's just general "misuse" because it's "amusing". I don't think they value the severity of the chat flagging.
So don't do it again guys ;)
 
I kinda see it as telling the author there's a typo, but telling them here, rather than actually commenting on the article.
 
I think there disagreeing with the authors opinion about PHP.
 
Yes, I gathered that. Which is why I used the analogy ^^^.
 
I'd hardly call his usage an opinion of php
 
4:07 PM
@KevinPeno what's actually wrong with the article? I'm just making assumptions
 
The examples on how to use the magic methods are exactly why you shouldn't be using them.
look at the invoke example. I mean seriously, he couldn't think of a worse reason here could he?
> Enjoy the magical PHP and happy coding …
lol
 
I dont know PHp well enough ;)
invoke is cool where its useful
When you make a thin wrapper or a facade
or a singleton
I can imagine invoke being cool for a singleton
 
sure
 
posted on May 19, 2011

Artur Graniszewski has written up a comparison of the performance of a standard Durpal 7 installation using HipHop versus APC to handle the optimization of the application. There have been many suggestions on improving Drupal performance, some of them recommend the use of APC module, data caching, or even compilation of the entire system through HipHop for PHP. While the first two solutions

 
anyway, I guess my point is that the writer could (and should have) found a better example. If the reasoning behind the example was to remain simplistic for the audience, he failed to explain what was happening in the first place (which would have been much more beneficial)
His example would be better suited with an object that implements ArrayAccess and/or Iterator
 
4:17 PM
@KevinPeno to show off __invoke?
 
awww, default values can't be function calls: codepad.viper-7.com/pZMfV7
 
@salathe, how is showing it off in that manner good for anyone? It lacks detail on what __invoke does, or should do. Some SOB is going to look at that and use it.
 
@KevinPeno I never said it was good for anyone... did I?
 
@salathe, by responding to my post I expected that you were defending it just to "show off __invoke".
 
@KevinPeno my point was more along the lines of "His example would be better suited with an object that implements ArrayAccess and/or Iterator" makes no sense when he's demonstrating __invoke() ... I guess I should be less concise.
it's just a usage example, probably more just to show the syntax than anything with utility... I hope.
 
4:24 PM
probably
but I addressed that in the comment before the one you replied to. If he had used it as a demonstration (clearly defining it as such) and went on to explain __invoke, when you should use it, why it exists, etc., I probably wouldn't be so up in arms
Seems to me the article was just written to be written, poorly.
 
((sorry for offtopic, but this is just awesome: ho-lo.co.il/archives/587))
 
@KevinPeno that's often the case, write an angry comment or blog post about it :)
 
@salathe, I'd rather just vent here. Like I did. I can hush though :P
@Zirak, lol
 
@KevinPeno go wild :)
 
4:29 PM
@KevinPeno thats a solid implementation
 
for sure. Just thought it was funny you even posted it
 
@KevinPeno Questions like these make me die inside...jQuery already does everything for you, and people want shorter.
 
4:55 PM
@Zirak, lol yeah
 
@Zirak hehe
funny q:
0
Q: User identifiable info online

santaWhat is the info available online to identify a user. I looked at PHP and started a list: IP ($_SERVER['REMOTE_ADDR']) Browser ($_SERVER['HTTP_USER_AGENT']) Browser Language (?) what else?

 
5:29 PM
Hey. so I had a quick question about SO in general. How does it sort the display of answers given on a question?
I figured it'd sorted by time, but There was an instance where a dude posted a question AFTER me by a few minutes or so, and his was shown above mine.
 
its ordered by acceptance, number of votes, and randomly in a tie
 
Gotchya. so it sucks to be new to stackoverflow, eh? :P
 
not number of votes, number of up votes*
@Foxtrot how so? Your reputation has nothing to do with the sort order
 
up votes given to the responder cumulatively or on that answer?
 
within the context of the current question
so, example: #1 (accepted, +2), #2 (+2), #3 (+2). In this case #2 and #3 will be randomly ordered on each page view, but #1 will always be on top.
 
5:34 PM
Hmm, ok. Just find it frustrating when I answer a question and it ends up getting ignored completely, even though i have the right answer.
 
Well, it happens. Just strive to have the better "right" answer :P
cite references, give examples, preach best practice, etc.
 
eh, I guess it's whatever.
Also, what makes a question pop up on the back of the main page? I asked a question yesterday evening and only received one response. What action will bump it back up?
 
0
A: error in user registration form using php

NealPHP is case sensitive. Fix it to: if (isset($_POST['submit'])) { $user = new user(); ... Also make sure that PHP erros are on when you are checking the code, because your current implementation should have thrown an error at that line

funny Q
@Foxtrot any recent action usually bumps it (like an edit or a new answer etc)
 
Okie doke.
 
@Neal, vc that thing
 
5:45 PM
@KevinPeno ?? why
 
too localized
class definition in the middle of html output is hilarious though
 
@KevinPeno why is that localized?
its a valid q
 
> i'm trying to do the following but i have this error
> it doesn't store in the my DB
that's a valid qustion? lol
 
@KevinPeno yes.
 
i agree with the class declaration. bad form
 
5:48 PM
its bad form, but not localized
others can make the same mistake
 
I split them into files and use an autoloader.
 
@Foxtrot ??
 
my classes. each class is put into a file named after the class. then i have an autoload include that file once the class is instantiated the first time
 
its a question to fix a bug in his crappy code and it doesn't give any indication on what is actually wrong. :P
 
@KevinPeno the OP doesnt even know, hence the question lol
 
5:50 PM
@Neal, Then move it to code review? lol
 
@KevinPeno what is any question on SO, but a user who doesnt know what is wrong with his/her code
 
@Neal, Unless it is a specific programming problem, it's not SO worthy :P
Specific: "I'm using an Interator, but I'm never getting result X. What am I doing wrong?"
Not Specific: "I get and error, here is my code"
"I get and error, here is my code" also falls under too localized, because it is unlikely that anyone will find use of it
 
My favorite is "I don't know how to do something. I haven't even tried. I have no work in progress code, what is the answer to do what i want?"
 
posted on May 19, 2011

In a a new tutorial posted on his blog Martin Sik shows you how to "steal" the "did you mean..." functionality that Google's sites currently offer. His example uses cURL to get the current Google request URLs and fetch the associated results. I really like Google and the classic "did you mean" feature is really great, unfortunately when I wanted to implement it into my project a realized th

 
How do you guys usually handle error events in API calls, especially in situations where multiple errors might occur. I tend to use base-2 numbering, then at the viewer layer, i test each possible/expected error with bitwise tests, e.g, if (8 & data.errorSum) { $("#errorBlock").append("<li>Password too short</li>"); }
 
6:10 PM
@Foxtrot thats not php lol
 
My example isn't PHP, no. but, it can be PHP.
it's a procedural question, more of an actual coding issue.
 
6:50 PM
debug3: packet_send2: adding 64 (len 57 padlen 7 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: password,keyboard-interactive
Permission denied, please try again.
anyone know why I would get that on ubuntu when creating new user?
and trying to log in as user
 
@JohnMerlino there are IRC channels which will help you with this
this is place for php
 
7:48 PM
WAKE UP PPLZ!
 
8:16 PM
anyone here?
 
@Neal wah wah
 
hi @neal
 
thanks @Raynos
hi @Michael
 
HI @Neal!!!
 
@KevinPeno hihi
 
8:21 PM
I created a kind of nice help system today at work
There are question mark icons all over the application and when you click one, a popup appears explaining the particular field.
 
yay u :-P
 
Yeah
 
Noooo, just realised: Gonna lose a bet tomorrow. QQ
 
It's easy to add new icons too because all you have to do is edit this one function to include the help text.
@Zirak What did you bet on?
You have to be careful about betting because if you lose, then you lose money.
I have a bag full of change that I need to take to the grocery store to cash in.
 
I made a bet with a friend of mine that I'd manage to create a decent blog system in 3 weeks. That was Friday 3 weeks ago, and I've been lazy and did other stuff.
 
8:27 PM
crank it out!
 
lol
 
what's the criteria for "decent"? lol
 
You only have one day, that's not a lot of time to create a blog system.
 
@KevinPeno Usable
 
define usable
 
8:28 PM
@Michael Frankly, I did 70% which is really nothing at all. Just need to set up the admin panel.
@KevinPeno Your mom will be able to use it
Oh, and the initial registration...yeah, can't expect the user to have the databases set >.>
 
my point is, what I have in my head would take a couple hours
so obviously you have something with more requirements
you making wordpress 0.1? lol
 
@KevinPeno The CRUD for posts is shit easy, GUI for admin panel is annoying, and initial setup is annoying.
 
what really needs to be setup for a blog? I mean, disregarding file permissions on the server. Does anyone really need more than SQLite?
means the DB could be preset
just create the admin account for the "installation"
maybe set the title...
 
You don't have to do an installation
You just add the tables etc by hand
 
that's not a "usable" blog per the requirements
 
8:32 PM
I thought about using MongoDB, but that won't be available for most end-users
 
To me usable is: ability to authenticate (log in) and make a post
And to be able to see the posts
 
maybe change some basic settings (like blog title, desc)
 
So I need to: Create database -> Configure users -> Create tables -> Populate admin table with user settings -> Make a settings file -> Load from settings file
 
No, even that i would say doesn't count
You don't change title often, so you can do that by hand via the database
 
@zirak, SQLite...one file...database already ready
@Michael, my mom is not going to edit the DB manually
 
8:35 PM
@Michael Does your mom know how to do that?
 
Ok
 
@KevinPeno I was forced into the MySQL world...SQLite is a magical realm, really...
 
@Zirak, why are you forced to use MySQL for this?
 
You just have to start out small
 
@KevinPeno I'm not.
 
8:36 PM
@Zirak, I don't understand your reply then
 
The problem is I have work tomorrow, so I can't code it overnight.
@KevinPeno Never learned SQLite
 
see OP's comment:
0
A: calculate sum total of all the figures in a column

NealDo your select. Get the value. Echo it. Thats just as much as I can help right now since i have no idea what you tried so far. For example: $some_q = " SELECT COUNT(some_col) AS `count_col` FROM some_table"; $results = mysql_query($some_q) or die(mysql_error()); while($row = mysql_fetch_ar...

 
@Zirak, if you know MySQL you know SQL, you know SQLite
 
@KevinPeno Yeah, but according to what you say, it's different or something
 
@KevinPeno But there is the setup, etc
And slight differences in SQL
I would do this: authentication, make new post, delete existing post, edit blog title.
 
8:39 PM
@Michael Have them already. The admin panel bites, though
 
admin panel = edit blog title
 
I wasn't built for GUI man, I grew on the console. Dunno why people even use GUI.
So all the clients I ever had facepalmed after seeing their page design
Pretty funny ;)
 
You need GUI for admin panel
 
Exactly why I'm slacking off on doing it.
 
no, GUI = <form><input type="text" /><input type="submit" /></form>
 
8:42 PM
Yeah, but what about transitioning between these different things? How you'd layout the navbar?
 
Just make list of links like: <a href="page.php">Page</a><br /><a href="script.php">Script</a> etc
 
I'll work on the database creation...already built the MySQL backend, rewriting it will take longer
 
@Zirak, sorry. I got bugged
 
np
 
No, it's not different. The only major difference is that instead of a server, SQLite uses a single file to store the database. PHP interacts with that file when you ask it to "connect"
Thus, you could build the entire database, save it in your project, and deploy it in "ready" state. The user would just need to make sure the file is writable to PHP
 
8:48 PM
Nice
 
then the only thing you need from them at the start is the username and password they want to set for "admin"
best thing is that if you are already using PDO, you shouldn't have to change your code
 
Using MySQLi
 
In theory, you could even export the MySQL database you already have into SQLite in a single query file. You might have to change the table definitions a little, but not too much.
Ah, then you would need to change it a bit
However, that small amount of refactoring is better than building an install script :P
 
Wow, actually, this was easier than I expected. A simple form asking for username password, a CREATE DATABASE query, and all done
 
Tip: get basic functionalities working, then add advanced features
 
8:55 PM
0
Q: long polling with ajax/jquery/php

SHUMAcupcakeHi, I have found a lot of information how long polling works Comet tutorial: http://www.screenr.com/SNH A thred in stackoverflow: simple Long polling example And more.. So I tried to make one of my own, but I can't get grasp the backend of it, the php part. Heres is my html/jquery/ajax: &l...

I'm curious what a long polling php snippet looks like. (I wrote a node one if anyone wants a reference).
 
The install file needs to delete itself to prevent overriding...
 
im VCing that
@Raynos I have written a comet php implementation
i use it at work
@Raynos see some of my SO Questions to see the dev process lol
 
I should read more PHP source. I don't know any. (PHP can't be that hard too learn)
 
@Raynos its easy :-)
 
@Neal thats what I said. Sucks that most node.js comes with support our legacy PHP code :( No offence to the PHP guys, but PHP4 tag soup makes me cry
 
8:58 PM
This is basically my comet backend:
<?php
  session_start();
  session_write_close();
  //disable some errors which aren't really errors:
  ini_set('session.use_cookies',false);
  session_cache_limiter(false);

  set_time_limit(0);

  header("Cache-Control: no-cache, must-revalidate");
  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

  ob_start();
  flush_buffers();

  ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
then i have a comet class to put it all together
 
@Raynos, unless PHP is running as its own daemon, it'd be the server that would do most of the work.
 
@KevinPeno depends. I see quite a few node.js guys half through transferring their PHP code to node.js
 
@Neal Why to ob_end_flush() then ob_flush() ??
 
@Michael to restart the buffer
 
My point is, all PHP would really be doing is waiting to see if it has anything to say
 
9:01 PM
@Neal No, ob_end_flush() does a ob_flush() !~
 
NOOOO!!!! Connecting to MySQL! Needs a host & username & password!
 
@Michael lol idk. i got the function from somehwere online
@Zirak ??
 
...SQLite you say?
 
lol
yes
 
@Zirak huh what u talking abt?
 
9:01 PM
@Neal Ranting about losing a bet
 
@Zirak ook...
 
Scroll up a bit
 
nahhh im good
 
Now I need to rewrite my constructors...
 
9:02 PM
@Neal @Zirak is making a blogging system
 
@Michael so?
 
He was all about making an installer and using MySQL...so I was selling him on SQLite
 
I'm supposed to make ~30% of the functionality for tomorrow
Or I lose $$$
It's supposed to be easy, to the point where your mother can use it
 
[Err] 1 - SQL logic error or missing database FFFFFUUUUUUUUUU
 
blogging system for the mothers of the world
 
9:05 PM
screw this shit comments out 200 lines
 
lol
 
starts writing in completely different approach
 
@KevinPeno ...wazzat?
 
SQLite only needs single file to save database
 
as opposed to?
 
9:08 PM
MySQL
 
MySQL = running as a process = complicated
 
@Michael why is that complicated?
 
What's your host? Username? Password? Port?
 
@Neal Because of setting up!!
 
@Zirak but then its much less secure
 
9:11 PM
This is a blog. What's there to secure? Admin info is already hashed to death
 
how can hacker access SQLite file?
 
@Michael same way as he/she can get into any file
im confused
 
@Neal Then they can access the MySQL file system resources??
 
@Michael there is a big difference btw a file and a resource
 
@Neal No: rm -r /mysqlfiles/ ??
 
9:14 PM
...
 
I'm just trying to clear the issue...
anyway, bye bye
good luck with blog :)
 
9:29 PM
Cyas, thanks
I'm confused...how exactly do you make a primary AI key?
ah, got it...
 
9:50 PM
anyone here ever tried using SOAP or nuSOAP to connect to a WSDL?
 
10:36 PM
@Zirak, You should be able to use your mysql info. Just do a dump and try running it as a query for SQLite. Only things you need to remove are things like ENGINE
But you will see the errors for that kind of stuff if you missed it
@Neal, as far as security...oh noez? If you want to "secure" the sqlite file, you can encrypt it and decrypt it every time or use the proprietary SQLite encryption module. Either way, if you think that having the database on a server is more secure than the file, I think there's a serious discussion to be had...heh
Besides, we're talking a blog....not ecommerce.
If you use OpenID for all of the logins (which you should), there's nothing that isn't public going to be in that database anyway
 
If I had time, I'd add a user system which would use OpenID. But this is admin, so manual I'm afraid
I did have to change some interaction, as there's no DateTime format. But it looks decent...I think
 
10:51 PM
@Zirak, DATETIME resolves to TEXT, but SQLite has date functions. So you can keep your interactions as is. Though I suppose you can't use some things like ON UPDATE CURRENT_TIMESTAMP
But you should be using TRIGGER instead for that kind of stuff anyway (per standard SQL). Always stay away form vendor specific stuff if you can :P
 
ah crap...g2g. Will have about 1 hour of testing later and tomorrow morning...hopefully it works...
@KevinPeno Thanks a lot for your help
 
lol np
good luck on your bet ;)
@Zirak, I'd be interested in seeing the final product
 

« first day (215 days earlier)      last day (4747 days later) »