« first day (1565 days earlier)      last day (3386 days later) » 

1:03 PM
@Patrick I am agree a getPath() method is very useful
 
how to set TimeOut unlimited in .htacess ?
 
@animaacija php_value max_execution_time 0
@animaacija bad idea though and probably resctricted by the host ( thats possible right? )
 
@ThomasDavidPlat @PeeHaa github.com/PatrickLouys/http/blob/master/src/… I messed up the interface... :(
 
Staph messing up teh intarface!1111
 
@Patrick oh - I actually really meant a method that fetches the $_SERVER key PATH_INFO :)
 
1:16 PM
@ThomasDavidPlat I never understood why that is useful?
Unless you are mapping requests to files 1-on-1
 
Hello, how can i check if a directory has files (Not sub directories) ?
 
Guys, is it possible to run a website using GitHub as a store of files?
 
yes, look up "github pages"
 
@HassanAlthaf google github pages
 
@ThomasDavidPlat never had to use that. what do you need it for?
 
1:17 PM
@PeeHaa you were ninja'd pretty hard
 
@HassanAlthaf do you mean your app or just a simple site?
 
@PeeHaa done. What next? (I'm a program, you've got to instruct me with step by step instruction). Just kidding, I'm Artificial Intelligence.
@Patrick a web app.
 
@FlorianMargaine Asshole! :)
 
nah you'll be limited to markdown pages from my understanding
 
Noticing it is one thing rubbing my nose in it is a whole new level @FlorianMargaine :P
 
1:19 PM
@PeeHaa that's my level, son.
 
@HassanAlthaf that won't work. you need to have your own server for that. But you can have a deployment script on there that pulls the newest version from github
 
Oh, how sir?
 
Look it up dude
 
@FlorianMargaine :D
 
I thought I muted you what happened
 
1:20 PM
@MarcelBurkhard I am anonymous. I bypassed it. Jk
And the last basic thing left in my project. Reversal of Transactions. Woop!
 
yeah of course and then its finished, ahaha
 
@HassanAlthaf Have you fixed your CSRF vulnerability yet?
 
.. sry
@PeeHaa considering he doesn't google anything I don't think he even knows what CSRF is yet
 
@MarcelBurkhard =] I disagree
 
1:23 PM
@RonniSkansing I don't think not telling him he is doing it wrong will help him more
 
@PeeHaa what is that? Let me google it. And where is the problem at?
 
@ThomasDavidPlat why would REQUEST_URI not work?
 
@RonniSkansing you see... I was right :D
 
@MarcelBurkhard change takes time [=
 
1:25 PM
^^
 
@PeeHaa where is the problem at? I'll fix it immediately.
@RonniSkansing I am gonna actually finish my first project. I usually stop projects in the middle and delete them. lol
 
@HassanAlthaf owasp.org/index.php/Top_10_2013-Top_10 bookmark this
 
@Patrick I think REQUEST_URI gives you the script name, too (?) Since I was just playing I haven't set up URL rewriting and was using PATH_INFO
 
yea @HassanAlthaf it is going to be great, keep coding
 
@Patrick Done, what next?
 
1:26 PM
read it ;)
 
@HassanAlthaf How do you prevent me from deleting stuff when you are logged in?
 
@Patrick I guess I'll do it once the whole system is done, and I will be doing a lot of fixes.
@PeeHaa how can you delete stuff when I'm logged in? o_O
 
I am gonna put the whole GitHub for codereview.stackexchange.com
LMAOOO
 
this is why I linked you to it... you need to secure your app against all of those
 
1:29 PM
@HassanAlthaf you can't, but good luck :D
 
Oh. I just read some things about PATH_INFO. Using it was a horrible idea ...
 
@HassanAlthaf you can't put that much code in it and if you just link it they're gonna flag the question
 
@MarcelBurkhard yes it not work
 
@animaacija have you tried .user.ini (max_execution_time = 0) or simply the php function max_execution_time(0); ?
 
yes
 
1:32 PM
@ThomasDavidPlat yeap
 
i have ignore_user_abort(TRUE);
ini_set('max_execution_time',0);
ini_set('max_input_time',0);
set_time_limit(0);
ini_set('post_max_size','600M');
ini_set('upload_max_filesize','600M');
 
