« first day (1379 days earlier)      last day (3573 days later) » 

3:00 PM
I am trying to make a form to redirect to a page that needs those variables in the URL.
I have the header setup, but it just redirects without showing the form, because I assume I put it ahead of the form. When I put the PHP after the form, all it does is refresh the page.
 
@AubtinSamai Can you put your code in a pastie for us to look at please?
 
So what's it supposed to do?
 
In the code, you see a URL that it is suppose to input the variables from the form to. So pretty much, you input the username and password into the textfield, and the PHP redirects to the link with the variables included
 
You have $Email commented out.
//$Email=$_GET['email'];
And pasword
So in your link $Email means nothing
Start by echo'ing what what you want the link to be rather than redirecting them.
echo "http://www.casaangelo.com/volunteertest/api/OrganizationLogin.php?userName=" . $Email&password . "=" . $Password;
 
3:12 PM
Even with the email and password uncommented, it immediately redirects to the link, but the areas where the fields should have info is blank
 
Is casaangelo.com your site?
Also, DEAR GOD at the idea of passing a username and password via $_GET
 
^ that
also morning again room 11
 
YoHaa
 
I know haha, this is just a quick fix.. Going to change it in the future
HI
Hi*
It echos this:
``pp2/"d5
And refreshes the page
 
You need to learn to debug. Kill the redirect. Echo the URL go to it manually
 
3:18 PM
By "kill the redirect," do you mean to remove the header?
I removed it and put echo instead, but now it shows: ``pp2/"d5
And refreshes on clicking submit
 
Yes
You have some issues somewhere else in the code then
 
Ok.. I am just going to wait until the PHP coder comes back. They wrote the other code that has the GET method.. I am coding for Android, so PHP is foreign to me. lol
 
Good morning.
 
3:34 PM
11
Q: Announcement: Keyboard shortcuts are now integrated into the site

balphaOriginally we have implemented the keyboard shortcuts as a user script. We have now finally made the change to have them integrated into the site. When you go to the "preferences" page on your profile, you'll find a new checkbox labeled "Enable keyboard shortcuts". Click it, and from there on, e...

 
> We just don't currently have a cross-site preference infrastructure
 
Nice
 
Gonna put this warning on everything. My car, computer, the Internet, my t-shirt. http://t.co/aaFJFcpegN
 
Does this work for you people: commentar.com ?
insert tumbleweed gif
 
@PeeHaa custom 404 page with 200 response code shakes fist
 
3:42 PM
lol
 
@DaveRandom awesome and sorry bout that :) WIP
 
Good domain name.
 
Dammit wrong keyboard :-P
 
I just jizzed all over nginx again server_name ~^(?<user>.+)\.example\.net$;
\o/
@Fabien Yeah saw it will still available so thought I would reg it before @webarto fucks me over :)
 
Captures in $user var?
Never seen that feature
 
3:43 PM
lol
 
@DaveRandom Isn't that just fucking awesome!
I don't really have a use for it, but that's not the point :D
 
How does it work?
 
Regex bitch.
 
^ :)
 
Should it work is the real question.
 
3:48 PM
Yeah but I mean I don't get what's meant by captures in $user var
 
@Fabien As of that point you can just use $whatever in your config
 
(sort of, not everywhere)
 
@DaveRandom What's the sort of?
 
You can use it in any place where the config option is evaluated at request time
 
Oh yeah. Would be strange otherwise
 
3:50 PM
You can't use it for server-level config, of which some can go "below" that point (for ex. fcgi conn params can't be based on it)
Which sucks ever so slightly because you could use it to route to a different fpm pool with different perms
 
Dude why can't you just be happy for me for once!
dick
:-)
 
but there are other ways to do that
@PeeHaa never! :-P
 
:P
ok now I only have to pick the project up again and get myself another cert
I think it's been more then a year ago I last coded on it. This is going to be hard and full of horror I'm afraid
 
@Fabien how is your docker going? There was this on reddit the other day - enalean.com/en/Deploy-%20PHP-app-Docker-Nginx-FPM-CentOSSCL
almost makes it look easy.
 
