« first day (1946 days earlier)      last day (2999 days later) » 

3:00 PM
basically you should end up with a setup where "project root" (there place where you as a developer put your code) is a parent directory of the DOC_ROOT
 
@Dante I think the issue there is your misunderstanding of http. I can go on /foo and load the bar file. The paths are not necessarily files on the filesystem.
 
Feb 4 at 9:06, by Madara Uchiha
@AgniScribe You have 3 options for routing
Feb 4 at 9:07, by Madara Uchiha
1. Use the default: route based on the physical paths in the system (if you have a baz.php inside of /foo/bar, you access it with http://example.com/foo/bar/baz.php)
Feb 4 at 9:07, by Madara Uchiha
2. Use the webserver (apache/nginx) for routing, which involves rewrite rules and all the "fun" stuff you read about online
Feb 4 at 9:08, by Madara Uchiha
3. Use PHP for routing, which involved writing PHP code in order to decide which files you want to include and run.
.. and no I need to make a quick run to shop, because I need kefir
 
I know Florian. I'm using the MVC pattern so the paths from http requests end up representing php values. But that's unless I actually need to request a file, say, by requesting a script or stylesheet through http.
My concern was to have some sort of last layer of security.
In case something else fails.
 
hey can somebody tell me how can i upload files to my server.... actually those are my ssl certificate...
 
3:11 PM
@tereško what did I say that made you cringe?
I'm not a senior programmer. I'm learning still.
 
Is it possible to I send an email using PHP for free? (just one word, yes or not?)
 
yes
 
Is there any limitation? (for e.x. 100 emails in month or any number?)
 
not that i know of
 
alright
 
3:19 PM
@Shafizadeh you should also note that that is also by necessity a thoroughly useless answer given you've limited to just one word.
Because the real answer is, It Depends (followed by ten minutes of disclaimers).
 
yes, there are a lot of conditions for that
i tried to tell you that but since you limited the options to one word i could not
 
@Dante because with "using MVC pattern" you probably just meant "pretty URLs"
just because you have Laravel does not magically mean that your code is implementing MVC architectural pattern
 
@tereško well yeah, I meant that because mvc generally implies using url routing or "pretty URLs", as you say. And I'm not using Laravel, I just put it as an example. I'm writing code from scratch in the mvc pattern.
So rude all of the sudden.
 
I don't get any email ... 3v4l.org/JAOae
 
3:24 PM
"Warning: mail() has been disabled for security reasons"
 
are you using an https connection ??
 
Are you really surprised?
 
:P:P
 
How can I enable it?
 
@Dante no, MVC actually implies a separation of UI layer and business model layer with UI layer being further separates in a layer responsible for handling user input and layer handling presentation (with additional constrains in what direction the information flows between those 3 layers)
 
3:25 PM
don't use 3v4l to send your email.
 
I lost my faith on humanity
 
@jbafford Well do I need a VPS+domain to be able to send a email using php? I cannot do that in local?
 
It Depends.
 
On ?
 
local considerations largely include whether your mail server is even inclined to listen to you.
 
3:26 PM
This may prove to be helpful somehow... I dunno if it would help you
1
Q: [PHP Warning: mail(): " sendmail_from" not set in php.ini or custom "From:" header missing

Gourab NagI am trying to use PHP's mail() function to send a test mail. $to = "gourab@seewitheie.com"; $sub = "Php Mail"; $msg = "Test Message From PHP"; mail($to, $sub, $msg, "From: gourabnag12@gmail.com"); When I try to debug it through step in phpdbg, it shows the message: [PHP Warning: mail(): " s...

 
@tereško that's the basics of it. What it means. But it usually implies routing, as in, that's how it's usually implemented. Anyways...
 
routing is just a detail, it happens BEFORE any of your code hits the MVC triad
 
really, though, don't use mail(). Use Swiftmailer and configure it with an appropriate email gateway (e.g. your email server and credentials).
 
BTW you could use sendgrid tho
 
@tereško yes. That doesn't contradict what I said.
 
3:28 PM
Ok ...
 
At least if you know what the word imply means.
 
sendgrid has a free tier
 
@GourabNag Sendgrid or Mandril or whatever would be far preferable to actually sending through your own mail server, but one should still use Swiftmailer and not mail().
 
................................. @jbafford
 
@Dante MVC is language-agnostic. Many desktop applications have MVC architecture.
MS Word does not deal with "routing"
 
3:30 PM
@tereško fair enough. I did however also say usually. Haha. Anyways, thanks again for the help with the document root dilemma.
 
sure, np
 
................................? @GourabNag
 
nothing... :P @jbafford
hey @jbafford can you help me on something... ?
 
@Shafizadeh you probably should look into "composer" as a tool for getting libs like SwiftMailer and others
 
@GourabNag only if you ask your real question :)
 
3:33 PM
:p yes... how could i upload my ssl certificates to my aws server.. ?
 
@tereško I did it ... Here is what I needed
 
@GourabNag <close vote, too broad; unclear what you are asking>
 
@tereško Just for more information, "composer" is a search engine which finds autoloader scripts, right?
 
no, it's a dependency management tool for php, kinda like apt-get is for Ubuntu
 
@GourabNag What's your real problem?
 
3:35 PM
@tereško dependency to what? I really need a example for "composer" ..!
 
:P i just bought a ssl certificate from comdo (well i got it for free) .. i have that thing in my local pc... how could i upload it to my newly launched aws ec2 instance @jbafford
 
scp
 
!!man scp
 
@tereško tnx
 
3:36 PM
@Jeeves consider learning man /cc @PeeHaa
 
i cannot find a scp inbound rule to add in my aws security group...
 
@GourabNag have you configured SSH for it?
 
yeah !!!!!!!
 
@GourabNag scp works over ssh
 
oh i see... i should have googled it :P my bad
 
3:38 PM
 
besides, ssl certs are text files, so you can just as well copy locally and paste into a remote file
 
as a side not, @GourabNag, can you log in with root using ssh?
 
yeah man @tereško :P
 
1 min ago, by tereško
@GourabNag have you configured SSH for it?
 
well atm i am on windows and on windows i use putty (ssh client) which dosent let me do goddam paste text to it......
 
3:39 PM
then the answer should have been: NO
 
oh shit no i cant login as root :P
i have to login as ubuntu
and then upon logging in can go into root using sudo su :P
 
is it just me or @GourabNag seem a bit .. well .. spastic
 
-_-
 
@tereško is it me or was that a bit … rude?
 
probably
 
3:57 PM
@Gordon does that surprise you? :)
 
