« first day (597 days earlier)      last day (4334 days later) » 

Sam
5:02 AM
hey @Paul; how are you?
 
hi Sam, good thanks, and you?
 
Sam
I'm great......
do you use cURL constantly? I have a question regarding it
 
no, I haven't had much need for it yet. I might use it a little more soon though with some testing.
 
Sam
oh ok then.......
it's just that I'm running 2 curl requests simultaneously to the same URL, and they use session objects, but for some reason, the session objects in each request can't seem to communicate with each other (and their session_id remains the same)
 
good morning @Sam
good morning all
 
Sam
5:09 AM
hey @ShyamK; how you doing, buddy?
 
good morning @p
gr8
today has been a gr8 day so far
hope this lasts :D
got a client meeting at IST 12:00 pm..
 
Sam
lol......no coding issues yet? Or just ignoring them? :P
 
hoping that goes well too
ignorance is bliss :D
no issues yet
so all is well
 
Sam
lol.......wait for it
one's always around the corner
 
haha.. spoil sport
 
Sam
5:13 AM
well, I've got one.......two session objects, created from 2 cURL requests simultaneously, cannot seem to communicate with each other
got any ideas for me? :P
 
5:28 AM
@Sam I'm just guessing the -b and -c options are required.
 
Sam
@Paul b and c options? What are those?
 
man curl if you are on linux, or curl -M for the manual elsewhere will give you a better idea than I could write.
 
Sam
oh ok.....I already have it opened anyway; just wasn't sure if you were referring to the sessions or curl
 
I have no knowledge on curl..
 
Sam
@ShyamK if you need to post data from a server to another, what do you use, apart from cURL?
 
5:37 AM
yes.. Curl only.. but I don't have enough knowledge to help you there..
 
Sam
oh ok....I was actually wondering if there's another way to achieve the same aim without using cURL; PHP usually have more than one way to achieve an aim
 
soap?
heard that they both do they same thing.
not sure though
 
Sam
that works only for XML requests
 
hmm..
 
Sam
and it's hard for many applications to set it up
 
5:40 AM
what kind of data are you passing along?
json?
 
Sam
no....POST ---similar to posting a data from a form; you know, cURL allows you to send data by GET/POST, as well as other ways
@Paul I see to what you were referring: CURLOPT_COOKIESESSION for -b and CURLOPT_COOKIEJAR for -c
 
@Sam I see, yes I was looking at the command line version. I'll have to learn how to use it in PHP.
 