@Danack \o/ I will be needing that soon :)
 
3:56 PM
it still doesn't cover some stuff...like the nginx config needs to have the nginx config for the application....so how do you get that in there.
 
yo
@Danack Isn;t that simply a matter of adding another ADD docker-web/nginx/app.conf /opt/rh/nginx14/root/etc/nginx/conf.d/app.conf ?
 
@PeeHaa Currently, my nginx config files are generated by the applications and symlinked into the /etc/nginx directory, I'm going to have to change it to: i) build config for all apps that I want the nginx docker to support, ii) send them all somewhere, iii) add them all to the docker file, iv) Deploy the new nginx docker when I add/remove an app v) tie a broom to my arse and sweep the floor as I go.
 
I see your point :P
hmmmm I just changed a lot of stuff in a class, but all unit tests are still passing. Something is not right...
 
There may be other ways though - you can share files through file-ish containers I believe.
 
4:13 PM
@Danack I explained the learning curve for docker to the head dev and he's said we'll just use vagrant then
I still would like to know more about it personally though so the link helps. Thanks.
 
remote: Permission to Commentar/Commentar.git denied to e18408260ec4d10c2a5e6886
148560b76ea08e95.
fatal: unable to access 'https://github.com/Commentar/Commentar.git/': The reque
sted URL returned error: 403
damn you github
 
Yes, fuck github. It seems oauth tokens generated through basic authentication can only be sent as query params, not as Authorization header.
 
4:30 PM
@rdlowrey and others is there any safe way to get the curl / mozilla cert bundle?
 
Generally you would store CA files on the OS for people like Mozilla.
 
@LeviMorrison But how do I get an updated bundle?
 
safely? Dunno :D
 
:P
 
@PeeHaa Yes?
 
4:48 PM
@PeeHaa Not really. It's an unresolvable chicken-and-egg problem. That said, why not just use the OS distributed bundle?
 
ow right I pinged you. I kinda forgot what it was about :|
@DaveRandom Because curl and windows
 
@PeeHaa You have to use curl?
 
Well it's not just curl. It's anything that wants to correctly verify certs IIRC
 
@PeeHaa No I mean to fetch the certs
 
ow ow. nope. Anything will do as long as it can be done through php
@DaveRandom I'm sure you and/or @rdlowrey have some way of getting a formatted bundle based on the official mozilla thing
 
4:55 PM
@PeeHaa There is one thing you can do, and that is to hard-code the expected cert thumbprint. So the first run you disable the regular peer verification procedures and verify the cert thumbprint + peer name instead, and after that you have a set of trusted root certs so you can do proper verification when updating it
That works as long as you only do it for first run
However before 5.6 that will be an epic pita
 
@DaveRandom But from where do I get the bundle?
ow just wait a second!
 
...is the only HTTPS source that I know of
 
yeah I just saw that now. Never seen that one before
 
Yeh it's quite new
 
About fucking time
 
4:58 PM
Really though, you should probably just ship a bundle with your application
That would be the only truly "safe" way
 
It's sucks when safe gets in the way of easy maintenance
 
@JoeWatkins BTW I was having issues with a PHP installation other other day.
configure: error: libXpm.(a|so) not found. but libxmp-dev is installed, I tried --with-xpm-dir=/usr/lib/x86_64-linux-gnu too and --with-libdir=*same*
 
5:47 PM
... and now there's no power here
Which means: no net, no water, no fridge, no gaming
 
@tereško "no net"
 
and 22% battery life left on my phone
 
@tereško Off the grid
 
At least I have some cheese and reasonably cold beer
 
And a book right?
 
5:55 PM
No books
 
So just you and your imagination... I hope the view is nice.
 
It's reasonable
 
How long you there for?
 
Yah, electricity is back
 
@PeeHaa With pitchblade how do you get the your request variables as just a vanilla array. $request->postIterator() puts them in an object then array
 
6:04 PM
But this has killed the router... Shit
 
@Fabien Yeah that is one of the most ugly parts
At the moment. Not build in. You have to extend the Request class add and your own methods for the time being
 
