« first day (720 days earlier)      last day (4222 days later) » 

12:00 PM
the should end up both in the "Perspectives" list
 
hmmmm........
@tereško It seems it is gonna take few more mins. What else? BTW you are from?
 
you will also need a webserver
the best option would be to have some external hosting (maybe you have a friend who has a working php-stack server, you could play around on)
 
@tereško You don't need hosting if you are learning. VM + linux is fine.
 
next option down the list would be set up a server in a VM instance , but it would require some above-beginner skills in either linux or bsd to set it all up
 
Certainly does not require much above beginner. Nearly all have a package manager and you just do the equivalent of "install apache" and "install php5" - Ok if you want PHP 5.4+ you'll probably need to compile it, but again, for a beginner, not hard.
 
12:14 PM
Actually as per that link I installed xampp
 
if you cannot (dont know how) do that , you can manually set up a server on your own OS ( most likely windows )
 
So is it not sufficient?
 
the worst case scenario is to use WAMP or some other "canned server" that you can download and install
 
Well, windows has quirks ;)
 
@Kanth is it sufficient : yes , preferable : no
 
12:15 PM
Then what is the best preferable way for the entire setup
?
 
For development, definitely a linux VM, if you don't have dedicated hosting with a staging environment.
 
real hosting > server in VM > server on your own OS > WAMP and friends
@Kanth since you are just learning now , WAMP/XAMPP will be good enough
 
@tereško Unless "server on your own OS" is IIS, then WAMP > IIS ;)
 
Sorry I was away for a while.
 
@tereško @Leigh Then I am going with the xampp now. But Soon will ask about the most preferable. BTW do you have any idea about the sources online that guide me to have high development environment.
 
what's "high development environment" ? It sounds like something that would be illegal in few places ...
 
I mean like most preferable way to have the environment to develop
 
I hear google has all the answers
 
as you said it requires above beginner level skills.
 
12:37 PM
@Kanth , do you have an old PC laying around in the house ?
something like Penrium 3 ...
 
@Leigh Yes. Of course but then again there are lots of answers which an individual couldn't differentiate.
Nope. :( why?
 
@Leigh , type in "learn php" , click on the "world icon" and see what is the firsts result
@Kanth , reusing old PC as a development server is always the best option ( it's like real hosting, but you don't need to pay for it )
but , IMHO , the best option is setting up a VM (virtual machine) , but that will requires you to have some understanding of either BSD or Linux
 
@tereško I don't have a world icon, but yes the first result is sad. In fact if you always take the first result on google to mean "best result", you deserve to fail.
 
the answers to stackoverflow.com/questions/12746327/… are abyssmal
 
Yeah. Seems exciting if I use old pc as a real hosting, but don't have.
Do you come to this room frequently. I think it takes some time for me to understand all the terminology.
If I once become aware of it, hope I could ask you in future. That's why I was asking about your arrival to this room.
 
12:48 PM
there is always someone hanging around ( except its quiet round 3-7 GMT )
 
@tereško Okay.
 
@tereško I am unable to find "PHP external tools" as per that link..
to configure
 
which link , where
 
this one. After finishing php sdk tools... eclipse.org/phoenix/docs/PHPeclipse_setup.v1.0.1.pdf
Unable to find the subfolder named PHP external tools.
 
user895378
1:02 PM
@dag And regarding the fact that the Symfony docs "know about the Service Locator and caution against abusing it" ... that's just asinine. If you know there's a cobra in your bed, you don't just sleep on the other side of the bed, you remove the poisonous snake from the bed. — rdlowrey 1 min ago
 
user895378
Sorry for the comment spam ... people who ignorantly defend Symfony's service locator annoy me.
 
@Kanth , the material you are using might be a bit outdated
since JRE version, that has been mentioned there, is 1.4.2 , which was released on February, 2004
 
How can I install? Any sources?
 
1) Search, 2) Try, 3) Ask
 
That's what I have been doing besides chating here.
 
1:11 PM
what did you try and wht did not work ?
what is "PHP external tools" subfolder ?
do you mean the section in preferences ? of it is not there , then it has been (re)moved
most likely is has been replaces by the default eclipse's "external tools" dialog
also, do you know WHY you are trying to set it up ?
 
Hmmm.... Might be. Or I might have missed installing some plugins as per present updates.
to get the controls like server icon etc., as without that now I am unable to find anything on the eclipse except the project explorer in the left side and console below.
 
what ?
why do you want to control the server via eclipse ?
in PHP you do not compile the code , you just place it in the webserver's document root section and it works
 
morning people
 