like I said.. limited knowlegde there.. still learning alot of the core concepts in php :(
 
Sam
ah......you are too tanned to use cURL in PHP :P
@ShyamK PHP ninja warrior :P
 
lol
 
6:16 AM
oh my... if someone asks a good question, it doesn't get upvoted because the noobs don't get it's a good question, but when a noob asks a complete noob question, all other noobs vote it up... this system is so screwed.
 
Sam
lol
 
@All Hi
How to upload the file in codeigniter any one can help me
 
6:33 AM
if you know how to do it in PHP, you know how to do it in CI.
 
i tried but i did not get
 
Hey guys.
 
Hello
 
previous i did in windows platform now i'm using ubuntu can you help me
 
6:41 AM
@Ravi what're you trying to do?
 
@Truth file upload in codeigniter
 
7:19 AM
cannot be easier than this.. CI is mainly famous for this sort of documentation
 
@Krish i followed that link but if i click on upload button file not uploading
 
chmod the folder
to 777
?
 
ya i did that one also
 
ask a question with all things you have done, even enable error reporting and enable logging in CI and post them
 
7:23 AM
Hi murugan
 
any thing i have to change in config
 
i have one doubt in joomla
 
@Ravi : its better if you post some code and ask it as a question
 
ok i will ask question @Krish
 
@Velmurugan : I don't have knowledge in joomla.. sorry
 
Sam
7:25 AM
@Ravi did you change the form's enctype from application/x-www-form-urlencoded to multipart/form-data ?
 
any one known joomla
?
 
i changed multipart/form-data @Sam
 
@Krish: ur gmail id?
 
hello every body since eregi and ereg is deprecated what do you use for regex??
 
Sam
paste this somewhere in the code that's supposed to run once the file is posted: var_dump($_FILES); that will display if the file was actually uploaded or not
@tomexsans what type of regex do you need?
 
7:30 AM
@sam , one that you do on passwords so that it doesn't put on characters other than alphabet and numbers
 
Sam
you can build one yourself; or you can use this function php.net/manual/en/function.filter-var.php in combination with one of these functions php.net/manual/en/filter.filters.php
 
w00
@tomexsans or simply use preg_match for a regex check
 
$%#@!... where is the love for the other beautiful characters
 
i inserted the var_dump(); it is showing like array(2) { ["allowed_type"]=> string(16) "jpg|jpeg|gif|png" ["upload_path"]=> bool(false) } @Sam
 
@w00 yup , preg_match it is , @Sam never heard of this before i'll try to take a look
 
7:35 AM
i have some doubt in joomla
 
Sam
@tomexsans if you need to validate email addresses, you don't need to use preg_match; filter_var will work like a charm
@Ravi ok....I'm not familiar with CI, so I cannot help beyond this point; but basically, that code should show you the name, size, and type of the file uploaded
 
hello
 
ok
 
@Ravi you nedd to set the upload path in your code
 
@sam thanks, i'm not to good on regex, i'll be using that when checkin on email
 
7:39 AM
@uttam i set the path like this realpath(APPPATH .'..\\images');
 
@Ravi hello ravi just asking did you use CI built in file upload??
 
@Ravi have you checked the documentation... it's pretty much clear... codeigniter.com/user_guide/libraries/file_uploading.html
 
@tomexsans ya
@uttam i followed thath one
 
@Ravi : you need to post some logs, or no one can help
 
@Krish ok
 
7:46 AM
morning all
 
morning
 
morning
afternoon here though
 
its afternoon here, but good morning to you
 
@Velmurugan why are you inviting me to a room, we have never even spoken?
 
7:48 AM
lol
wish he had invited @tereško
 
i have some doubt in joomla
@paul: do u know joomla>
 
hahaha Paul created joomla that he has doubts with it
 
@Velmurugan ask it to the room if you have a good question. No, I don't know any joomla.
doubt is normally the wrong word here, normally you'd say: "I have a question about <whatever it is>"
 
i need to display number of images with link in article page using joomla.
so, i need a plugin or component or module to do this.
 
happy new day everybody!
 
8:03 AM
189
A: What Stack Overflow is Not

Robert HarveyStack Overflow is not your personal research assistant The Stack Overflow community is very forthcoming with their help, provided you have done a few things to help yourself. Have you: Put some effort into researching the problem, Attempted to write some code yourself Attempted to debug your ...

hello @hakre
 
yes happy new day too @hakre
 
8:22 AM
Just asking....if i would like to conserve my server RAM allocation will "SELECT individual_column1, individual_column2 WHERE column=condition" reduce memory usage rather than "SELECT * WHERE column=condition";
 
when changing the timezone what is preferably the right one using ini_set('date.timezone', 'America/Los_Angeles'); or using the date_default_timezone_set function?
 
edit you php.ini file.
 
for example when asking for the timezone of a user or site visitor??
 
And after you asked the user you want to set the websites zimezone to the users-timezone? Or you want to set PHP's timezone to the users timezone?
 
they sound the same @hakre ,yup so that every visiting user has its own respective timezones . .
 
8:34 AM
@tomexsans Why not just set the default_timezone and calculate the date/time of the visitor based on that and the timezone of visitor?
 
@RepWhoringPeeHaa ,hmm good idea, i'll just search on how to get the users timezone. any idea where to start??
 
@RepWhoringPeeHaa Just asking....if i would like to conserve my server RAM allocation will "SELECT individual_column1, individual_column2 WHERE column=condition" reduce memory usage rather than "SELECT * WHERE column=condition";
 
@tomexsans You cannot know it 100% sure unless you ask the user. You couold find out the location of the user by it's ip address e.g.
 
@RepWhoringPeeHaa, haha this timezone thing is tricky than i thought . . got to research more . . thanks by the way . .
 
Sam
Scenario: Class B has multiple methods, one of which is method y that checks a table in the db for a specific value;  class B is instantiated within another class D, where method y is called in a loop to check if the value has changed (the value can be changed by an external process, which is why the value is constantly checked).
Problem during testing: During the loop, the value in the db was changed; however, method y keeps returning the original value. When that method was removed from class B, and the sql statement called directly from within the loop, everything worked perfectly.  I di
 
8:54 AM
"class B is instantiated within another class D" using the new keyword?
"the value can be changed by an external process" global state?
 
Sam
yes
 
sounds wrong to me
 
Sam
not global state;
 
Dependency injection is een geavanceerd ontwerppatroon uit de informatica dat het mogelijk maakt klassen losjes te koppelen. Dit wil zeggen dat ze data kunnen uitwisselen zonder dat deze relatie hard (in de broncode) vastgelegd is; althans niet door de programmeurs van die (beide) klassen. Traditioneel gebeurt dat vaak wel, waardoor die klassen moeilijk te hergebruiken zijn. Soms wordt 'Dependency injection' gezien als een bijzondere vorm van 'inversion of control', wat voor het eerst beschreven werd door Martin Fowler. . De Apple ontwikkelomgeving maakt uitgebreid gebruik van 'dependency...
 
Sam
the value can be changed by an external process; this happens when the user refreshes the page, or navigates away from the page before the process is completed; another method changes the value in the db, so that the current process doesn't have to continue since the user is gone
 
8:58 AM
Could you please tell me your use case instead of some abstract class a class d method y object i stuff
 
@tomexsans And store UTC timestamps in the database, not user-timezoned dates. And set your php timezone to the server timezone or UTC as well.
@Sam Looks like you're testing the wrong thing, otherwise you won't stumble upon this. So either fix the test or the code. But you can't hardly fix the fixture.
 
Sam
@RepWhoringPeeHaa the entire process is kinda complex, which can't be explained in a few words, and everything works fine.....so far; I can fix the part with the problem; was just curious to see if PHP caches sql statements by default, cause I know I didn't actively set any
@hakre But you can't hardly fix the fixture. can you explain more on this part?
 
@Sam Well if the fixture is fixed (because your software must be able to deal with it, it's the software's distinction), then changing it would be like cheating.
 
@Sam If is is too complex to explain it might be a sign of code smell IMHO
 
Sam
oh ok....as I said earlier, I can fix the problem; I was just surprised that I was receiving a cached value from the db
not too complex to explain; but thanks for the input nonetheless :)
 