4:43 PM
@Gordon That should be easy
 
Well.. I got my ssl set up.. gourab.me
 
@GourabNag your http isn't redirecting to https though
 
yeah i have to fix that .... i see
any ideas on how i could do that....
 
@GourabNag disable ssl and pick a sane cipher suite
 
4:55 PM
Okay.... !
 
Also once you have set it up correctly including the redirect add your site the the hsts preload list
 
alright :)
 
You should probably also change your SSL cipher suite to ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DE‌​S:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
 
Oh and add key pinning
 
whats key pinning??
 
4:57 PM
A typo :)
 
i dont know the meaning of key pinning too..
 
@GourabNag It's a fingerprint of your key so nobody else can cerate a certificate
At least not without people getting errors
 
okay.. thnx!
 
wiki.mozilla.org/Security/Server_Side_TLS helps you pick settings based on your audience
Damnit. Why did mozilla also screw up that once straight forward page to what it is now
 
This is an excellent guide to fine tuning your ssl btw scotthelme.co.uk/a-plus-rating-qualys-ssl-test
 
5:01 PM
I like mozilla's better
 
okay .. gonna go through it now Thanks @Sherif
 
@FlorianMargaine its not about surprise. its about calling it out. though yes, it does surprise me. a few years ago it wouldnt, but lately it does. @tereško has so much improved. let's not allow him to fall back to erronous way
@PeeHaa i consider it done then :P
 
:-)
 
!!man is it done yet
not that easy, huh
 
@Gordon that's fair
 
5:04 PM
I added an issue so it the very least I am reminded whenever I look at the issues :P
 
if I can be bothered and the son lets me, I do a PR
 
there is a site - man.he.net for man
 
I feel somewhat mislead and disappointed by the contents of that url.
 
I like man7.org personally
 
5:09 PM
well, TBH, I was half expecting He-Man. youtube.com/watch?v=X8Nc8RCLy1s
 
man.he.net/?topic=gcc&section=all ?? http://man.he.net/?topic={$man topic}&section=all...
 
I just google man command and I'm fine
 
