« first day (2676 days earlier)      last day (2275 days later) » 

4:04 PM
@RonniSkansing o/
 
Morning.
 
4:30 PM
I have basic knowledge of html, css, javascript, sql, and php. I want to create a shopping cart and checkout, but I don't even know what language/s that will require. Help?
 
@JonathonPhilipChambers shopify.com
 
Thanks Leigh, though I was hoping for something with more coding and less paying someone money
Right now, I don't even know how to create a cookie, yet I feel this knowledge will be vital to success
 
@JonathonPhilipChambers All languages of above
 
And none other? Well, that's a relief
Here I was thinking I'd have to learn an extra three
That should narrow my research quite a bit. Thanks
I was certain it was mostly javascript, but I was doing a javascript tutorial, and it abruptly ended before covering anything useful
 
I actually am wondering whether you actually should do this for anything even remotely touching an actual production site though
Do you at least have a grasp about basic security in webapplications and do you know how to handle money units?
 
4:38 PM
Well, I was going to start with paypal sandbox and test it all from there
 
The payment processor is just a tiny part of the process
 
posted on February 12, 2018

New Cyanide and Happiness Comic

 
I thought I have a grasp on those things, but I get the feeling my knowledge is about to be tested and I'm about to fail
 
@JonathonPhilipChambers Sorry I guess that was a little passive aggressive. My point is, if you're coming in at zero knolwledge, creating a shopping cart and checkout is not the best place to start. Especially if the intention is to have real people use it
 
So anyway, I'll stick to those five languages
I think that's all I came in here to ask, so I'll get back to work on it
 
4:44 PM
Feel free to come back and ask again when you have a more specific question :)
 
No problems. By the way, I don't have ZERO knowledge. I created all this using pure code handcraftedgifts.net.au
It's basic, but I gotta start somewhere
The "Spinning Fibre" page actually contains no product information. It draws it all from MySQL
Considering 6 months ago, I didn't even know what CSS was, I think I'll get where I want to go eventually.
 
Ok that's a good start :). But when you start dealing with money, please delegate to someone else. (Paypal is a good option, do play with their sandbox, don't store any sensitive user information on your side)
 
And please read up on basic security in webapplications
@JonathonPhilipChambers handcraftedgifts.net.au/…
 
heh, was about to paste the same thing with <marquee>
:D
 