all you need is the project explorer , where it point to the above mentioned directory
 
controls means the icons, it seems like argument. common teresko I am a beginnner to this platform how do I know. I believe we can come to know the subject in deep while practicing and with experience.
That was the reason I decided to set up the environment first.
 
1:19 PM
@tereško but you could
 
I was wondering, why do browser vendors use vendor-specific prefix in css (when the css feature in question works anyway)?
 
@Christian backwards compatibility for those browsers in which it doesnt work yet
 
@Gordon I'm not sure I understand that. In css if you do b { foo: bar; }, foo is silently discarded no?
 
@Christian well, what's your question? you talked about vendor-prefixes.
 
@Gordon Yes, but -ms-border-radius: 4px; is the same as foo: bar; to IE6
So why not just throw in border-radius into IE9, instead of the -ms- one?
 
I admit I'm a bit tired and may be missing something fundamental.
 
@Christian so you dont rely on them. vendor prefix clearly indicates it's a beta feature or proprietary or unstable.
 
@Gordon True, but no one really cares about that.
The instability is well documented and people know when to use the item or not.
I'm mostly thinking about CSS animate in current mainstream browsers.
The same precise code seems to work in each of them, but each require the vendor prefix.
 
@Christian well, what should I tell you? :)
Complain with the browser vendors because I sure cant change any of that :)
 
@Gordon "I don't know." :-D
OK, well I thought there might be some sort of convention or process about it that I might have missed.
 
1:35 PM
@Christian webdesign.about.com/od/css/a/css-vendor-prefixes.htm not the bestest site for these kind of things but okay reasoning
 
Hmm. That's kinda disappointing. Hehe :)
 
2:09 PM
@rdlowrey nice image.
@Kanth do not install phpeclipse. that is an outdated eclipse extension.
you can install PDO, that works.
if you want to have some comfort, install the Fedora operating system, it comes with eclipse and diverse extensions packaged, you can just install them from commandline.
 
hai i m using html2pdf does not support word-break property any idea??
 
it also has jboss in version 17 now if you're interested
@Gordon right. PDT that is.
 
@hakre s/O/T
 
@Gordon right. PDT that is.
 
I tried PDT, but it wouldn't let me use git without upgrading to a paid version. Was I Doing It Wrong®?
 
2:15 PM
@SomeKittens you were doing it wrong, yes.
(in case you asked for confirmation explicitly)
git for eclipse is here: eclipse.org/egit - it's free software and works with PDT
 
Blast. Is there a specific tutorial I should follow? I wanted to play with PDT/Eclipse, but felt like I was running in circles
 
@SomeKittens the last I did was a bit older: hakre.wordpress.com/2011/01/14/fedora-14-dev-setup - principally it should still work similarly, just take the current eclipse release (there is one per year).
 
Sorry, I'm a Mint guy, but thanks
 
> I wanted to play with PDT/Eclipse, but felt like I was running in circles
In my experience that's the point of it
 
@SomeKittens dunno how well eclipse support is in mint. do they have packages?
once you get base eclipse installed, you can manage the rest via remote URLs.
that is pretty straight forward. some extensions take some time to download, but you normally select what you want, press confirm and then it installs everything.
otherwise for PHP development try phpstorm
 
I'm (finally) making the transition from NP++ to a full IDE. So far I looked at PHPStorm, PDT/Eclipse and Aptana
PHPStorm looks the best, but I'm not willing to drop $99 just yet
 
@SomeKittens well then there is netbeans left I'd say.
 
NetBeans is.....weird. I used it for Java back when I thought Java was cool
From what I've heard, it's the dark horse of IDEs for PHP
 
I tried to use Netbeans for android dev once... was not happy
(about a year ago)
 
user50049
I could get used to this .. $redis->publish('call stack for createClientInvoice was ' . serialize($call)); .. I love redis, it just scrolls by as I casually watch everything happening in my code as it happens. All I have to do is login via CLI and type SUBSCRIBE debug, no more noisy logs to filter just to watch a problem happen.
 
@TimPost until the real traffic comes. redis not for logging.
 
user50049
@hakre This is just for development (more viewing than logging)
 
...why does Aptana have an Eclipse plugin? Yo dawg, I heard you liked IDEs....
 
2:36 PM
@TimPost is fine tool then :)
@SomeKittens aptana is build on top of eclipse.
 
user50049
@hakre It's just so convenient when you're stepping through a series of AJAX calls to talk to three different vendors in order to ultimately post a form
 
@TimPost I should abuse redis more as well.
 
