« first day (532 days earlier)      last day (4430 days later) » 
00:00 - 20:0020:00 - 00:00

12:11 AM
nite
 
12:23 AM
gods below
i have been reading up on my RSS backlog and right now going through stuff from PlanetPHP
its like 99% crap
 
hehe ofc it is :P
 
and the rest of articles are about ideas and tech that was old 2 years ago
 
@tereško I call that retro
 
i call it "bullshit"
 
BTW did I forgot anything?
7
A: how much research should be done before asking

RepWhoringPeeHaa My standpoint is, I'm asking the question as soon as: I feel comfortable and safe in the subject at a whole. I have some background knowledge about the question. I am quite sure that the question is not a stupid one. I am sure that the question will be valuable for others. The ...

 
12:26 AM
do you expect me to read it ? at 3am
.. oh well .. gonna give it a shot
@RepWhoringPeeHaa , it's extent , not extend
needs link to "help vampire" definitive document
 
What? I'm extending it! ;)
@tereško do you have the link ready somewhere?
 
12:43 AM
@tereško hi
can you check pastebin.com/VxpAae6u I can't find my error ... it echo on my page just before my form (where my code is in my html)
 
@Delarn In PHP we concatenate strings using the dot ..
$name = $_POST['prenom']+ $_POST['nom'];
should be:
$name = $_POST['prenom'] . $_POST['nom'];
 
used to js ... thanks
still printing ... grrrr
 
what is it printing?
 
oh and the 'prenom' must = what in the html code ?
this :: Your message has been sent!
'; } else { echo '
Something went wrong, go back and try again!

'; } } else if ($_POST['submit'] && $human != '4') { echo '
You answered the anti-spam question incorrectly!

'; } else { echo '
You need to fill in all required fields!!

'; } } } ?>
 
can you paste it again with fixed font pls
 
12:49 AM
it print that in my index.html
Your message has been sent!
'; } else { echo '
Something went wrong, go back and try again!

'; } } else if ($_POST['submit'] && $human != '4') { echo '
You answered the anti-spam question incorrectly!

'; } else { echo '
You need to fill in all required fields!!

'; } } } ?>
 
$subject = $_POST['objet'};
should be:
$subject = $_POST['objet'];
aren't you getting syntax errors???
 
are you kidding me I did that mistake ?
 
Well. I know it wasn't me :)
 
I was hubber angry while coding yesterday ... lol
how can I send you an image of the screen cap?
 
12:54 AM
what is that ?
 
found this in the PlanetPHP backlog .. looks like 5+ years old .. come from 10 days old "news item"
@Delarn , it is an article
 
yeah but why the oh f why?
 
articles are like huge collections of letters , which form paragraphs
 
lol
 
because it is horrible
 
12:55 AM
Why you reacted like that
 
@tereško hahaha. although sad I LOL'ed
Posted on: 2012-03-21
Had to check it and you seem to be right :)
 
@Delarn , because the more fitting title would be "object oriented programming for php4"
 
oh!
I append to have a book of when php4 got out
I am reading it ...
 
and it is kinda disappointing that you had to asl
> I append to have a book of when php4 got out
that didn't come out in Enlgish , @Delarn
 
I am thinking in french
I have my week behind ...
 
12:58 AM
bad .. you should be able to think in all languages you know
 
Can't think in english ... I'm altavista.babelfishing my brain
 
@tereško OMG why have I just read that stuff. It´s all bad. Even the comments.
 
I know ... bad french guy, bad bad ...
 
well ... ok , i admit that i cannot think in german .. too little exposure
@RepWhoringPeeHaa , i just skimmed over the code fragments
i guess i will have to actually read it
 
I have made all my day in french and my brain feel like a p3 with windows me on it
and 256mb of ram
if in my if mail, the mail() was written mail () can it be the problem?
 
1:05 AM
var_dump ('foo'); works just fine
 
ok
I'm not used to php so I am noobing!
@RepWhoringPeeHaa is that site good to learn php?
 
@RepWhoringPeeHaa , yes , it is all bad
 
@Delarn if that post represents the entire site: no!
 
what good site to learn php?
 
1:12 AM
thanks
I got a vital question: in this line $var = $_Post['name']; what the name should represent in html?
sorry if I reapeat the question ...
reading docs ... will find by myself
thanks
 
its actually $_POST['name']
and the 'name' come from:
 
$_POST is my form method? and is an array?
 