oh yeah I meant set_time_limit sry
^^
@animaacija does it end after some minutes or after 30 seconds?
@animaacija because some hosters have a soft limit which you can exceed with ini_set and the likes and a hard limit you simply cannot get over by any means
@animaacija "FastCGI processes will time out after 5 minutes"
@animaacija are you trying to import a sql dump by any chance?
 
if($this->users->userOnline('Marcel Burkhard')) {
    echo "You were right!";
} else {
    exit();
}
 
bah, public vars!
 
@MarcelBurkhard my timeout was more than after five minutes, No just scrapping parsing and to database ... maybe database connection opened for too long ?
 
1:37 PM
@Patrick ;D :P
 
@MarcelBurkhard look again ;)
 
@MarcelBurkhard serverfault.com/questions/663006/… this is my post and error_log i get
 
@Patrick ah damn.. xD
@Patrick $this = new SomeOtherObject(); :P
 
ATLAST
All transaction and ledger account related stuff is done.
Trial Balance thingy also done.
Now, have to create a system where the Income Statement and Statement of Financial Position is recorded.
 
@HassanAlthaf or fix your security issues first ;)
 
1:40 PM
@animaacija definetly has nothing to do with max_execution_time judging from the error message
 
Yeah, I guess that.
Let me just update the menu first.
 
@animaacija it would be "Max execution time of 30 seconds exceeded in somefile.php at line bla" or smth
 
@MarcelBurkhard o! This error log was black hole for me :)
i try again with these properties ini_set('max_execution_time',10000000000000000000000000000);
 
@animaacija I don't think it will help
 
There we go.
 
1:43 PM
Uuuuh phpng doesn't have a jit right?
 
@MarcelBurkhard What can you see in that error log? So is that "execution time of 30 seconds exceeded" ?
 
I am feeling good after so much effort.
Haha
I'll pray now and fix those stupid security issues
 
I found this one @MarcelBurkhard and so it said to config apache ..
 
@animaacija I can see that php max_execution_time is not the limiting factor but that something else timed out after 900 seconds, It might be some internal request to fastcgi process or mysql but I don't know that
@animaacija sounds promising, try that
@animaacija actually that you don't have to wait 900 seconds set it to 2 minutes and look if the error message is similiar to before, If yes set it to something high and look if your script goes through
 
@MarcelBurkhard yes but how to set .htaccess that to unlimited
 
1:46 PM
@animaacija you can't, no access to apache config?
 
only .htacess file, as far as i know
Just runned.. my process for 7 exact minutes and again stopped.
 
We0
Hey guys, I got my phpunit working perfectly etc, but I can't remember what the doc block should look like (haven't written test cases in 3 years). Anyone got a resource for good coding standard doc block examples?
 
tests docblock, like @expectedException ? You can find that in the phpunit docs
 
We0
Na, more like the standard like, @covers and Testing that the functions blah blah blag
 
it is in the phpunit docs
look up at need =]
 
1:51 PM
@MarcelBurkhard here i can but how to set unlimited ? And whats the synthax
 
We0
@Patrick I agree except it is a composer package I made and want it properly documents
@RonniSkansing I am fine with the annotations for the test case, more interested in best practices
 
Which best practices?
 
@animaacija just try 1800 (an hour) shouldn't run that long anyway
 