9:10 AM
It's a bit hard to see what is happening with that abstract explanation. It might be cached but it is impossible to see with the info given
 
How can i make my calculation?? For example my server timezone is set to LONDON, now i have a user that i would like to keep track for example his timezone is Beijing/China. . would it be a nice idea to get his time using a client side script . then find the difference with my timezone?? what if his clock is not set to the proper time?? any advise. on your part how would you solve this thanks. .
 
@Sam Probably that is stored in some variable.
@tomexsans You need to ask the user in which timezone she is.
 
@hakre yes that would be on my worst case scenario, thanks . . .
 
Sam
@hakre no.....it can't be stored in a variable; storing it in a session object instead of the db was the simplest solution available;
 
9:51 AM
WTF:
	function get_email()
	{
		if ($this->email !== null)
		{
			return $this->email;
		}
		else
		{
			return null;
		}
	}
 
? @hakre
 
isn't that if clause completely useless?
 
you've got mail.. lol
 
probably only if === null is used, otherwise, makes no sense... (dunno if false === null)
 
@hakre kinda. $this->email could also be something which evaluates to falsy. But either way it's is fucked up
 
9:54 AM
@webarto === is used: $this->email !== null (the negation of it), and sure false !== null but false == null.
 
@hakre Where did you find it?
 