<form method="post" action="" >
    <input type="text" name="name" />
</form>
 
ok so the post method create an array and I gather the name of the array that is set by name=
 
you can always do var_dump( $_POST ); and see what you got
anyway, the best way to learn php is by trying to makes something ..
 
1:25 AM
like my mail handler?
 
explain to the chatroom , what you want to create , and people will point you in right directions
 
I want my form to send an email.
lol
 
do you have your own webserver ?
 
I got a host that got an apache server
 
or are you using some 3rd party hosting
@Delarn did you configure it yourself ?
 
1:27 AM
RewriteRule ^([^/.]+)/?$ ?featured=$1 [L]
any idea off first look why that may not work? after
 
no
 
after wordpress rewrite, which is leaving it at page/?featured=subpage
 
then the mail() function work
@Delarn , did you try to make a script that only sends a mail ?
 
should I make my own webserver
 
no
 
1:29 AM
ok
no I did not. I thought it was like js ...
 
how is that related to anything ?
 
php is server side scripting if thats what you mean
 
I thought php was like js, I did not know it had to be tested online
 
@Colby you have an URL which ends in an ?
 
well the base page before rewrite is work.php?featured=print, but wordpress rewrites the file so it ends up work/?featured=print, but i'd like to further clean that up to work/print
 
1:32 AM
@Delarn , you dont have to test it online. Thing is that using mail() function will require you to configure php .. which might be too hard for you ATM
thats why i asked if you are using some 3rd party hosting
 
ok
I understand
 
you CAN test php locally
i do
 
but I need a configured apache server
 
or configur eit on your computer
 
no, you can run php files from shell too
 
1:33 AM
@Colby What should this match:
^([^/.]+)/?$
?
 
whats that ?
 
the form I am working on
you can see the error I get (the printed php code)
 
well .. shouldn't the extension for the file be *.php ?
 
@RepWhoringPeeHaa perhaps i misunderstand how the rewrite works, i was thinking whatever the contents of $1 would be as a variable would replace that when live
 
1:36 AM
its *.html now
 
I get the same error
 
is the php module loaded ?
does your hosting provide PHP ?
 
@RepWhoringPeeHaa RewriteRule ^work/([^/.]+)/?$ work.php?featured=$1 [L] <- before porting my site to wordpress I used that and it worked properly, my thinking was to remove anything to do with work because it was already being rewritten
 
I got a wordpress on this site
 
1:38 AM
^([^/.]+)/?$
matches urls ending with a ? at the end
 
just saw
why is that
 
ah... gotcha. ill haev a read through that, thanks
 
yo
 
yo!
 
1:40 AM
I have a headache now !
 
jo @ircmaxell
 
sup?
 
@Delarn , because php files are interpreted , but html files are not
 
ok... but is there a way to hide we used a php file behind html?
 
@ircmaxell nothing much. Just read a funny (read sad) article: phpclasses.org
 
1:43 AM
...?
 
ok now mail can only have 5 parameter ...
grmflgrawrgrfrfl
 
found it in my RSS backlog
such a life-assuring blast from the past
 
ok it say it sent my email but got nothing does it have to be in site email?
 
from the past? That was a few weeks ago
 
1:49 AM
check the apache's error log , @Delarn , there might be something wrong with your code or servers setup
 
ok
I got a file does not exist error ...
arrrgggghhhh
 
ok closing this now and making changes
 
nite all
 
IT WORKS !!!
@tereško send me a mail to test please !
I just sent me 3 email and it work ... great !!! now translating the text and showing my boss...
 
2:46 AM
Will include './file.php'; always ensure that the file 'file.php' from the current directory is loaded?
 
@GeorgeEdison include __DIR__ . '/file.php'; will
 
Ah, thanks.
That appears to have been added in PHP 5.3.
Is there an equivalent for PHP 5.2 and earlier?
Oh, never mind - reads the docs...
> "This is equivalent to dirname(__FILE__)."
 
 
1 hour later…
4:12 AM
Note to self: PHP's implementation of namespaces is... interesting...
 
@GeorgeEdison I've forgotten all the things that used to bug me about it. I'm just using it now.
 
4:32 AM
I used the following code to remove script, link tags from my string,

$contents='<script>inside tag</script>hfgkdhgjh<script>inside 2</script>';
$ss=preg_replace('#<script(.*?)>(.*?)</script>#is', '', $contents);
echo htmlspecialchars($ss);