@We0 Open PHPStorm, type /** before a function you want to document, and hit enter.
 
We0
@RonniSkansing thats the part I can't remember, first company we had great coding standards which applied to our test cases. With the way you discribed
 
1:53 PM
It will get filled out automatically...
 
@animaacija and you can't do it in .htaccess..
 
We0
@Danack I have it, doesn't work
 
@We0 I just write the tests with the minimum amount of annnotations I can
 
@animaacija so split the process up in smaller chunks or contact the hoster that you need a longer apache timeout
 
"Doesn't work" - it sits at home all day watching telly?
 
1:54 PM
@MarcelBurkhard then ill have to call provider
 
We0
@RonniSkansing usually don't write tests, just for the composer package I want to do it properly documented
 
We0
@Danack thanks, checking it out now
 
@We0 You really want to get it working in PHPstorm though - it saves so much time.
 
1:56 PM
@MarcelBurkhard but first i might try to set unlimited timeout on fastcgi and mysql in phpini set ?
If then not working, need to split process of give a call =/
 
We0
@Danack I have PHPStorm, 7.1 for my linux box (windows with 8 got stolen and waiting for a replacement)
@Danack for some reason it isn't working
 
@MarcelBurkhard btw how to do that and what is fastcgi ?
 
@animaacija yes, but you don't have access to php.ini right?
dont know much about fastcgi, but php is run as a fastcgi application from apache I think, you could use other compiled applications to serve html
@animaacija usually you don't have to worry about fastcgi
 
phpstorm users, what do you do when you use another language? Use a different IDE?
 
We0
@animaacija not too sure what you guys are talking about, but from what I have read I will say the remember that your CLI config is different from the web one
@Patrick the approriate intellejay product for language
 
2:00 PM
<script type="text/javascript" language="javascript">
//<![CDATA[
function HomePage(){ parent.location="/"; }
//]]>
</script>

<a href="JavaScript:HomePage()">Return to Home Page</a>
^^ Anyone wanna switch jobs?
 
We0
@DanLugg dafaq did I just read???
 
@Patrick I just use IDEA with php, python, etc. plugins
 
@We0 Something that has inspired me to seek out more gainful employment.
 
We0
@DanLugg Maybe just keep the suicide hotline number at hand
 
2:02 PM
@We0 They're sick of my voice.
 
@DanLugg I guess that works in IE 5? :D
 
One guy said "Just do it already"
 
we should start an outrageous rumour about php, like what's his name at phpclasses, and see what it takes to make it stick ...
 
@MarcelBurkhard So would <a href="/">the fucking homepage motherfucker</a>
 
2:03 PM
like it's gonna have built in quantum math operators, or something like that ...
 
Back.
 
@MarcelBurkhard well yes, i have only ftp access provided and some sort of web platform where to manage database users and some few stuff
 
We0
@DanLugg Made me feel better today
 
I just found out such a serious security flaw!
 
@FlorianMargaine it doesn't ...
 
2:03 PM
@JoeWatkins that it's being renamed PHP "6"
 
@HassanAlthaf one of many to come :P
 
@JoeWatkins thank you. I thought I was losing my sanity.
 
that was a rumour started by the guy at phpclasses
he monthly spouts a bunch of nonsense into the ecosystem, sometimes it sticks ...
 
I see...
 
@PaulCrovella Quotes included.
Of course.
 
2:05 PM
!=! the not not operator
 
natch
 
@RonniSkansing to transform any value in a boolean :P
 
!==! the not really not operator
@FlorianMargaine not completely unlike the doublebang
 
How about: Zend has been secretly working on core macro support to benefit ZF, and don't care about the BC break that #comments will cause.
The issue is, they'll probably start working on it.
 
(!!=) == (==)
 
2:08 PM
in HTML / CSS / WebDesign, 7 mins ago, by rlemon
@mikedidthis seen this right? http://imgur.com/gallery/vFUh4
 
@We0 what is CLI ? The issue is long php process
 
@MarcelBurkhard Take that Lisp elsewhere.
 
@MarcelBurkhard if($mh ?!=)
 
why isn't it called Lithp
 
@MarcelBurkhard fixed it man.
Ronni
 
2:11 PM
@DanLugg that ain't lisp. Lisp would be (== (!!=) (==))
:P
 
@RonniSkansing you active man?
 
someone doesn't want pecl http in core? wow
 
Could someone with a pin, pin that to the top? Thanks :)
 
Someone recommend me a good package for captcha?
 
2:18 PM
@salathe If PECL http isn't included in core because more PHP-FIG members turn up to vote against it, I will probably shit my pants laughing at the hilarity of this universe.
@HassanAlthaf It may not be good, but it's good enough: phpcaptcha.org
 
@rdlowrey It's just one header. Mixed content is another thing.
 
lichess has my favorite captcha.. you can probably extract it from github.com/ornicar/lila (though I doubt you're looking for a chess captcha or scala)
 
can you guys please help with this issue, i have a java-script variable , when i print it , it is empty, when i test for empty == "" the test fails, when i print it's length it prints 1. I am sure it is empty tho ... What's could be the problem ?
 
DHL just brought my QNIX :)
 
I want script that could crawl my entire website and open all the links once so that cache could be maintained automatically on my server , any help
 
2:25 PM
@Danack well, is it just a blind inclusion of PECL http in core, or should the API be ... bettered?
 
@DanLugg the vote is for bundling pecl_http (version 2) into core as-is.
@Danack I wonder how many FIGers can vote...
 
if ($karma) vote(false);
 
@DanLugg I believe that he hasn't spoken on the internals list about it, so I can't tell why they voted no.
@salathe Obvious joke is obvious: "too many".
 
function vote ($karmaService, $bool) {
if(!$bool) {
$karmaService->reduceKarma();
}
}
 
@HassanAlthaf whats up? Watching a doc about "webjunkies" in China and their camps where they "cure the disease"... scary stuff
 
2:29 PM
@Danack So far, 100% of FIGers (who have voted) have voted against inclusion into core :P
 
@salathe Marco is an FIGer?
 
How does one get voting rights beyond writting php-src?
 
you just need a php.net account
 
how many people have voting rights?
 
2:31 PM
@PaulCrovella Not a joke: too many.
 
to get it, you need to do some open source... like doc help, php-src PRs, etc
 
Thanks @FlorianMargaine
 
bugs triage, etc
pretty much everything works tbh
 
Yeah, i don't get why you wouldn't want http in core. It's less useful as PECL
 
I sit in here and occasionally make a snarky joke. That should count for some sort of karma.
 
2:33 PM
yes
 
@PaulCrovella it probably does, although not necessarily the kind you want
 
@Machavity Oh it's easy to make an argument: once something is in core it is very hard to change it, and it needs to be supported for at least 5 years.
 
@Danack Makes more sense then
 
Guys why when testing the return from an Ajax call for empty (ajaxReturn == "") the test fails also i am sure it is empty ? , testing it for length return 1 (ajaxReturn.length), any idea why ? ?
 
console.log(ajaxReturn)
if( ! ajaxReturn) ..
 
2:37 PM
@RonniSkansing i want to understand why the length test is returning 1 when i am sure the string is empty :)
 
because Its not empty
;D
 
^
hence the log =]
 
Ronni
You said I'm vulnerable to CRSF right?
 
morning
 
So, would the use of captcha do?
 
2:39 PM
@HassanAlthaf Captcha has nothing to do with CSRF
 
@HassanAlthaf can you explain in a few words how csrf works?
 
Its like, an email
Where an operation via the URL
is executed
For example
By via an image
It would be executed
 
@RonniSkansing @MarcelBurkhard but it is, i say this because i have echoed only this ( echo "";)
 
By the user who is currently authenticated
 
morning @kelunik
@HassanAlthaf no I think it was PeeHaa
 
2:41 PM
@Joseph Did you use " <?php" or did you use ?> anywhere?
 
@Joseph you output something else somewhere in the code or outside of <?php tags
 
well a captcha would help I suppose, but It has a nasty side effect: you gotta fill the captcha
use a csrf token
 
=] I said, single point of entry
 
How do I use a CRSF token?
 
2:42 PM
@HassanAlthaf yes. so on any request where something can be changed, you need a unique token that someone from the outside doesn't know
 
I see. How do you do that?
 
@kelunik yes i did.
 
Can you link me to a document or something?
 
You'll have to generate a token, when you start your session and include this into any form you're using.
 
@Patrick now wouldn't it be handy for him to have a FRAMEWORK which already provides CSRF token services? :D
 
2:43 PM
@Joseph That's probably where your .length === 1 comes from. ;-)
 
Like how? I cannot understand. :/
 
@MarcelBurkhard how would that work? you need to understand what you are trying to secure against...
 
^ this.
 
Oh, got it.
So, you generate a token every time there is a request
And then, store it in the SESSION array
 
@HassanAlthaf Another easy CSRF protection would be to verify the Referer header, but not every browser sends it for every request.
 
2:45 PM
Oh.
 
@Patrick yeah but now that he understands he has to implement some sort of token service whereas I can just call $this->get('form.csrf_provider')
 
on every form, you submit a hidden field with the token. then you validate the token like you would any other field. here is an example of a session token (new token every session) http://paste.jesse-obrien.ca/
make sure that you call regenerateToken when a user logs in otherwise it will always be the same token
 
@HassanAlthaf Once per session should be enough.
 
@kelunik you can send anything in Referer header, it's not reliable
 
^ was gonna write that
 
2:46 PM
@Patrick there is no code on that.
 
@MarcelBurkhard $this->get() ??? that sounds like a horrible thing
 
@kelunik Oh.
 
btw relying on IP address won't help either
 
@nikita2206 You can, but other sites cannot.
 
@HassanAlthaf forgot to click save paste.jesse-obrien.ca/1yAl
 
2:47 PM
@Patrick it ain't, you get the service from the service container and a standard controller is aware of the service container
 
@kelunik well that is true
 
@MarcelBurkhard why are you injecting the service container into your controller? why do you have a standard controller?
 
still If I know what the referer should be I can spoof it?
@Patrick because I need it ;D
 
@Patrick s...e..r...v....ic...e.......l..o..c..a...
 
However, you can omit the Referer header, even as an external site. So you'll have to be sure that there's a header.
 
2:48 PM
@MarcelBurkhard it's bad design and you use it because framework
 
Guys you are talking greek
 
malaka
 
Btw, how will the form
 
@Patrick ah right, now how do you do use MVC and call Services from your controller?
 
Know the CRSF code
 
2:49 PM
@MarcelBurkhard You don't use MVC :)
 
@MarcelBurkhard you use a dependency injection container that calls your controller with the correct dependencies
 
What @PeeHaa said
 
@MarcelBurkhard dependency injection. read my tutorial :P
 
@HassanAlthaf you will output it when you output the form html
 
@kelunik can you link me a website where i can paste the portion of the code that is causing me this issue please ? i don't want to paste it here
 
2:50 PM
@Patrick yeah that's what the service container is
 
@nikita2206 aight.
 
@HassanAlthaf in <input type="hidden" value="" /> tag
 
I'll put this crap on my task list
 
@MarcelBurkhard if you pass the service container, then your controller depends on it
 
it should just need the services it needs, not the service container
 
@kelunik check this please would you ? paste.jesse-obrien.ca/1yAm
 
@MarcelBurkhard if you pass in the service locator, then you are saying that your object needs all the things. That's a pretty good start to write untestable code though
 
@FlorianMargaine well, with services I agree of course and only inject what I need, but when it comes to controllers I disagree, I mean at some point you don't know what services your controller is gonna use
 
you don't know what services your controller is gonna use?
 
2:52 PM
@MarcelBurkhard sure you do
you might not know what code is run
but you know what dependencies it need
 
@Florian ofc I do but thats not the point
 
well, it is
 
@MarcelBurkhard You should know that
 
Isn't it a little cumbersome to configure every controller to use only the services it needs?
 
@Joseph Well, there's no ?> in your code, but getDirectoryApplication()."Reflet/".$_POST['base']."/version/"; is VERY insecure. You can just use ../../.. as base parameter. You shouldn't trust any input here.
 
2:54 PM
@MarcelBurkhard no? then you can see everything on first glance
makes life much easier
and by life I mean debugging
 
I can debug just fine
 
@MarcelBurkhard so how do you know what services your controller is using without reading all the code?
 
Basically my controllers are just there to call services, which themself have proper dependency injection
@Patrick In fact I don't
 
@MarcelBurkhard why not use proper DI for everything? if your approach is better, why not use it for everything?
 
You know why? Because I use symfony and learnt it that way.
 
2:56 PM
@kelunik yes but point is , there is two echos in my code, none of the necessary conditions that are required are fulfilled hence i am sure that i am not echoing anything. Yet the length test returns 1
 
Not a valid reason for the future I know
 
@Joseph did you console.log it?
look at the response?
 
@RonniSkansing yes i did, returns nothing
 
@MarcelBurkhard which is why a lot of people in here don't like frameworks (or at least the big ones) :)
 
I smell JS in PHP room.
 
2:57 PM
@Joseph I do not know the type nothing, try again
 
@Patrick thx for the input, I just looked up how to do it right in symfony, and its pretty simple
 
@HassanAlthaf sorry
 
For what?
 
36 secs ago, by Hassan Althaf
I smell JS in PHP room.
 
2:58 PM
@Patrick So what should people use if they want to create a prototype?
 
@Joseph The editor is likely to add a new line at the end while saving, if you use ?> at the end of your script, you'll have a \n as output, even if you don't echo anything.
 
it sometimes lingers on me
 
@Patrick http://symfony.com/doc/current/cookbook/controller/service.html

gonna do it that way from now on, big thx
 
You should just remove that ?>.
 
I don't mind even if I see the greekish Assembly.
 
2:59 PM
@BenjaminDiele from experience, prototypes turn into production code pretty fast...
 
Guys, PHP stands for Hypertext Preprocessor
What about the first 'P'?
 
Personal HomePage tools
 
@HassanAlthaf just fucking google it, and see the answer on wikipedia
 
lolll
 
iirc
 

« first day (1565 days earlier)      last day (3386 days later) »