@RepWhoringPeeHaa SimplePie
 
Question.. what is !== mean? ......
I know the == and the != but not the !==
 
@ShyamK strict compare
 
!== is the negation of ===
 
9:55 AM
does it equate the type of variable too?
 
@ShyamK consider this:
 
@ShyamK yes. compare value and type.
 
@hakre in such case, wouldn't it be better to private $email = null;
 
@webarto which is a bit superfluous, private $email: is enough.
 
if (true == 1) echo 'this will be echoed';
if (true === 1) echo 'this will not be echoed';
 
9:56 AM
hmmm.. okay.. but its less used I'm guessing?
 
@hi
 
Just was reading in the morning this from the original author:
 
@hakre :)
 
any one tell me plz how i creat chat rum in php
 
> ((bool) '0' === false) is an endless source of bugs.
But why does that guy then produce such code?
 
9:57 AM
@ShyamK it depends. In coding it may be better to be more strict. The intentaion is clearer that way
@Asif really?
 
intentation?
what is that?
the spacing u mean?
 
@RepWhoringPeeHaa yes dear
do u jonw
 
@Asif don't ask questions like these
 
@Asif go away pls
 
@webarto y?
 
9:58 AM
:P
 
?
 
I can tell your origin by the question you just asked ;)
 
search online first
 
ah that ignore option is very cool.
 
9:59 AM
@hakre lol
 
We should create a new invite only php chat for specific hours :P
 
then ask your problems here.. like if you can't get something to work.. :D
 
i want to save time thats y i m asking here
 
@Asif ask it to Google first
 
ok thanks
 
10:00 AM
@Asif well you won't be saving any time here. When asking those questions you are both wasting your own as our time
 
you'll get half your answers from there
 
Thank you come again
 
correction.. more than half
 
i m asking because u know better about to the point of links
 
eh?
the internet is a huge bank of knowledge where any one can get a loan
go there
duh
see how much time you have already wasted?
 
Sam
10:03 AM
@ShyamK I need a loan ($$$$) :P
 
and we haven't even begun talking about your problem.
@Sam lol..
@Sam Ask Google? ;)
 
Sam
lol......there's actually a term for it; cyberbegging :D
 
really? they make up words for everything nowadays..
 
Sam
yup
 
Sam
10:12 AM
thanks folks for all the help.......morning's around the corner; zzzzzzzzzzz time :)
 
posted on June 04, 2012 by Qafoo - PHP

Did you ever try to debug a system with multiple interacting web services? We just released a tool, which we developed internally to be able to debug complex HTTP based SOA stacks (REST). It offers the same listening capabilities like Wireshark, but displays the HTTP requests in a far more readable way and makes it easy to reproduce single requests. Read more…

 
hi room... i have a .php page in which i want to filter data using dropdown... how can i call the .php code on change event of dropdown list item? dropdown i am using for filtering data.
 
@VaibhavVajani javascript
 
means?
inside javascript can i refresh a page? i want that all data coming from database get filtered the dropdown selected...
 
@VaibhavVajani ajax?
maybe I'm not sure..
 
10:18 AM
i have heard using ajax we can refresh particular part of the page... but never used that... @ShyamK:
 
just an idea. don't have any knowledge on it though.. Sorry
 
search for tutorials..
@RepWhoringPeeHaa thats ajax right? I can understand the code.. But since I have never used it I can't really code in it yet.. :'(
readystate and all :)
 
@ShyamK That's what most people call ajax yup
It's just some javascript
 
@RepWhoringPeeHaa: ok thanks... i will try to fight with it...
 
10:22 AM
gl
 
AJAX is javascript.. Asynchronous Javascript And Xml.. right.. so its the same
Javascript with xml
lol
 
10:41 AM
Hi all!
@VaibhavVajani I'd recommend looking at jQuery, add an eventhandler to the dropdown and then use $.get() to retrieve the data dynamically
 