user50049
@hakre If you have it in your dev environment why not? PUB/SUB is cheap, it doesn't even persist (bg or AOF). I may tidy this up and package it, would not be hard to add simple websockets so you can watch the 'chatter' in a browser while you test the feature to see what breaks.
 
user50049
Just use one of the gazillion billion WS implementations for node and stick it on the channel, done.
 
@TimPost camel it up: github.com/bibryam/camel-redis
 
user50049
2:46 PM
@hakre "Redis is an open source advanced key-value store" This make ape cry.
 
@SomeKittens because Aptana IS eclipse plugin
or actually , a collection of eclipse plugins
 
user50049
@hakre Surely, everyone wanting to know that must be the first person EVAR wanting to know that
 
@TimPost yeah, a real good understatement of what a Q&A site is. One where you can just ship in your very important question (with your exact wording).
 
2:51 PM
quick question. When the Top 10 list for the PHP tag says I have a score of 7732, does that mean, I have 7732 upvotes, e.g. 77320 reputation from PHP questions? I wonder where the remaining 20k went then. do Accepted answers count into the score?
 
@Gordon I'd say yes, let me take a look
 
@tereško duplicate cv-pls !!! :)
 
Hey guys, I've got a method in an object instance that I'm calling, and in this method I would like to see if a variable has been set in said object.
 
2:53 PM
However, the value can be null. Hence isset() not being very useful.
Anyone got ideas?
 
rad
a question related to regex: \s+ matches one or more number of spaces, how do I match exactly 3 spaces?
 
@DaveRandom BUUUUUUUUUUUUUG!!!!!!!!!!!!
;)
 
rad
\s{3}, is it?
 
@Gordon tag sharing?
 
2:54 PM
@SomeKittens, good thinking, however would it not also return null if it does not exist?
@Gordon, thanks, let me look into that.
 
@rad yes, or \s\s\s
 
@hakre dunno. just wondering.
 
rad
\s{3} works, I am so awesome 8-)
@hakre thanks
 
@Sommer Wouldn't something that doesn't exist return undefined?
or am I getting my wires crossed again?
 
@Gordon keep in mind that is answers only. you might have some questions, too.
 
2:58 PM
@SomeKittens, in Javascript, yes.
 
arg....
 
he I did beat Michael Berkowski in the PHP toplist.
 
@SomeKittens, run var_dump() on any non-existent variables and you'll get NULL.
 
@Sommer facepalm yes, you're absolutely right. Time for more coffee.
 
@hakre I certainly dont have 20k rep from my questions :) but if only half of my answers are accepted answers, that would account for ~15k rep, so it probably figures.
 
@Gordon, that really sealed the deal. I now have Ruby-esque models working in PHP.
Yes, yes, feed your anger!
 
everybody should add some Ruby to their life.
 
I agree. I like to trot into different families of languages for the purpose of exercise and insight.
Now I just need it to start handling InnoDB constraints for me too..
 
3:05 PM
@Sommer I am compassionate. And after all, it's your foot ;)
 
@Gordon, I try radical ideas often. Sometimes it lands me something interesting and novel. Sometimes it leaves you crying in the shower.
At the end of the day it's all for science.
 
@Sommer keep testing. for science. you monster.
 
ehh .... the stuff that people tag with makes me question their ability to to take a piss unaided
 
@PeeHaa Nooooooo! What's happened?
 
3:14 PM
@DaveRandom Terrible!!!!!!!!!!!!! aaaaaaaaaahhhhhhhhhhhhh :)
Click on the addressbar icon ;)
 
@PeeHaa Oh yeh I mentioned that last night, didn't I? Maybe I never sent the message. It's a very simple fix - when I changed the settings classes I also adjusted the options page so the name attributes of the inputs matched the setting names. And I forgot to do the little settings page. Already fixed :-)
 
@DaveRandom Ah right. Forgot about that :P
 
user895378
3:34 PM
@hakre thanks :)
 
user50049
Dear Internet: Please stop posting your godd*** actual e-mail and password when asking why SMTP doesn't work.
 
some beta versions to test?
@TimPost take care with logging exceptions :)
 
user50049
@hakre I do on a best effort basis
 
3:44 PM
gosh sometimes you get the feeling that some SO users need a babysitter. we need an army of close-voters. I might offer bounties for new applicants.
 
user895378
@tereško Since the other question was closed as a dup, I dropped a bounty on your ACL answer
 
yeah .. well .. that "duplicate" was not really duplicate
 
user895378
Yeah, I'm with you. I'm going to cast a re-open vote, actually.
 
