« first day (921 days earlier)      last day (4041 days later) » 

12:01 AM
@Jocelyn you're good to go
 
@kaᵠ you can too, if you want!
 
@Jocelyn i'm a bit slow on cv-ing will increase pace but : chat.stackoverflow.com/transcript/message/9024472#9024472
 
@kaᵠ good night then!
 
gNight all; EOF; EOT; NUL;
 
^D
 
1:05 AM
Entry 2: Today @Baba said the secret to good PHP is beer, @DaveRandom discovered that Windows lies about required reboots, @kaᵠ reinvented the wheel, @wes time traveled and @Duikboot may buy a human.
13
 
I just used my last close-vote...I'll continue tomorrow. Visit the backlog if you don't know where to use your close-votes!
good night/day/*
 
 
1 hour later…
2:45 AM
@tereško do you make much use of the unit of work pattern? shouldn't a cache server such as memcached alleviate the problem
 
3:10 AM
@crypticツ loving the updates :)
 
3:39 AM
@crypticツ lol
 
user895378
3:59 AM
The Daily @crypticツ: All the news that's fit to print star. It's like having my own personal PHP chat RSS feed ...
3
 
m59
4:11 AM
Is there an easy way of getting the parent dir of the current dir?
there's 1000 questions of how to get the directory of the current file.
all I can get parent directory wise is the full path :(
so I have to search it and get the part I want.
 
@m59 realpath('..')
 
m59
@uınbɐɥs I get the full path home/user/public_html/iWantThisPart
I think basename(dirname(__DIR__)) is what I wanted.
 
4:37 AM
@m59 nice
 
5:12 AM
did any one know how to write rest api for php websites
 
5:24 AM
hello all
I am using netbeans to analyze some php code
 
@udaysagar hi9ya
 
I am stuck as how to view all the files that had been called during the execution of the project
I heard of call stack
 
hello @Evryone
 
I want to run the project and Want how the control is transferred from one php to another
 
can anyone tell me how to set foreign key in phpMyAdmin i tried setting from "Relation View" but no luck
 
5:26 AM
Did you get me @NullPointer?
 
any opensource system like php mail box for internal circulation ?
 
VSK
6:19 AM
Hi
any one knows how to install phpmyadmin in centos6
 
VSK
it shows error: Failed dependencies:
rpmlib(FileDigests) <= 4.6.0-1 is needed by epel-release-6-8.noarch
rpmlib(PayloadIsXz) <= 5.2-1 is needed by epel-release-6-8.noarch
 
@VSK install what needed
 
VSK
phpmyadmin
php mysql already installed
 
Good morning dev's.
 
6:26 AM
@VSK ohh dude i mean rpmlib
11
Q: How do I install an rpm that complains about rpmlib(FileDigests) <= 4.6.0-1?

JakeIm trying to install an rpm file on CentOS 5 and Im not sure how to resolve this issues it brings up: $ rpm --install epel-release-6-5.noarch.rpm warning: epel-release-6-5.noarch.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 0608b895 error: Failed dependencies: rpmlib(FileDigests) <= 4....

 
VSK
@NullPointer for centos6
?
 
@IOSBee Are u using innodb?
Should be possible in the relational view.
 
7:04 AM
Morning y'all
 
@PeeHaa埽 morning ... sup
 
Good morning.
 
Hello everyone
 
@TillHelge morning
 
7:16 AM
hello every one
any one there php master
 
@MayurPatel sorry but here only jquery2.o master
 
ohhhh
okay don't worry
so give me some tips of jquery
 
@MayurPatel jquery sucks ..
 
Please don't start my day with a troll war. ;)
 
7:19 AM
what do you mean
 
@MayurPatel btw since java start with same word J so we do like to talk about java like this stackoverflow.com/questions/15318617/…
@TillHelge we can not step back :P
 
okay
i have one quesion
can give that ans in simple way
 
> You don't have to ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will.
 
thanks for adwise
what is diff between object and instance
 
20
A: Difference between object and instance

joe snyderA blueprint for a house design is like a class description. All the houses built from that blueprint are objects of that class. A given house is an instance.

 
7:24 AM
sorry for but i cant understand
 
@MayurPatel you mean class instance ?
 
Hello NullPointer
 
ya
here my class
 
Uby
@MayurPatel objects and instances aren't different. An object is an instance of a class
 
a class specification only declares the structure of object and it must be instantiated in order to make use of the service provided it . The process of creating object of that class is called class instantiation ?
@udaysagar hiya
 
7:28 AM
thanks
 
@MayurPatel so a class is like a blueprint of a house and it indicates how the data and function are used when the class is instantiated and the necessary resources are allocated only when a class is instantiated
 
hello everyone
are there anyone who works in prestashop webservice?
I have a question regarding "forgot password" section in prestashop web service
can anyone help me
 
@MayurPatel and in simple word An object is called an instance of that class
 
someone really likes to answer that 1+1=2
 
@ArtjomKurapov where ?
 
7:34 AM
here :)
 
@ripa call to support you can get number and email here prestashop.com/en/#footer
@ripa no one here can do anything
 
@NullPointer how will I call? actually I need the xml for "forgot password" so that I can use it in my android app
 
@ripa wrong place its php chat room
 
yes
@NullPointer how will I generate XML from php. I am able to generate xml for customer module. but not able for "forgot password"
@NullPointer can You help me please
 
7:44 AM
Hello, my friends.
 
@NullPointer yes. I've studied this link. but It's not helping me .:(
 
I think I gotta roll.
 
http://stackoverflow.com/questions/16185965/how-does-this-file-redirect-and-how-to-modify-it-php-files
 
@MikhailRybkin hi. can you help me
 
What is then the best practice?
 
morning all
 
Hi,
 
7:59 AM
Hi
 
@Jocelyn you are true cv helper
@iroegbu morning ..
hi
 
lol I just love @crypticツ's overviews of the day. :-)
 
Is there somewhere a good example about the good way of programming a database connection? Now im using a singleton ect
$db = AppPDO::getInstance();
 
@PeeHaa埽 we all do :P that thing is really cool ...
 
@Dulkboot, you can use dependency injection
 
8:04 AM
@NullPointer You can start reading this: stackoverflow.com/questions/11923272/…
 
@NullPointer I am stuck as how to view all the files that had been called during the execution of the project
 
@udaysagar Do you have a debugger / profiler installed?
 
I am using netbeans
and it has xdebug
 
Dependency injection
 
I am able to debug the code
step by step
but the problem is the project has many php files to execute for a particular URL
 
I just want to see the execution flow
I mean what files had run and how the control has passed from one code to another
got me?
I have seen in google, that this process is called "code coverage"
 
eeeek wrong ping @NullPointer
 
@PeeHaa埽 no problem .... btw nice answer ..
 
@Duikiboot, these are constructor dependency injection examples, look for Dependency Injection Container too
 
20
Q: Burninate mysql-error-1064

JNKThis is discussed a little bit here as well. The tag mysql-error-1064 is on almost 1000 questions at this point. It is also useless. The error code in question is about the most generic error you can get - "There is an error in your syntax"! If you need help, searching using this tag is usele...

(if you don't know what to edit or close-vote)
 
Okay, this is getting already a bit advanced, I was used to use a singleton, but after reading lots of articles it seems not a good practice.
 
@bizzehdee Objects are always (effectively) passed by reference, read stackoverflow.com/a/3612129/889949 - unless you're writing for PHP4, which I know you're not because you have declared visibility on methods ;-)
Mornings
 
user652649
mornings
 
Man, I just spend about 10hrs without internet, I was on the verge on chewing off my own arm
 
@DaveRandom you really had bad time ..
morning ..
 
8:15 AM
@DaveRandom Jo Bitach!
 
@crypticツ needs to tag those messages with something unique, so they are easily searchable
 
@DaveRandom may be at other page in somewhere our website .. with link of original
 
user652649
@DaveRandom corner of the room, on the floor, head swinging? i know that sensation
 
how can I set a foregin key value to null initially?
 
8:19 AM
@Duikboot InnoDb solved the issue ... Thx dude
 
No prob :)
 
The one ring to rule them all
 
can anyone help me with my query?
 
@Jimbo its always the ring of sauron :P morning
 
@DineshVenkata I think it will work if the column has a default value of NULL, although I'm not 100% certain
 
8:22 AM
@DaveRandom it isn't accepting the value as NULL
 
@DineshVenkata Can you show you table schema?
 
Don't get the whole dependency thing.
 
my problem is that i'm going to set the foreign key after inserting the rest of the values
@DaveRandom
 
morning
 
8:24 AM
@DineshVenkata Can't you re-order your operations so that you have the value for that field at the time of the insert?
 
@DaveRandom I have system where I get a ticket from a client and I have to update that ticket with a user id once a user attends it
 
@DaveRandom what pattern do you use for connecting a database with php?
 
@DaveRandom here is my schema pastebin.com/B1XCaqQ7
 
Anyone suggetions? pastie.org/private/chlcqtv130kq9rorg33ffa I want to get grid of the singleton I am using, but I think I have to do something like this ( Very pseudo pseudo code)
 
@DineshVenkata That kinda make no sense, IMO. A constrained foreign key is about a well-defined relationship, either you should be putting that ID in when you create the record and have an "attended" boolean flag, or possibly have an intermediate ticket_user_attendees table to add the relationship to on the fly.
@Duikboot I use PDO, what do you mean by pattern? Usually I just have a single connection so often I just instantiate in the bootstrap. I have been known to use a factory though.
tbh my DB stuff I've never been happy with from a design point of view
 
8:35 AM
 
@DaveRandom If you instantiate DB in bootstrap, doesn't every request therefore access the DB?
 
@Jimbo Usually it does anyway, most of the stuff I ever do is internal company stuff that needs auth
 
@Duikboot keep db details in class is no good too
 
@DaveRandom I can maybe short explain my setup for my projects, I a index.php file with a frontcontroller, in the frontcontroller I load my pages, and use includes for actions. In an include file can be a call to a database like DAOUsers:getAllUsers();

In the DAOUsers class I have multiple public static functions with $dbcon = new dbconPDO::getInstance();

The getInstance is then the singleton in my case.
http://pastie.org/private/pb8rgi9kzduwvbrndm6lsw > That is how my PDO class looks like

In my Config.php file I have a singleton ( getInstance)
 
8:44 AM
I was reading that :D
It's just the problem im not yet that good to learn how to implement a dependency injection into my project.
 
@Duikboot I'm not either. I thought I was, and ended up implementing an abstract factory.
 
Has SO reactivated some analysis task that gives out badges or why am I getting notified every few minutes that I got another badge for some old answer of mine? It's spooky!
 
@Duikboot Why do you have a DB class?
looooool look at USP #1: basecamp.com
 
Im just trying to implement a new way of database connection.
 
9:00 AM
@Duikboot I use pimple - although not in the right way I've been told, which uses closures to create and return the database object only when I need it. I make this available in a bootstrap file, then just call when I need
 
Remember that the basecamp people are the same people as the ror people
 
@Duikboot please stop using singletons .. stackoverflow.com/a/11369679/727208
 
@tereško That is what I want to do :P
 
there are already "DB connection classes" in php : PDO and MySQLi
@Duikboot then why do you write crap like this ?!?
 
Dude we're learning man, we all start somewhere - you know that
 
9:08 AM
Because that is what I was/am currently doing, and now im looking for a new way.
( @tereško is right :) but he didn't mention in this discussion I would like to learn the correct way )
 
9:42 AM
@Duikboot take a look at this book: masteringobjectorientedphp.com
 
@DmitryMerkushin that's crap
please , FFS, stop looking at books that claim to teach you desing patterns for PHP
design patterns are language independent
what you get by looking for php-only materials is just worse quality
 
@Duikboot Try "Head First Design Patters", I'm only a little way through but seems good so far
 
@tereško so can you suggest anything better than singleton that is good memory wise at keeping 1 or exact number of connections (not per-query) AND so that I don't have to establish it every time AND so that its not created every time I run application that doesn't need DB access?
 
9:54 AM
Example are in JAVA, but completely relatable to PHP, any any other language.
@ArtjomKurapov Dependency Injection
 
@Jimbo like I said, without stating that I need it
 
^ A Dependency Injection container :)
 
I want it to auto load configuration, establish connection at first query execution
and then keep working with it.. if I need, I would specify other database or other engine to use.. but that doesn't have to be right away
container huh..
 
GOD
php sucks
 
people suck
 
9:58 AM
:D
 
GOD
hahaha
 
@Jimbo I did not like that book
 
@Gordon Too simplistic?
 
Gordon kicked God
3
 
Instastar!
 
10:02 AM
@Jimbo no. I didnt like the learning concept.
 
Hello.
Can anyone help me with jquery mobile file input + cloning of page?
 
@AReader Sounds like you want rooms/15/javascript
 
@DaveRandom Ok. Thanks for directing :)
 
yeah, they have cats all over their chat, looks like jquery question will fit fine in there
oh wait, thats android
 
10:14 AM
@ArtjomKurapov :) I don't think I am going to have any luck over there. Thanks any way. Will try on my own :)
 
@Jimbo DI Container and Dependency Injection are two completely different things
 
@tereško So, DI is for injecting dependencies when creating new objects - like setter or constructor dependency injection. A dependency injection container (am I right?) abstracts this out into it's own class that handles what to inject and where?
So when creating a new object, you call your dependency injection container and this handles injecting all the depndencies requires instead of you doing it directly in your code each time?
 
10:28 AM
Hi how can i get result by using two conditions in where clause
SELECT * FROM message WHERE type='$type' OR 'type'='All the Three'
 
@BrunoThileeban Firstly, use PDO / MySQLi (not MySQL functions)
Secondly, if you must: SELECT * FROM message WHERE type = $type OR type = "All the Three";
 
@Jimbo okay thanks jimbo
 
Hi All
Any one had a experience with converting html to xml and back using php
 
10:46 AM
@tereško i am not agree, this is very good book that describes common techniques applied to php, and this book (Mastering OOPHP) is not about design patterns. i understand - u didn't read it, ant that's why you have no right to judge it.
 
hi there
anyone knows how to enclose module configuration only for that module in zf2?
i made a new module and i want that module to use the layout file inside their view folder
i m messing with the init in the module and the bootstrap event
 
Hi all.
 
Hey @Ihsan
 
@Jimbo Hope you are in good spirit.
 
@Ihsan I am thank you! I've braved the worst of the PayPal API, and going with work to a really nice teahouse called "The Mystery Teahouse" for lunch!
And you?
 
10:58 AM
Fine, having backpain (old programmer curse) but also great motivation to fight my way back to harmony... (I love talking in paradoxes see? ) :D
@Jimbo "The Mystery Teahouse" the name is enough... Lovely...
 
Why's it called The Mystery Teahouse? That's the mystery!
 
You will work for them? You will eat there while working? or both? Too mysterious...
@Jimbo lol
@Jimbo Congrats for your glorious victory over paypal...
 
is there a way I can define a new ini entry at runtime? I tried with ini_set() and ini_get() then to retrieve it but no luck.
 
afaik they dropped some at newer php versions
 
@hakre oh a non-standard one?
 
11:04 AM
@Ihsan yes, one that is not of any extension.
 
oh wait.. that was custom .so inclusion
yeah, I had same problem
 
@hakre Instead of ini, what about $env?
 
@hakre That's blasphemy... Exterminaate...(dalek cry)
 
@Jimbo I probably switch to ENV. Tried first with globals which did work (phpunit.xml), then switching to ini because I wanted to set it via command-line as well (which is not possible for globals AFAIK) but in the end it is ENV what I'm looking for.
 
so basically I couldn't run unit tests on .so from phpunit and load it on the fly.. instead it had to be included all the time
well.. integration tests , not unit tests I guess
 
11:07 AM
@hakre ENV is the final cure for the f**ked up relic sites with many entry points...
 
@Ihsan well it's integration tests I'm creating and I want to be able to test with different login credentials than configured and such.
 
@hakre ok. no objection, my sentence is off-topic. Was about the root path problems and spagetti htaccess resolutions.
 
@Ihsan reminds me there is something left to eat over in the kitchen, thank! ;)
 
@hakre lol.. You are wellcome.
"The __magic Php __house", how about that. "The Mysterious Teahouse"...
Have to go... C U Later all..
 
0
Q: Array php foreach looping

Mayurconsider the following array $arr1=array('a'=>2,'b'=>22,'c'=>4,'d'=>10) Now,for print_r(array_keys($arr1)); output is Array ( [a] => 2 [b] => 22 [c] => 4 [d] => 10 ) Fine because return type of array_keys is array. Even echo array_keys($arr1); gives Array as output. But,for foreach(ar...

Would it be to...dunno...heavy...crass...whatever...to mark that as a dupe of this question?
 
11:21 AM
Does it drive anyone else batty that PHP uses ALLCAPS for so many things? DOMDocument, SimpleXMLElement, and so on?
 
@TillHelge It's not a dupe of that, but it is TL - the basic premise is that they give different results but they don't, his output for print_r(array_keys()) is wrong.
 
Heirachically, where would anyone place their scripts in their own MVC framework? Say, an IPN script that PayPal could call? In /public/scripts alongside /js and /css?
 
user652649
i.imgur.com/937Yrz3.png why is my life going so wrong?
 
@DaveRandom Uhm...actually: codepad.viper-7.com/DIm47T
 
@wes What're you using for that? I've got some suite of all the IE libs, 5.5 - 9 packaged into a half-decent tool; can't remember the name
IETester, ain't bad.
 
11:24 AM
@TillHelge Exactly. That's not what the question shows. The questions shows what you would get if you just print_r($arr);
 
@wes why no IE6 , IE5 :P
 
user652649
@Bracketworks ietester? the truth is that doesn't work properly. you can't properly test js, file uploads (with js), fonts are rendered differently for some reason
 
@DaveRandom Omg. Never mind. I'm just blind apparently. Ignore me. ;D
 
user652649
@NullPointer IE7 4%
 
user652649
IE6 0.2%
 
11:26 AM
@wes All true; I've noticed this. S'why I was wondering what you're using.
 
@wes dont count those 4% dumb people
 
Despite those problems, it's not bad at general layout checking. Egregious margin or float bugs are immediately apparent. So long as crap is roughly where it should be on <= 7, IDGAF.
 
user652649
@NullPointer actually dumb people make me earn money. 80% of adsense clicks come from IE7 and IE8
 
lol
 
11:28 AM
@wes ya they think adds are part of website ... too much dumbness .. lol
 
Surprisingly, Mr Goog informs me that my employer's website has a large number of <= IE8 customers.
I was amazed; I thought people were not so.. dumb either.
 
@Bracketworks dumbness is everywhere .....
 
@NullPointer Especially in the PHP XML APIs, (see how I segued into that?)
;)
 
user652649
@Bracketworks according to my websites, ie7 and ie8 are still the most used MS browsers, IE7+IE8 = 20%
 
@wes If I were a statistician, it would be interesting; as a developer it just makes me die a little.
 
user652649
11:34 AM
@Bracketworks A LITTLE???
 
user652649
:(
 
Well, let's get real here; the current web dev landscape probably killed me long ago; I'm a dead horse to shoot. Dying a little now is quite a feat.
 
user652649
how they possibly still use IE7... it takes hours to load even the simplest page. how do they? how?
 
11:38 AM
@Gordon sir
 
Yay random pings
 
@Nikhil no. dont say anything. let me guess. you have a doubt?
3
 
^^ lol
 
@Gordon I am in agree.
 
It's not really fair to mock anybody's skills in a second language. Let's mock his avatar instead.
 
11:41 AM
Yes sir
 
hi guys
 
I found a user who has copied five answers
the first five I have seen
all are copied
when I commented on his answers as copied he has deleted
 
@Nikhil flag them
 
It's not that regex guy is it?
 
I already flagged moderator has deleted the flagged answers
but not have taken any action against him
please check his answer once
@Gautham
 
11:44 AM
already at it
 
@gordon Thanks now I know from next time whom to complain.
 
@DmitryMerkushin i do not really care if "you are not agree" , i was just sharing what i have learned in past years.
 
@Nikhil just keep flagging the answers. if the user keeps copying answers we will eventually take action. he got warned via a comment already.
 
Hey everyone!
 
@gordon Thanks.
and thanks to @appu
 
11:48 AM
@Nikhil thank you too
 
who told me about you
 
@appu sir thanks. Gordon sir has solved the problems.
 
@Nikhil NP. I am not sir.
 
@Appu on stackoverflow you are.
 
11:49 AM
@Jimbo dependency injection is a approach (practice/methodology) for working with objects. DI Containers are instances that might or might not actually use DI to collect requirements for a creation of an object.
 
@Nikhil you can of course ping me if you got something to report but unless it's a very urgent matter, just flag stuff for moderator attention. I am not the only mod.
 
Q: When I program a website/app do I always neeed to close the PHP tags?
 
@Duikboot you never close the PHP tags unless there is HTML following.
 
@Gordon I will be keeping the point in my mind. Thanks for making me aware.
 
> @Duikboot you never close the PHP tags unless there is HTML some output following
 
11:51 AM
So what with DAO/incldue files
Im using a template system like smarty
 
@Duikboot my condolences , please read: codeangel.org/articles/simple-php-template-engine.html
 
So im a bit confused
 
50
Q: Why do some scripts omit the closing php tag '?>'?

Naughty.CoderIn some scripts I see that they omit writing a closing tag ?> for the script. I don't know why. Can someone tell me why and if I should do this as well? (I'm sure they have not forgotten it.)

 
Thx!
 

« first day (921 days earlier)      last day (4041 days later) »