@ShyamK funny enough 'AJAX' as people use it doesn't involve any XML and is more often JSON than not.
 
@OmeidHerat haha.. So its name ought to be changed to AJ2 or something?
:)
 
11:01 AM
That's why people call it "Ajax" and not "AJAX".
 
whats the difference?
other than the caps?
 
@salathe that makes sense, but I see them used interchangeably.
@ShyamK one is a Noun. the other is abbreviation.
Ajax vs A.J.A.X.
 
@all please help me i am getting this error This page contains the following errors:

error on line 2 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
in php code
 
Are you creating a XML document?
If so, you probably have more than one root element
2
Q: error on line 2 at column 1: Extra content at the end of the document

hunterwhen i use the below code and parse the xml locally it works fine but when upload the same script at the server it shows error. the code is Note: that i retrieved the $lng and $lat from qurey string and it works fine locally. $lng=$_GET['lng']; $lat=$_GET['lat']; $conn=new LoginSystem(); $conn...

 
@Jeroen thanks for replying ...yes i am creating doc
@Jeroen i saw that i am still not able to figure it out whts the problem is
please help me on that
 
11:15 AM
You haven't provided us with any code, so that's gonna be rather difficult...
But you should post it on SO
 
a closure question. I would like to factor out part of my db transaction into closure. something like in my parent class i have
function txn_wrap($closure){ tran_start(); $closure(); $tran_finish() }
in my child class, I have
function update() { $update_db = function(){ // update db stuff }; $this->txn_wrap($update_db) }
however I am getting PHP Fatal error: Using $this when not in object context..
 
@Jeroen here is my code paste.org/50071
 
"Please support us by atleast allowing ads when viewing our website - that is all we us!"
That's what I get
Like I said, post a question on SO and add the code there
 
@Jeroen we are not allowed to ask a question which is already there in So
 
Hey guys, im getting an empty server response from large files using headers to force downloads
Any ideas why
	ob_start();
				set_time_limit(10000);

            header("Content-type: application/force-download");
		header("Content-Transfer-Encoding: Binary");
header ("Content-disposition: attachment; filename=".$name.";");
header("Content-Length: ".filesize($file));
@readfile($file);
ob_flush();
 
11:30 AM
hi guys,
can anybody tell me how can i make template in cakephp for header which i will call in every page at the top?
 
11:43 AM
posted on June 04, 2012 by David Soria Parra

Software project choose languages based on idoms of the languages. Languages can provide mechanism and structures to support object orientation or a functional programming. Less time is spend thinking about backwards compatbility of a programming language runtimes. While this is usually a non-issue for short living software like websites or software in tightly controlled environment, it becomes

 
12:08 PM
@RepWhoringPeeHaa that's a terrible article and should not be read by anyone :o
 
@markustharkun That's what I commented on it. Be they have removed it :(
 
anybody please help !!
 
@RepWhoringPeeHaa I left a comment as well, let's see... and I also replied to the associated tweet.
 
12:34 PM
@Feeds BC :)
@RepWhoringPeeHaa I left a comment too now, awaiting moderation :D
 
@Sparkx does yelling help where you live?
 
I just can't live with that "Statistically"
 
@NikiC That's one of the points I had added in my comment. That and the notice that most listed FW's are FUBAR :-)
 
Probably he had a "statistically significant" dataset of three people at his workplace that he asked (two of them were using yii!!!!!!)
 
And that the article is full of shit :P
@NikiC hahahah
must be the case?
 
12:38 PM
probably ^^
@RepWhoringPeeHaa It is. Actually, comparing it to shit makes shit kinda look nice (in comparison).
@LeviMorrison What am I seeing here? github.com/morrisonlevi/PHP-Tutorials
 
@NikiC It's the beginning of an idea I've had for a long time: to make tutorials for PHP authors that don't suck.
I haven't gotten very far with it yet, but I would appreciate feedback on github.com/morrisonlevi/PHP-Tutorials/blob/master/… I'm looking specifically for ways to simplify and clarify my meaning.
 