:P
Damnit. I would have prefered your version
:(
 
4:50 PM
Chrome blocked it, but it was going to be a popup alert, eh?
 
Chrome obviously blocks the script
Aye
 
ff doesn't, nor does edge/ie iirc
 
Cross-site Scripting attack (XSS)
 
Nice find
So it worked on your browser?
 
@PeeHaa ERR_BLOCKED_BY_XSS_AUDITOR nicely done Chrome!
 
4:53 PM
@JonathonPhilipChambers Yes it does work
@MadaraUchiha Yeah good guy chrome has been doing that for a long time. So nice
 
Chrome blocks it for me, but I can think of a couple of naughty browsers that won't.
 
All the rest :P
 
I tried it on edge. Didn't get the alert there either
 
Oh nice
 
@JonathonPhilipChambers IE11?
 
4:55 PM
I just tried to open IE, but it crashed on the default msn homepage
5
:P
 
Ha! IE11 said it modified the site to prevent... it blocked it
That said, the fact that a browser exists somewhere that would have had an issue with that does mean I gotta tighten up security
 
Hey, I've got everything backed up on my local host. What's the worst you can do to my website?
 
...
 
4:57 PM
People's information being stolen??
 
I mean my website as is
 
People being served malware???
 
You can put malware on handcraftedgifts.net.au?
 
Of course
 
So, by replacing the popup alert, you'd run something that deletes a page and replaces it with your modified version?
 
5:01 PM
yes
 
What about something more harmless? Could you change the background texture to yellow?
 
Can you do that with javascript?
ooooooh postgres has a new gui \o/
 
@JonathonPhilipChambers This form of XSS means that someone can create a URL that would cause your page to run arbitrary JavaScript code on it. That means that they can pretty much do anything.
 
What is the best practice to use error_log() ? wheather to use it in our critical functions ? or will it just fill my log files. Please suggest me
 
Imagine someone giving a user of yours a valid link to your site, that steals their password on your site.
 
5:04 PM
@AbhiBurk Not use it at all most likely
 
@JonathonPhilipChambers handcraftedgifts.net.au/…
Oh, responsive, it seems to only work when you make the browser thin
fixed
 
Okay but the way we use logs in Java what we should we use if our code gets failed at some point of line.At least we can be able to find till what line our code was executed after failure
 
Sorry, I think I phrased my question poorly. Can you use that link to make it yellow for me when I use my link?
 
Okay but the way we use logs in Java what we should we use if our code gets failed at some point of line.At least we can be able to find till what line our code was executed after failure
 
@AbhiBurk Don't you just throw an exception in java?
 
5:07 PM
@JonathonPhilipChambers Ah, you're asking if we can persist changes. Not sure, I can tell you my rate if you want a full penetration test :P
(At this stage, you don't)
 
It's okay, I'm sure I can't afford you
 
Alternatively tell us we can't do it enough and we will drop your database as a service :P
 
yup but how can in PHP (Codeigniter) ?
 
(with your permission, of course)
 
@AbhiBurk throw an exception
 
5:09 PM
hmmm okay I got that was not sure of using logs. BTW Thankyou brother
 
ok pal
 
I believe you can. I see the security hole needs plugging, and until it is plugged, you can destroy the entire website if you wish
 
@JonathonPhilipChambers To fully analyse it would take more effort than most of us can muster for the simple / fun / demo stuff.
 
That's fine. I think I got plenty of value out of the demo.
 
The stuff linked above is entirely reflective, not persisted.
 
5:11 PM
@AbhiBurk It all depends what you are doing. But in 99% of the cases calling error_log from random functions is not what you want
 
Yes Leigh, I gathered that
 
Yup !!! I got you I think codeigniter has error handling capabilities as well
 
@JonathonPhilipChambers Are you using / have you read about "prepared statements" ?
 
If it was ALL reflective, I'd leave the security hole wide open. But I know that if you can write a custom alert, you can do pretty much anything.
 
Is latvia in Italy ? @tereško
 
5:12 PM
They're your first line of defence against database level attacks
 
@Shafizadeh are you trolling?
 
:D
 
@tereško They don't have Google Maps in Iran :(
 
I may know it by a different name, but I'll give it a google
 
:-P
 
5:13 PM
@tereško is it or not? mfa.gov.lv/en/rome
Ok, I missunderstood
 
@Shafizadeh There's an Embassy of Latvia in Rome, sure.
 
ok, I thought "Embassy" means something different
 
@JonathonPhilipChambers Oh hey, I guess we can recommend this to you if you don't mind throwing a little money at learning: patricklouys.com/professional-php
 
you would not if you were to ... wait for it ... google it
 
Probably the most current PHP book :P
 
5:15 PM
Okay, so suppose I do all this research, get Paypal sandbox up and running, would it be a good idea to hire a full penetration test before going live?
 
I was half-joking, they're pretty expensive.
Delegate the security sensitive stuff to a known-secure provider, use best-practices on your own site (and feel free to ask us), and you're probably going to be fine if you don't
 
Not as expensive as customers asking why the malware they downloaded has taken all the money from their account
 
@JonathonPhilipChambers Do you deal with money? Do you store users' details? (Names, passwords, credit card numbers)?
 
On the website? No, but I do plan on storing someone's shopping cart on their browser. Which items they've ordered, etc.
Then Paypal will handle the credit card info
I won't even touch their username
 
@samayo I got 30 min if you want?
 
5:19 PM
My website will need to update stock levels, but that's all the data it will store
And a login system... not this year I don't think. Maybe one day.
 
Skip login for now
 
Exactly
I have a mailchimp plug in collecting email addresses
But that all goes straight to mailchimp. My stuff doesn't even touch it
 
ok new pgadmin is even worse than the previous one...
 
Now I'm generally against paying money for education when so much is free on YouTube and other places, but does patricklouys.com/professional-php genuinely have wholehearted recommendations here?
 
@JonathonPhilipChambers He's part of the community here so we're biased :P
Check out his free resources first and see how you feel: github.com/PatrickLouys/no-framework-tutorial
 
5:24 PM
/me is still not sure ... I reserve the judgement till I actually read it
 
My bed time is coming up soon, but I will mark this for reading another day
Wait, is this a physical book, that I have to wait for two weeks for it to get to Australia, then find somewhere in my house to store? I'd pay $25 for a pdf, but not for a paperback.
 
PDF, 214 pages
 
Ah, good. If it was a paperback, that would be a "hell no", but 214 pages of pdf... I'm definitely thinking about it.
I'll check it out tomorrow.
 
I believe he has paperbacks incoming
 
I'm no pirate. I'd never share anything I've paid for, or download anything anyone else has paid for, but do you know if this pdf has DRM? I don't mind watermarks and stuff, but some of the pdf DRM can be really nasty
Like, it won't even let me do a text search
I'll stop asking stuff, and click "buy now". It probably has all the answers
Anyway, I'm gonna call it a day. Thanks guys, for running JS on my site, and thanks for not dropping my database. (It's completely backed up, but uploading is still annoying.) Cya.
 
5:35 PM
o/
 
Anonymous
@Naruto I will arrive at home in 40 min..
 
Anonymous
I will check up on you
 
Anonymous
Not sure if you accepted my request
 
5:54 PM
@samayo will be for after 22:00
 
user8334049
Hello - does anyone have any idea why a php form using post would work perfectly well on windows & chrome - but not on mac & chrome?
 
user8334049
Have had a quick google but not found anything yet...
 
Case sensitive action
 
what IDE are you using?
 
@PeeHaa Sounds about right.
 
6:02 PM
Could be a million things though :P
 
@PeeHaa Surely that's for the server to decide :P
Unless the server is also windows versus mac
 
I noticed using netbeans, my encoding was getting set to windows-1252
No idea if that matters or not though...
 
oh I read that as server running on those os'es :)
!!notworking
 
Nov 15 '14 at 23:43, by Danack
Do you mean it stays at home eating cheetos and play xbox?
 
How does it not work? What errors do you get?
 
user8334049
6:05 PM
using atom - no PHP errors - but it is not setting the POST variables...
 
I'm having a problem aswell, been trying to figure it out for 2 hours now.. It appears my IDE is not recognizing my PHP files... * I swear the other day it was working just fine * Only thing I did as far as I know was switch my encoding to UTF-8...
 
@TriciaCuninghame How did you check?
 
ERROR message: End of file seen without seeing a doctype first. Expected"<!DOCTYPE html>". The X/HTML version of the code cannot be determined. Set to default X/HTML5. The default version cannot be overridden since the file is not in a project.
 
@ircmaxell Is that the same risc as playstation used to use?
@Programming_n00b Check for BOM characters
Not sure how it would handle those
 
6:09 PM
@PeeHaa Not quite sure how to check for them... I'll google BOM quickly..
 
user8334049
@PeeHaa - the user is getting an error to say they have missed all of the required fields. - so I checked using <?php print_r($_POST); ?> which showed nothing from the form had been set.
 
@TriciaCuninghame Check the request being send in the browser
 
user8334049
same thing on windows - showed the post variables...
 
I blame the user
 
I want to bring this up on internals again. :P The only thing I actually changed was separating the votes for allowing it for 8.0 and a vote for emitting the E_DEPRECATED notice from 7.3. Anything to say before I go for it?
 
user8334049
6:16 PM
@PeeHaa - nothing being sent according to Chrome :(
 
Yeah,,, No clue on this error...
 
Wes
evenings
 
@PeeHaa I don't think so
RISC means "reduced instruction set computer' and is a generic term for "simple" CPU designs
 
user8334049
5 other forms in the same website - all working fine... all very simple forms built in the same way... this one refusing to work on both the macs we have in the office... very confused!
 
6:33 PM
@bwoebi Why does github.com/amphp/artax/blob/… also include "embed"?
 
Hi guys
I'm reworking my personal website and I need inspiration for the back framework
For now I'm hesitating between Symfony and Laravel but maybe you'll have some cool stuff to test in mind.
Basically it's a blog.
 
@ircmaxell Ah cell was a risc architecture
kk
 
2 :P
 
@kelunik I have no idea … I don't even really know anything about embed SAPI
 
6:45 PM
@bwoebi You added that.
 
@kelunik Possibly. Doesn't change anything about my answer though
@pmmaga I would change the RFC to be index >= -1 instead of index >= 0 unaffected
 
@bwoebi nice one! ty
 
At least I sometimes write code like [-1 => "foo", "bar", "baz"][$a <=> $b]
 
> and training/workshop/class sessions at conferences still
regularly teach this as the 'standard way' to handle shell commands.
o_O
 
6:58 PM
@PeeHaa this is the PS1 en.wikipedia.org/wiki/R3000 chip.
except with some vector math additions; of which the cto of sony said it was the best 50 cents he'd ever spent.
 
@Danack :)
 
Wes
@ircmaxell semaphores?
 
no, just interface design
 
Wes
i wanted to keep it simple. i thought about moving the locking mechanism into its own interface but it was overkill for now, especially considered that's the only locking mechanism available. maybe weakmaps...
 
7:12 PM
@Wes yeah, the simplicity that I got was from removing the "unlock for" bit and use it in a return context
so you'd do $lock->advisory($identifier)->exec($callback); or if you wanted to not use a callback:
$ctx = $lock->exclusive($identifier);
// do processing
$ctx->release();
 
Wes
i had something like that, then i aimed for a more transparent design, i just do return write(function(){}); or return read(function(){}); in a method
next step is aop it, but only when i am sure it does all the things :P
right now i'm conflicted on whether it should be always enabled even in production
it is useful to catch the exception and retry, i notice
but determining the caller class scope is a heavy operation, requires to allocate debug_backtrace() without $limit
that's huge sometimes
 
why do you want to determine the caller?
 
Wes
oh because i am special casing methods in the same class
 
o_O
 
Wes
means that locks are only locks for third parties, including inheritor classes
 
7:21 PM
/me is confused
 
Wes
yeah i noticed locks among sibling methods were a bit too extreme :D
public function get(){
    return read(function(){ return 123; });
}

public function set(){
    return write(function(){ return $this->get(); });
}
this is allowed
because get() and set() are in the very same class
means that the read lock on get is ignored since the caller is "self"
 
yeah, I see why, but from a design standpoint that seems rather... brittle
 
Wes
i tried not doing it, but i couldn't use anything in write methods and it was seriously annoying :P
i just need to be more careful and keep in mind that locks are only for third parties
 
well, you could solve that with a "lock context" object that you then pass into the lock method
public function get($lock = null){
    return read(function(){ return 123; }, $lock);
}

public function set(){
    return write(function($lock){ return $this->get($lock); });
}
 
Wes
eh, it's not bad, but get() may be a public method and i'd rather not add $lock to it
how else could i do that? :\
of course i could wrap get() hiding $lock, but so much wrapping... and pointless lines of code... :P
 
7:32 PM
@Wes How do you get re-use out of factories? Particularly the ones taking things like request objects?
Like for example a REST API where I send in multiple aggregates in one JSON payload.
If I wrote the factory with a typehint of a Request object, I can't exactly pass just a property to it.
 
Wes
i have no idea, i'm not great with these things. better asking teresko or someone else
 
Wut?
If I remember right, you're the one that told me to abstract those kind of object creations when they're coming in with a DTO and a factory.
@tereško You have an answer?
 
Wes
i'm not even sure what you are asking :P
 
Imagine I have a JSON payload coming in for an endpoint that involves two aggregates.
I have a factory method that looks like this...
function createSomething(Request $request) : Something
And I have a matching factory for the other aggregate.
Now I need to build two factories for each aggregate even though they're almost exactly the same.
Because the request will have an extra layer of properties.

$request->some;
$request->thing;

turns into...

$request->something->some;
$request->something->thing;
Do you see what I mean?
 
@Allenph I don't use them
I personally find it to be the best answer
 
7:47 PM
@tereško Seems like they promise to abstract away mapping properties. That's a very nice promise if it's true.
 
... at the very minor cost of adding more layers and complexity :D
I try not to solve the problems, that I not have
 
8:12 PM
I just participated in the most motivating project kickoff I've ever had
such cutting edge, very technologies, amaze scope
so, since I'm hyped, I'm bothering you
 
Now go download your 3GB node modules :P
What's the project about?
 
@FélixGagnon-Grenier sounds like the little goblin at the back of your mind has begun looking for "exit strategy"
 
hmmm... nah, that project is possibly the money the company needed to continue my contract :)
@PeeHaa vaguely collaborative video conferences with computer vision elements
 