it works fine. But when I use the below code, it output nothing.

$contents=file_get_contents("http://www.promobubble.com");

Is any thing wrong with the code?
 
1112
Q: RegEx match open tags except XHTML self-contained tags

JeffI need to match all of these opening tags: <p> <a href="foo"> But not these: <br /> <hr class="foo" /> I came up with this and wanted to make sure I've got it right. I am only capturing the a-z. <([a-z]+) *[^/]*?> I believe it says: Find a less-than, then ...

@user1156468 Apart from parsing html with regex being a really bad idea generally (see that question). The regex looks like it should work and it seems to work for me.
 
 
3 hours later…
7:26 AM
hello
I have a php file on the server side, I want to call this file via my application phonegap, I'm coding with javascript.
How can I call the file and exactly the function that I want?
 
7:59 AM
can i crack string which in encode in SHA-256?
 
 
3 hours later…
hiho
 
damn .. there was snow outside today
 
morning
and morning @edorian
 
12:52 PM
hello
 
1:34 PM
hi @tereško
 
oh .. he's back
 
hey
Hey
Let's say we have a class
class Classname
{
public static methodName()
{

}

public simpleMethod()
{
$this->methodName
}
}
how can I call static method from simpleMethod?
$this->methodName(); doesn't work
oh no, it works, sorry
oh no, it doesn't
 
@hey Why do you even want to use static? (It will destroy your OOP).
 
hey
@Paul: I have to use static, so I could call it one time from Views
why is it really bad?
 
1:50 PM
@hey So, you are using it to give yourself global access to the method?
 
hey
@Paul: Yeah
 
thats stupid
 
hey
can you at least tell me why? thanks
because I want to check if user is logged in
if he is logged in, i am gonig to show some stuff
and I use AppController::loggedIn() in views
@tereško
 
that makes no sense what so ever
 
@hey OOP is about creating real objects. You interact with these real objects through the public interface that you create. Static breaks this by making an interaction (method call) for every object of a particular class available globally.
 
1:53 PM
if you have authentication service , and controller needs something from said service , then you provide the controller with instance of it
 
hey
ok, so how should I do this. If user logged in, show him menu, if not, don't show him.
 
instead of referring to the real object generally a static call is made like: Classname::methodName(); // where is the object there? (its not there, its not OOP)
@hey I treat logged in status as data that comes from my model.
@hey btw, the reason your code snippet didn't work was you missed the function keyword
`public [static] function xxx()`
 
a wrong answer is getting piled on
3
A: Looping a json encode filtered by type

xbonezIf the entire array is stored in a single variable in JS, you will have to loop through all key-value pairs, whether they have the ID you want or not. You would need to check each kvp for the ID you're looking for. Something like this foreach(var key in bdata) { if (key.id === 4) { ...

 
hey
@Paul: Actually I put function, it still didn't work
I started to use PHP 5.4 and got this error: Warning (2): Illegal string offset 'date'
 
hey
2:04 PM
oh i found a bug, cool
 
hey @KamilTomšík
 
hey :-)
@Paul :-) kinda funny, oop was "invented" in 80s, still there is enormous number of people unaware of what it is actually about
it's also kinda sad to see OO courses teaching java or even c++
 
@KamilTomšík Definitely, I think less than half of the PHP programmers I see really understand it. I made a lot of mistakes getting to where I am now though.
 
2:20 PM
@Paul lucky guy, I only know a few of them :-)
 
People get tempted too easily by trying to use it to inherit code. People should just stick to making software that makes animal noises and barks like a dog.
 
@Paul is this a fukcing joke ? Less then half ?
i would be surprised if even 5% of php programmers understood it
 
A. Kay summed it pretty nicely - every other science subject starts with history, people are required to learn everything from ground up, how many programmers ever tried smalltalk or lisp?
and how can they pretend what oop is about if they never programmed in real oo language? by real oo I mean at least "everything is object, everything is done by sending messages"
 
@tereško true, 5% is fits my less than half. I was being overly generous though.
 
@KamilTomšík , that part isn't really a problem , because Ruby is close enough to be called OO language
and so is Scala
 
2:26 PM
@KamilTomšík Isn't lisp what you'd call functional programming?
 
@Paul yeah, that one applied for FP
@tereško is scala built around idea of messages?
 
the Scala part in my statement was an afterthought
all the interaction with it that i have has been a single lecture and 2 articles i read ... thats about it
 