user50049
Interesting that a registrar thinks 'seweroverflow.net' is a good substitute suggestion for 'stackoverflow.com' in its 'name spinner' feature.
 
user895378
4:00 PM
@TimPost lol
 
for all the vague stuff that should be in crystalball.stackexchange.com
 
@hakre github.com/downloads/DaveRandom/cv-pls/… - that now has no known bugs, so if you find anything wrong let me know.
@PeeHaa ^ Build with the aforementioned issued fixed
 
user50049
Thought I would get this done tonight. Just found method that takes 43 arguments, 35 of them optional, of which we use 2. Oh previous person, why you hate closures, arrays and array filter for sanity? You were told to count on 5.4+ ...
 
43 arguments? Holy crap
 
user50049
Every documented field in the API call is .. an argument
 
user50049
4:16 PM
I want a pony, and I liek milk.
 
@TimPost 43. sweet. it even has an off by 1 error then :)
@DaveRandom any progress on the ff addon yet?
@rdlowrey pfff /cc @tereško of course it was
 
user50049
@Gordon Nope, 42, one is a debug bool
 
user50049
NOT TOUCHING IT .. METHOD WITH 42 ARGUMENTS IS SACRED.
 
@TimPost all hail
 
4:38 PM
@rad \s is not literally "spaces", it's "all whitespace", which can include carriage returns, vertical tabs, etc.
 
hi
could you see this fiddle --> jsfiddle.net/PkGfg
what causes the problem
 
Hey gang, I'm having an unusual issue and I'd appreciate ideas for a possible cause.
Everything works, and the scope is executed only once, but my mysqli query is getting executed twice.
Yet the mysqli method only returns true once.
It's an SQL insert, btw.
 
@Sommer are you preparing the statement? with mysqli or pdo?
 
@Gordon, no, the statement isn't being prepared.
It's a single string to a query() function.
 
@Sommer then I dont know.
 
4:43 PM
@Gordon after you have looked into Sommer's issue, may you please see my issue as well? Since there is no one in JS room currently.
 
this fiddle --> jsfiddle.net/PkGfg what causes the problem
the JS should add resizing ability for the textareas
but it won't
 
@Olli sorry cant help. for some reason jsfiddle doesnt work here. i see empty boxes everywhere
 
@Gordon oh, sorry. please see here --> codepen.io/anon/pen/BnIAE
 
4:55 PM
@Olli are you sure the code gets executed?
@Olli var arrayi = document.querySelector('textarea'); seems to return only the first textarea instead of the array you expect it to return
 
Okay, it's not just the SQL. All my HTTP requests are being executed twice.
If I run the same code from php-cli, it executes once. If I use a web request, I see the output once and the code is executed twice. The error log supports this as I get all notices in doubles.
 
@Olli you have to use querySelectorAll instead
var arrayi = document.querySelectorAll('textarea');
for (var i = 0; i < arrayi.length; i++) {
    arrayi[i].style.resize = "both";
}
 
5:24 PM
@DaveRandom nice :)
 
rad
@Leigh so what should I be using for a single whitespace?
 
Isn't there something that says X instances of something?
I know * and + just not specific numbers
 
@rad do you mean space or whitespace? space would [ ]{4} to match exactly four of them
 
rad
@Gordon I meant a single space, thanks :)
 
@daverandom still interested in going to phpnw? Got a spare ticket for sat/sun
 
@Gordon sorry, I was away for some time. I updated it to use "All" instead but it still wont' work codepen.io/anon/pen/BnIAE
@Gordon sorry nothing anymore
got it working with your code :D
 
5:52 PM
what is cv-pls
that tag does not exist
 
Is there a list of tags somewhere?
 
thanks
I meant chat tags. I probably won't use them, but I've seen expression tags. I'm curious how to enter them and if there's a list of them (maybe that is the list, but it seems like just post tags).
 
5:59 PM
[anything-I-feel-lik?]
 
I looked there. Still don't know how the box gets created. I'm starting to feel silly taking up all this room for a simple question.
 
[tag:like-this]
 
I have this code: print htmlentities(file_get_contents($_SERVER["QUERY_STRING"])); but I found out that its quite dangerous
the user may find out source of any php file
how could I avoid that the user cannot use my server files, only external urls
 
@Olli check for protocol?
 
how
 
also use htmlspecialchars() instead and add the encoding
@Olli Look on SO. It should be there
 
how I should add encoding
 