@LeviMorrison I would call it document root rather than web-root
 
I've been looking a bit into Python lately and that made me wonder
Why have we stopped using functions?
In Python use of functions is much more common than in PHP, at least I got that feeling
 
Python places less emphasis on your own data structures. At least that's my experience.
What that means in practice is that you have more functions and work with their data structures almost entirely.
 
hm...
 
12:50 PM
Whoever recommended this talk on application architecture deserves a big thank you: confreaks.com/videos/…
2
 
1:03 PM
@NikiC How did you stumble across it, anyway?
I had just barely made it.
 
showed up in the timeline ^^
 
I quit one of my jobs so I could focus on contributing back to the PHP community. I plan on working on the docs a bit more as well as starting these tutorials.
 
@LeviMorrison oh, why did you quit?
 
@NikiC to focus on contributing back to the PHP community. :P
 
@RepWhoringPeeHaa nopes never i was just requesting .BTW i got the solution ...
 
1:18 PM
@NikiC Overall I was just too busy. Going to school, being married and working two jobs was just too much.
 
dev
HI guys, Is there any php api for getting business reviews.
from google plus
 
Good morning again
 
good morning and afternoon :)
 
350 emails to go through in the next 30 minutes. Nice
 
hey wats goin on ?
 
dev
1:29 PM
heheh :)
 
hi everybody
 
@ircmaxell morning
 
good morning @ircmaxell#
 
morning @ircmaxell
 
@ircmaxell ctrl+a + del ^^
 
how's everything going?
 
I'm wondering about some code but apart from that fine!
 
1:56 PM
@hakre if only
 
if only I could fly sing
 
Hi guys
I am trying to find a simple file manager that doesn't connect to FTP
And just uses MySQL to store file paths
And the location in the file manager
If you know what i mean
 
no need to store path in database
 
True
But i need something, for example, the file will have a "folder" field and if it had something in there like "pictures", that file would only show when in the folder "pictures"
I know what to do in SUDO
Pseudo*
 
I'd like to mange my website dynamically. is it good to store pages in database along with its "needLogin" field, so that each time user access a page, the database will decide whether to force login?
 
2:12 PM
@silentbang This just sounds bad in so many ways
@silentbang Are you storing php logic or just html?
 
@silentbang I would rather store a needed accesslevel instead of needlogin. That way you may add accesslevels in the future when needed
 
@used2could I store the php logic, it is the boolean field solely. how is it so bad?
@RepWhoringPeeHaa could you provide more detail?
 
@silentbang what if you need not just needslogin in the future, but also several user levels? Now you will have to change your database structure
 
@rdlowrey I'd like your opinion on how to go about explaining code architecture: github.com/morrisonlevi/PHP-Tutorials/blob/master/… I've decided it is one of the biggest things PHP developers don't seem to understand.
 
2:27 PM
@RepWhoringPeeHaa ah, I already built database for storing user level and check access to pages successfully. Now I only want to decide whether to force login
 
@silentbang ?
If the page has an accesslevel and the user has an accesslevel. Why do you need anything more in db?
 
I only decide who can access the page. but not decide "isAuthenticated"
 
2:45 PM
@RepWhoringPeeHaa how does it sound
 
@LeviMorrison Could you explain what you mean by that (rather broad) term?
 
@NikiC That's part of what I need to refine. Basically, people don't structure their code properly on the file system. They also don't have a very good structure inside of their code either.
 
I think the structuring on the FS is the least of our problems ^^
 
@NikiC The latter of the two problems I mentioned is far more important. And I think it is one of the core problems PHP developers have.
Possibly a core problem developers of every kind have, but DEFINITELY PHP developers.
 
hello. How do I replace a string like this Lorem" for this Lorem\"
 
2:59 PM
@LeviMorrison %s/PHP//
 
I mean, If I should do str_replace("\"", "\"", $value); it's kinda weird. How it works?
I want to add a back slash before the "
 

« first day (597 days earlier)      last day (4334 days later) »