Well at least I wasn't missing something :p
 
:D
 
testing
I had to restart the whole damned infrastructure to get it back
 
heh
 
6:48 PM
 
I bet a similar thing happened in his pants when that sprayed.
 
Same as for the guy behind him :)
 
Is dumpert Dutch for 'Not productive'? :P
 
:P
ow right! I remember again @LeviMorrison! Booze always helps my memory for some reason. :) Do we still want a tutorial on php.net? If yes I am finally able to finish it up in the coming week. Otherwise I will just dump it on my site instead
 
tutorial of?
 
7:03 PM
@Fabien At some point I started on this but real life prevented me from finishing the thing
 
like a phptherightway for php.net?
Also how do you test a post request locally without the effort of having to build and submit a form? -_- More specifically if using Artax
 
@Fabien No. php the right way tells what to do and what not to do. The goal of the tutorial on my github is to provide a starting point for people new to the language
ofc with sane code :D
 
Not worried you'll face a mass of 'This is too subjective, blah blah blah'?
 
@Fabien Nope. That has never been a concern for me. If people have an issue with something in it they are free to discuss / PR
 
While it's at it the blog.php.net should be done :P
 
7:07 PM
:)
 
Can somebody help me with whoops lib?
 
@Fabien What are you trying to do? Test how? Unit test?
 
Just using NikiCs fast route I want to POST some info to insert a record to my DB.
The code is running locally on a vagrant box
 
Like an API sort of thing?
 
Correctamundo.
RESTful API hopefully
 
7:09 PM
What have you tried? :P
 
Problem is I am shit at building stuff :P
I got Artax installed and he has a FormBody class. But I am a little lost on what URI I would submit it to through vagrant.
Due to the vagrant hosted nature
 
aha
have you tried this
3
A: Connecting to a Vagrant VM externally

cgeiselTake a look at Bridged Networking in the Vagrant documentation. Enabling it will allow your VM to appear as a device on the network, and allow you to connect to its IP address and the port your web server is listening on. Huge caveat: you haven't given any information about your local network, s...

 
Actually I might have it. Vagrant hosts file to point a proper domain name to localhost
Artax seems to be okay with it.
 
\o/
 
Cool. I'm shit at architecture. Really just dawdling along like a child building a lego house with this.
 
7:16 PM
I'll let you in on a secret. Me too :-)
 
Hmmm doubt that. Or I am over-estimating my own abilities at 'shit'. heh. But here we are. Don't try don't learn.
 
7:34 PM
Hi there!
someone developing with Symfony framework?
:/
 
I guess everyone is out drinking
Also, amongst the room regulars, I'm reasonably sure the answer will be no
 
What's your question though?
 
Is it mandatory have mod_rewrite enabled in order symfony run properly?
Anyway, I just entered in IRC chat right now
 
not needed if you can use index.php? for every request
 
user895378
7:43 PM
I hope not -- then everyone running nginx would be out in the cold :)
 
Oh, great!
 
@felipsmartins I would expect so. There are probably some truly horrifying hacks that could be done to avoid it, but in general modern applications work by routing all requests through a single script
@rdlowrey :-P
 
hmm
In IRC someone answered:
"no, you don't need to"
"it'll only make your urls prettier"
"it transforms /index.php/blog/some-post to /blog/some-post"
 
Very likely the case
 
In other words must rename web/app.php to web/index.php, right?
 
7:46 PM
Not necessarily, it would just be /app.php/blog/some-post
(I guess)
But srsly, what kind of server doesn't give you some kind of basic URL rewriting?
 
> As a solo developer who is just looking for source control, should I start off with Scrum, Agile, or CMMI?
 
Nope!
 
@PeeHaa lolwut
 
user895378
@PeeHaa lol punch me in the face now
 
dafuq is CMMI?
 
user895378
7:49 PM
I don't even know.
 
user895378
E_METHODOLOGY_TREND
 
Thanks @DaveRandom
 
I just googled it, seems to be yet more people applying sales bullshit to programming
 
Thx @rdlowrey
 