6:10 PM
@Leigh I am now irrevocably committed to doing something tomorrow, which and just the Sun feels like a bit of a rip :-(
 
@Olli see the docs for htmlspecialchars
 
I do not know the encoding
it depends the site
 
What are you trying to do? Some sort of proxy?
 
no
 
@Gordon Not had time to look at it yet, hoping to get round to it on Sunday.
 
6:12 PM
Some RSS feeds in web are made way that if I go to it by browser, it will force to download it
and sometimes i just want to view
and i'm doing this for it
 
@DaveRandom
 
it's not wrapping very well: [tag:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa‌​aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]
 
@Olli Sounds like either crappy RSS feeds or a crappy client
 
@dave no problem, ticket will go unused then. Will maybe advertise it on twatter
 
6:15 PM
If any of you are still here in 6 hours or so you can look forward to the return of an intoxicated me. Until then I bid you adieu.
 
yes but I want just to get the code work
how can I avoid user going to my server resources
 
@DaveRandom later
 
@dave no I bid you a jew!
 
@Olli add a whitelist
 
6:18 PM
@Gordon How i can add whitelist for all external urls
 
@Olli oh, so you allow any url? what is it you are doing there precisely?
 
how can I do that
 
@Olli Check the protocol
10 mins ago, by PeeHaa
@Olli check for protocol?
 
7
Q: PHP Get Site URL Protocol - http vs https

anon445699I've written a little function to establish the current site url protocol but I don't have SSL and don't know how to test if it works under https. Can you tell me if this is correct? function siteURL() { $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVE...

this cannot work: $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
 
6:21 PM
Or better named scheme
 
what about this?
do you think its good enough
 
Or a simple strpos() === 0 would also do
 
do you think its safe enough now:
<?php
$url = $_SERVER["QUERY_STRING"];
$parse = parse_url($url, PHP_URL_SCHEME);

	if($parse == "http"){
		print htmlentities(file_get_contents($_SERVER["QUERY_STRING"]));
	} else {
		print "Err . Not supported scheme ".htmlentities($parse).".";
	}
?>
 
It's only going to be http:// or https:// right?
 
only http
 
6:25 PM
Why?
 
i do not need it for https
 
I am confused. Why are you putting the entire query string in there instead of just some param, like for instance url?
 
but is it safe enough now
since its easier to write just ?wefwef
than ?url=wefwef
 
Easier? It's coming from somewhere else you just said?
 
@Olli yeah, its also less standard compliant
 
6:26 PM
Now I'm also confused
 
its ok for me
I have a JS page and there is AJAX queries after countdown has completed.but for some reason, I need to switch to that tab, and only then it queries AJAX
Why that
 
Less questions and moar research. Aaaaand it's gone
 
@Olli
 
URLs in this chat should be automatically converted to the page's title
much nicer
 
@Olli what would your reaction be if your mechanic would put a ballon instead of an airbag into your car with the words: it's ok for me? I mean standards are there for a reason.
 
6:29 PM
:D
but could you respond to my JS question now
 
@Olli You could do it yourself.
[Live Weather Display using CSS, jQuery and PHP - CSS-Tricks](http://css-tricks.com/live-weather-display-using-css-jquery-and-php/)
 
evening
 
6:44 PM
@tereško Hola! Beer time?
 
yes , yes it is
 
nice
 
i just brought out bottle of beer and some blue cheese
 
Perfect way to start the weekend I would say
 
now i have whole weekend to plot where my next mortgage payment will come from =/
 
6:49 PM
lol
That bad?
 
it's not at the "rob the bank" level , but i have been neglecting any fruitful activities and if i do not find anything appropriate then i will not be able to pay my bills in december
 
@tereško blue cheese :/
 
You don't have a job ATM?
 
freelancer
 
Ah k.
 
6:53 PM
In Fowler's article: martinfowler.com/articles/… I'm surprised he seems to favor service locators. I appreciate his practicality but I don't know if I understand how to mock service locators properly. Does anyone have a good link for that?
 
@Stephane If you're looking for how to mock things, you're in the right room
2
 
haha
Did I miss some troll-baiting?
 
How do I determine if a image URL ( static.tumblr.com/lsuaio0/0pjm520gr/… ) exists?
 
@SomeKittens can't you pull it and see what the response code is?
 
@Stephane I had file_exists() which claims to work with URLs. (I was told that we only used local files. That is the exact opposite of what happens)
 
6:56 PM
curl? <- probably a terrible suggestion
or you could use ajax, but that doesn't seem like it would help you
 
Nothing wrong with cURL (besides the terrible APi)
 
@tereško, I'm about to start a huge project and I might be willing to pay you to help me get it set up properly (in terms of DIC, structure, what have you) in a mentoring way.
 

« first day (720 days earlier)      last day (4222 days later) »