@tereško ruby is closest wide-spread smalltalk-like language, still it's way less powerful
@tereško I'm not scala guru either, but from what I know, it's more FP than OO.
 
side note - getting Visual Studio out of your operating system is a PAIN
 
anyway if you havent already, give it a try - seriously, for me it was very enlightening.
 
2:34 PM
my current academic project is "learning erlang"
 
@KamilTomšík ruby? or smalltalk?
 
@Paul smalltalk
 
hang on, both have ugly syntax. I dislike anything that is too far from PHP or C++ syntax.
its shallow, but I enjoy writing things that look pretty.
 
poor thing
 
@Paul you're partially rigth, smalltalk has ugly syntax... or at least what you consider being code is ugly, truth is that you're not writing code, you're sending messages, you can (if you want) write your own parser with syntax you like
btw: I thought smalltalk or lisp syntax is too weird to get used to it, well I was wrong about both of them. It took few days for the first one and aproximately 60 book pages for the other one :-)
 
2:42 PM
@KamilTomšík Smalltalk will be my next choice to look into if I need something other than PHP or C++. I guess it runs pretty fast too.
 
and I'm pretty proud I suffered that, totally was worth of it.
 
i use lisp, but I don't look at my lisp code and feel any pleasure for it.
 
@Paul fair, me neither however I do for st code :-)
@Paul this is my favorite, have a look pharocasts.com/2010/07/live-testing-with-autotest.html
 
@KamilTomšík i can imagine that. Maybe I'll give it a go if I get a tiny personal project that could use it.
 
@Paul in that case, start reading with this: book.seaside.st/book
 
3:02 PM
@KamilTomšík I started reading, but I'll have to wait till I find time. Right now its time for me to go to bed. Goodnight all.
 
@Paul U2
 
@Paul night
 
4:04 PM
Good afternoon
 
this is so damned sad : lynda.com/CakePHP-tutorials/…
 
4:18 PM
hmmm
interesting
(Not the content of course but that there is supposedly money in creating these kinds of videos in the php world)
 
yeah , there seems to be some
 
:-)
 
4:33 PM
@MaxToro , the content quality is quite low .. flagged as spam
 
@tereško what does persist in doctrine in symfony do?
 
ok simpler can i comma seperate var declarations?
 
@MaxToro Seems like a new site
 
protected $var1,$var2;
 
4:42 PM
 
:D
I never thought someone would spam here.
Because there are very few people chatting
 
might be for SEO
 
Yeah
 
does seo even work most of the time? good web design would help bring more IMHO
 
I was thinking to add one of my blog post there.
manual SEO works. Its slow. But works best
 
@Keyne twig is pretty awesome :D
 
Persist is from doctrine not Symfony. You should read the doctrine docs instead.
 
Seems the happy questioner forgot to feedback
1
Q: can't call the second function in controller codeigniter

ranggadabluesI'm new in codeigniter I have problem I use my OS X Lion, and I use .htaccess I can call directly localhost/site_folder/ it works like charm, but I have second function in my controller but I can't directly call that function like this localhost/site_folder/function2 here my controller class M...

 
@Keyne if i do a persist and them do some changes in the object , those wont be committed when i do a flush?
 
Why this room has so few users?
 
4:49 PM
@Shiplu i think its more active at other times of the day not sure
 
@anonymouslyanonymous They will. Actually if you do not call "persist()" you'll lost the object.
You need to ask the ORM to manage that object for you. That's done by persist()
 
Check this query, You'll understand when SE sites are most active. data.stackexchange.com/stackoverflow/query/60106/…
 
@Shiplu , its weekend , but we rarely have more then 30 users .. if you are looking for crows , then you will feel better in ##php on FreeNode server
 
@Keyne one more thing , in my routing.yml for a bundle....i set the pattern as / and the controller action handled that route properly...but it only shows in Symfony/web/app.php/ it shows that default welcome thing in app_dev.php/
 
@Shiplu There are feel users with the "fanatic" badge =P
 
4:53 PM
:P
 
@anonymouslyanonymous I'm not sure about what could be happening. You need to figure it out =)
 
what is "feel user" ?
 
few =)
 
heh .. i have 3 gold badges =P
 
I few feel you bro.
Can I request non PHP cv-pls that reaaaly deseve it?
 
4:58 PM
@Keyne just one more thing...is there some reference for how to write those Entity.orm.yml files? the documentation in symfony covers very little
 