Sorry...Visual Studio Online forces me to choose one off the bat in order to use their source control...no clue which to pick, and their descriptions don't really help a newb like me. — Evorlor 1 min ago
 
user895378
7:50 PM
lol Visual Studio Online ... punch me in the face now
 
@PeeHaa Really? Jesus.
 
user895378
Why would anyone use visual studio online's source control? Hello git?
 
> We are tired of XP, Scrum, Kanban, Waterfall, Software Craftsmanship (aka XP-Lite) and anything else getting in the way of...Programming, Motherfucker.
 
user895378
Microsoft: "Hey look! You can pay us money and use our source control instead of those free ones that everyone else uses."
 
@rdlowrey Until like VS2013 or something it had no native git support :-/
There were plugins, but they were really half-arsed
 
user895378
7:52 PM
Native git support:
 
user895378
$ git add *
 
inorite
PHP Storm has some seriously awesome VCS stuff though, you really should at least try it
The merge tool is awesome, for example
 
user895378
PSA: learn how to use git, people. Don't use your IDE as a crutch. Apparently you might end up getting swindled out of $$$.
 
You (and microsoft) are combining source control with project management and creating a lumpy bowl of stew. If all you want is source control, I'd start out with git or svn. — bcrist 1 min ago
 
I wouldn't wish svn on my worst enemy, but yes
 
7:54 PM
:P
lolololo
Thanks bcrist, but I have used git. im actually trying to branch out a bit and become comfortable with some professionally used stuff — Evorlor 23 secs ago
 
user895378
So ... artax usage behind a proxy server is going to initiate an HTTP tunnel via CONNECT through the proxy to the destination server whether the connection is encrypted or not. Deal with it.
 
user895378
I know everyone was on the edge of their respective seats about that.
 
:)
 
@PeeHaa Windows dev workflows are... weird. My gfs company do some stuff that I would call very questionable, but it seems to be basically standard practice
(they are ASP.net MVC)
 
@DaveRandom Now why doesn't that surprise me
@DaveRandom And you sleep with her in the same bed???
 
7:59 PM
Depends how much I have had to drink
 
:D
 
user895378
@DaveRandom that's a nice find on the bagder CA bundle via github. Previously I've been manually building the cafile using the perl script on the curl page against the mozilla source. I can add that repo as the lone submodule for artax to get the cafile with a recursive pull. Also, I'll add a small executable script that will auto-update it from github.
 
8:18 PM
Hey I'm just wondering - how can you output html in php, more specifically divs?

Suppose I wanted to output echo "<div class="item clearfix">";?
 
user895378
You would do it exactly how you typed it (plus escape the quotes) :)
 
user895378
echo "<div class=\"item clearfix\">";
 
Or outside of php tags. simply ?> <div class="..."> </div> <?php
 
user895378
That too.
 
user895378
Or use a single quoted string so you don't have to escape the double quotes:
 
user895378
8:25 PM
echo '<div class="item clearfix">';
 
user1804599
PHPHPHPHPHPHP
 
user1804599
@rdlowrey use Twig :v
 
user895378
Or you could use a template engine. Some people love them. I don't engage in the argument anymore but I don't personally think they're worth your time.
 
@rightfold clearly, using a second templating language inside a templating language has to be a really good idea.
 
@BenjaminGruenbaum you really should try to implement a new templating engine inside Twig :-D
 
8:29 PM
That's a great idea
 
yesterday, by Carrie Kendall
^ I don't get that 8-star post?! Someone care to explain?
 
user1804599
I made a web app today.
 
user1804599
I wanted to separate formatting and putting data in the right place, so I did those in different functions.
 
@bwoebi have you missed on the php6 vs php7 debate?
 
user1804599
But I don’t know if I want those functions in the same file or not.
 
8:31 PM
@BenjaminGruenbaum no, but I don't get how the image correlates with this?
 
user895378
lol @bwoebi it's an unfortunate screen capture of me from the php town hall video basically reacting like, "OMG PHP7 SO STUPID."
 
ah :-D // that was btw. the correct reaction @rdlowrey
 