ah, so the exit strategy has already been formulated
 
Sounds vaguely cool :)
 
8:16 PM
:)
@PeeHaa not even sure there'll be javscript in that thing
 
there will ... or more likely: typescript
 
.... yeah.
I was trying to fool myself
 
@FélixGagnon-Grenier Sounds like you're working for a cam site. You can tell us.
 
heh, I would totally do, but no ;)
 
Not only can you tell us, but you should tell us a ton of details.
Like the URL, for instance.
 
8:19 PM
nah, I've said enough, actually
 
he's probably working on a solution, that allows having a controlled conference call using a single camera
think google hangouts type of "show on talk" but in a single room with one camera
 
Hello , is there someone more knowledgeable with ICU and Intl in php please? :D I'm trying to format something a certain way but can't find a pattern. Without a pattern it seems it displays the info I need for example
平成30年2月12日月曜日 22時23分42秒 東ヨーロッパ標準時 I only want to format the time 22時23分
This is what I'm using $DateTime = new DateTime();
$IntlDateFormatter = new IntlDateFormatter(
'ja_JP@calendar=japanese',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'Asia/Tokyo',
IntlDateFormatter::TRADITIONAL
);
echo $IntlDateFormatter->format($DateTime);
After the calendar tried different types of patterns but nothing matches what I need it seems
NONE for datetype removes the date but still leaves the timezone
 