@Donut there are other tags to we use too .. one is dv-pls .. as in "downvote in submission"
 
@tereško I see! ^^
 
cv-it
how to show tags?
 
[tag:text]
 
5:01 PM
aha!
 
@anonymouslyanonymous There is, and it's called doctrine annotations and you will find everything on their site docs.doctrine-project.org/projects/doctrine-orm/en/2.0.x/…
 
wow. seems any text will be converted to tag.
Good
 
To keep compatibility, use cv-pls.
 
now whats delv-pls ?
 
5:03 PM
Delete vote please
 
@Shiplu , if you see tags , or it means a community garbage duty
you might notice that a lot of closed php topics have a few frequent closers .. this is why
 
Can anyone help me with .htaccess file? I have these lines in my htacess file in httpdocs directory. I restarted apache server but still no luck it doesnt rewrite url.
Options +FollowSymLinks
RewriteEngine on
RewriteRule deal-id-(.*)\.htm$ deal.php?id=$1
 
Sam
@ErselAker did you define the RewriteBase option?
 
@Sam What is that?
 
5:18 PM
Wow, sometimes I'm amazed at my own stupidity
 
@ErselAker , what permissions do you have for using htaccess ?
 
Sam
@ErselAker according to my understanding, anytime you define a RewriteRule via htaccess, you need to specify the base folder for which the rule will apply
 
@ErselAker , this might be the reason : httpd.apache.org/docs/current/mod/core.html#allowoverride
@NikiC , thats what you get for high expectations
 
So I should include AllowOverride All line to my htaccess or the ones at upper directory levels? @tereško
 
Sam
@ErselAker if that doesn't work, you can try this: httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritebase
 
5:24 PM
AllowOverride FileInfo would be enough
 
Does anyone know any online JSON data visualizer?
 
AllowOverride All caused an internal server error @tereško
 
@ErselAker , did you check if error was caused by changes in httpd.conf or the existing content in .htaccess ?
 
I didnt change httpd.conf? Do I have to change that in order to work?
 
"community garbage duty" - I like
 
5:31 PM
@ErselAker , did you used some tutorial to find out how to set up mod_rewrite ?
because you sound extremely confused
 
No, If you can point me to a tutorial. I would be glad. I am new to this stuff.
 
user1385191
docs > tutorials
 
user1385191
unless the docs are MySQL's docs
 
user1385191
…yuck
 
5:35 PM
thanks @Sam
 
Sam
no problem
 
7:07 PM
howdy
 
7:23 PM
Hello folks
So, despite the fact that 5.4 now supports (new Foo())->bar(); method invocation, it seems it doesn't support assignment before invocation; such as
($foo = new Foo())->bar();
 
@Bracketworks Thank god
 
@NikiC Unexpected response; why's that?
 
@Bracketworks It's the same as $foo = new Foo; $foo->bar(); just with obfuscated syntax. You shouldn't use it, even if it were possible.
 
Hmm; I wouldn't call it obfuscated; you can convolute things more easily elsewhere.
Either way, I see your point; I'm just becoming accustomed to C#.
 
We had that discussion whether we want to allow that on the list
The conclusion was that it's only reasonable if we accept all (expr)->method() syntaxes
As in that case consistency would be an argument
 
7:29 PM
@Bracketworks , please, stop chaining methods in any language
it is a bad practice everywhere
 
@tereško Absolutely not :)
 
just because you can do something, doesn't mean that you should
 
Certainly; but I'm an advocate of the fluent interface design.
 
@Bracketworks , then do and ask for help here: w3schools.invisionzone.com
 
As long as it isn't counter intuitive, if it would return void, it should return this
@tereško You're a funny fellow :P
 
7:32 PM
@tereško :D
 
@tereško Silliness aside, why do you find chaining to be a problem? Readability?
 
readability and common sense
 
Readability I can accept that; common sense seems like something tacked on for effect.
Could you elaborate?
 
single statement should do a single unit of work
 
@tereško I suppose that is true; I've never honestly found an instance where method chaining has proved to cause maintainability issues, debugging issues, or even readability issues; rather, on the point of readability, I find it helpful, though I understand readability is subjective. People have different preferences of code aesthetics, and most IDEs will fix that.
I guess I simply don't equate the granularity of work units with statements.
 
00:00 - 20:0020:00 - 00:00

« first day (532 days earlier)      last day (4430 days later) »