@rightfold You should probably separate the layer with data from the layer with presentation logic, so probably not the same file.
 
user1804599
@BenjaminGruenbaum well, formatting is kinda in between.
 
Formatting is presentation logic.
Then again, it depends on how big your code base actually is, if it's fairly small these things don't matter too much.
 
8:35 PM
@rdlowrey hm. you look better on your profile photo.
 
user895378
lol thanks. That's what happens when I shave my head. It's slowly coming back.
 
@BDillan Most likely you don't need the clearfix div
 
@rdlowrey why ever you'd shave your head………
 
user895378
@bwoebi because randomly decide to once every year or two.
 
user1804599
@BenjaminGruenbaum I basically have this setup: gist.github.com/rightfold/eeabf708155708109c85
 
user1804599
8:37 PM
For as far as I can make up from the code I currently have.
 
user1804599
Request handler is basically return view(formatter(use_case(input))).
 
@rdlowrey I thought you to be sane ;-)
 
My issue is is that in HTML:

<a href="profile.php?var=<?php echo $username_array[0]; ?>" class="name">

Is my original statment

In PHP:

echo <a href=" . "profile.php?var=$username_array[0];" . "class=" . "name" . ">";

sends usernameclassname to the href instead of just username
How can I fix this?
I DONT want classname to be appended
 
user895378
@bwoebi after awhile I get tired of messing with it, shave it all off, realize it was a terrible mistake and feel really self-conscious for a couple of months and then it comes back. This has been happening for ~10 years now.
 
user1804599
@BDillan uh
 
8:40 PM
Im missing a front "
 
user1804599
That’s a syntax error.
 
Ignore that
 
@BDillan Just use single quotes for your echo string and concatenate the variable
 
echo "<a href=" . "profile.php?var=$username_array[0];" . "class=" . "name" . ">";

How can I not concatenate classname?
 
user1804599
echo '<a href="profile.php?var=' . $username_array[0] . '" class="name">';.
 
8:41 PM
(One of) The only occasion double quotes makes sense is when doing sql
 
Are single quotes interpreted as html? I thought you need double quotes for html
 
HTML has nothing to do with it
 
user1804599
Or even better, echo '<a href="' . profile_url($username_array[0]) . '" class="name">';.
 
user1804599
Where profile_url returns the URL.
 
user1804599
Since duplicate code is bad and hardcoded URLs are bad and you should feel bad.
 
8:44 PM
@rightfold I'm sorry but it still doesn't work :/ It is still cutting off
 
user1804599
Also putting HTML in string literals is ugly.
 
Working with PHP in CLI is so much more fun than Web.
 
user1804599
Just do <a href="<?= profile_url($username_array[0]) ?>" class="name">.
 
user1804599
@Fabien No surprise, since web development is about the worst subbranch of software development after mobile development.
 
Someone with too much time on their hands should create a http browser in CLI that outputs sites an ASCII art.
 
8:46 PM
I need to do a for loop over the whole html to generate a 'list'
:<
 
user1804599
@Fabien And they’d probably do it in a primitive language like C, wasting even more time.
 
@rdlowrey :O
 
Nvm rightfold your solution worked
thankyou
 
3 year wedding Anniversary tomorrow.
 
Also for profile_url($username_array[0]), where do I put the url?

is it profile.php_url($username_array[0])?
 
8:50 PM
Apparently year 3 is leather. Kinky.
 
user1804599
function profile_url($username) {
    return "/profile.php?var=$username";
}
 
user1804599
Don’t be afraid of functions. Use them exuberantly.
 
I thought profile_url was a built in php function
for a min
@Fabien Congrats. My three year being single anniversary is in 2 months
 
At least you'll definitely get a good present for yourself.
 
I'm thinking of getting some Grey Goose
and a game on Steam
 
8:55 PM
Ugh, I can't do spirits. Well... only Amareto
 
yesterday, by Danack
@bwoebi Did you apply the patch to sort out the arrays, or otherwise revert the change to the count behaviour?
@bwoebi
plx
 

« first day (1379 days earlier)      last day (3573 days later) »