Anonymous
@Naruto ping if you will be playing tonight
 
Anonymous
cc @SaitamaSama @MadaraUchiha
 
8:36 PM
@C.Astraea I'm not sure you can. icu has a different component that generates locale-specific datetime patterns
 
Wes
i totally didn't expect backticks to be controversial
 
Again imo you rfc' ed it wrong
 
Wes
i tried to follow your advice (and niki's and bob's).
it's still in discussion, i can still modify the rfc
 
Not sure if people will fall for it now tbh :P
 
o/
Afternoon
 
8:50 PM
Hey @Alesana
 
@samayo Not today I'm afraid.
Perhaps tomorrow.
 
Wes
@C.Astraea iirc the pattern generator was not ported in php
 
@Wes Don't backticks have a meaning in PHP already? Or am I missing some context?
 
Wes
they do, i am asking to deprecate that functionality
so that in future we can use `` for ustrings
 
That is a massive BC break
 
Wes
8:53 PM
...
 
I mean truly massive
 
How's it going?
 
Remember that (even though folks in the room don't like hearing it) PHP is more of a tool for hacking things together quickly than it is to actually build nice things with.
I'm fairly sure there's a very large amount of PHP code that uses that functionality.
 
@Alesana doing ok. How's you?
 
@MadaraUchiha aaaand... you really think that this massive amount of stuff updates php version?
 
8:55 PM
@FélixGagnon-Grenier That's actually a good point, probably not.
 
Wes
nobody uses `` in php @MadaraUchiha except the 4 persons that are complaining on the mailing list
it's not a bc break. you don't even know what they do, how can that be
 
@Wes The mailing lists hardly represent the PHP userbase.
@Wes Sure I do, they exec a shell command and return the result.
 
@Wes I think Stan nails that part with "if you need to do something it's bc break" tho...
 
Which is exactly the kind of hacky shit people will do when they need to do quick stuff with PHP
Especially w/ PHP as a CLI.
 
Wes
@FélixGagnon-Grenier it doesn't get removed immediately
 
8:57 PM
I know.
I'm all for it.
 
Actually, now that I think about it, with proper advanced warning and deprecation notices, should be alright.
 
but these are valid concerns, I guess
 
And it is a blight on PHP
 
also, what @Mad says
 
Nah, I retract my previous statements, I'm all for it.
 
8:58 PM
:P
 
foreach ($custom_fields as $custom_field)
results:
array(8) {
["custom_field_id"]=>
string(1) "7"
["custom_field_value"]=>
array(7) {
[3]=>
array(2) {
["custom_field_value_id"]=>
string(2) "14"
["name"]=>
string(19) "Nutritional-Corners"
}
[4]=>
array(2) {
["custom_field_value_id"]=>
string(1) "8"
["name"]=>
string(12) "Receptionist"
}
}
 
What's weird to me is the reason for deprecation
 
I need to create check for custom_field_value_id = '14'. Do I have create another loop $custom_fields['custom_field_value']?
 
@PeeHaa support for some othe arcane string? what's not to like? :trollface:
 
As in: the focus on unicode I don't get
 
8:59 PM
@PeeHaa I disagree with PHP's general approach to "we can't touch that without a very good reason"
 
I'm doing well, still trying to make life decisions :P
 
Wes
php 7 deprecated functions that are much more used than backticks. nobody complained about those
 
That approach means that PHP looks now almost exactly the same as it did 20 years ago.
 
@MadaraUchiha BC is annoying for people
 
Wes
so please, your argument is invalid.
 

« first day (2676 days earlier)      last day (2275 days later) »