Hello everybody
very basic question
    <form action="login.php" method="post">
             <input type="text" name="test">
             <a href="login.php" type = "sumbit" class="btn btn-success modal-login-btn">Login</a>
    </form>

<?php

	echo($_POST['test']);

?>
gives me: Undefined index: test
why?
I have been testing and searching everywhere
I actuually boiled it down to the most basic piece of code
 
You haven't posted your form; there's no value.
 
5:13 PM
what do you mean
?
I do post it by clicking on the button submit...
 
you gotta make <a href="login.php" type = "sumbit" class="btn btn-success modal-login-btn">Login</a> to <button type="submit" class="btn btn-success modal-login-btn">Login</button>
 
except that it is a link (<a>) and not a real button (<button> or <input>)
 
^. You have a submit link, not a submit button.
 
oooh ok
it does have to be a button...
ok didn t know that thx
 
5:14 PM
specifically, you need the form to submit. You can most easily do it with an input type="submit", but you can also do it with a type="button", or any other element with the appropriate javascript.
 
that worked!
mhm
 
I just realize after 10 mins debug I cant use both bindValue and execute(array()) the same time before I read the docs, fml
 
5:31 PM
10mins is a really ok time
 
how bout 20 :P
 
@jbafford According to the people in the html room using a <button> is prefered cc @trilolil
 
@PeeHaa yea, a button is one a bit more versatile element
 
@PeeHaa I still disagree
 
no need for input type="submit" to exist at all
@FlorianMargaine why?
 
5:42 PM
@bwoebi you can give it a name
@bwoebi a button is not part of a form, imho
 
@FlorianMargaine if you need that, add a hidden input
 
@bwoebi no, you can have multiple type="submit" with different names
 
@bwoebi What that ninja above said
 
ugh…
why…
 
@PeeHaa 2.9
 
5:46 PM
@m6w6 liking the ext-http for PHP7, I'm trying to implement a multithreaded HTTP server that runs on the command line with Pthreads. Do you know of any existing implementation?
 
@Caleb of an existing HTTP server in PHP?
 
yes
 
no pthreads, only async I/O: github.com/amphp/aerys
 
^ that
 
oh very nice
 
5:47 PM
also, I've heard of an abomination called appserver.io which actually isn't fast…
 
and once, there was nanoweb, dunno if it still exists
 
would it be hard to make aerys run a thread per request?
 
hey can somebody help me on how could I implement that SSLProtocol SSLv2 in apache config...?
 
@Caleb you could easily couple it to a worker process via I/O
 
any idea if it supports PSR7 ServerRequestInterface?
 
5:50 PM
@GourabNag You shouldn't
 
@Caleb no PSR7 … turns out to be too inefficient
 
ummmm... so how should i disable SSLv3??
 
See the mozilla page I linked earlier
 
okay.....
 
@Caleb PSR-7 is more suited for typical apache
 
5:52 PM
ah. so I'm working on a Pull in Yii2 that abstracts Super Globals like $_SERVER, $_COOKIE, etc. so that it can run from the the CLI. Right now I'm passing a ServerRequestInterface on each request
 
@bwoebi why?
 
think I should instead re-work it to take an http\Message instead?
 
I guess it wouldn't be too hard to wrap Aerys\Request into a ServerRequestInterface (github.com/amphp/aerys/blob/master/lib/Request.php and github.com/amphp/aerys/blob/master/lib/ParsedBody.php)
 
@bwoebi the \is_array and friends is micro-optimizations, right?
 
@FlorianMargaine because it is unable to take advantage of async I/O
@FlorianMargaine the backslash? yea
replaces a fcall by a simple TYPE_CHECK opcode
 
5:56 PM
@bwoebi and Aerys' HttpRequest can? or what else do you mean?
 
@FlorianMargaine Aerys Request interface returns e.g. a Promise for getBody()
(which in turn can be piped to parseBody() function)
@FlorianMargaine the goal of Aerys is to provide an easy interface for most needs as well as a moderately simple one for more complex and optimized use cases.
 
@bwoebi and something prevents apache to use this?
 
@FlorianMargaine mod_php only starts the request if full POST body data are received
 
oh
didn't know that
well, I guess I actually did
I remember having a bug with nginx/fpm related to that
can't say what tho
 
for example this will allow to check credentials and then allow larger uploads than 128 KB (default limit)
 

« first day (1946 days earlier)      last day (2999 days later) »