« first day (2480 days earlier)      last day (2482 days later) » 

10:00 AM
and then your /hello-world route will (should) work
 
@DaveRandom manually create new vhosts?
 
(step-1) Creating account on third party app
(step-2) Take subscription id from their response
(step-3) Creating database using that id
(step-4) Update in master table
 
@Linus congratulations! today my $age += 0.00273777583;
 
@PaulCrovella Any help in how to start using any framework
 
@Akshay OK, well that's just a procedure of things that need to be executed in order. You don't need any kind of parallel processing for it. It's just a script.
 
10:02 AM
@ParthGoswami I suggest starting here github.com/PatrickLouys/no-framework-tutorial
 
Threads and parallelism are for when you need to do more than one thing at once.
 
Okay ! So

fun1();
fun2();
fun3();

Will help
 
Pro-tip: you almost never need to do more than one thing at once
 
@DaveRandom Ahh okay
@DaveRandom Thanks a lot ! Saved my day! <3
 
if you do ever need to do more than one thing at once then the thing you should do is do fewer things
 
10:04 AM
I am not helpful
 
@DaveRandom added a new vh to my vhosts file:
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs"
    ServerName home.dev
    <Directory "C:\xampp\htdocs">
    Allow from all
    Require all granted
 </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs"
    ServerName home.dev/sandbox/public
    <Directory "C:\xampp\htdocs">
    Allow from all
    Require all granted
 </Directory>
</VirtualHost>
 
@DaveRandom 0_o That's not true!
 
@Daruchini ServerName needs to be a host name (i.e. DNS name or IP address) only
@Akshay the comment that was there before I edited was not helpful
@Daruchini e.g. create an entry in your hosts file of 127.0.0.1 sandbox.dev and then set the server name to sandbox.dev and <Directory "C:\xampp\htdocs\sandbox\public">
good lord I had forgotten how horrible Apache config is
 
Ok i'll give it a go now. Thanks for helping btw
 
I heard threads can give you cooties ...
 
10:08 AM
np
 
yeh it sucks, i don't know any different though :p
 
@Daruchini are you familiar with any unix-like OS?
 
also, they said your mama is fat ...
 
Morninnings
Congrats @Linus
 
E_TOO_MUCH_ENTHUSIASM_FOR_MONDAY
 
10:09 AM
@DaveRandom mac :p
 
@joe did you ever get anywhere drawing windows in php?
 
what do you mean by windows ?
 
@JoeWatkins I had a really nasty case of Threads last year, had to go to hospital, took me weeks to fully recover
 
the gui element, yes
 
Threads father! my killed
@Daruchini OK, you ever touch terminal?
 
@DaveRandom yeh
 
user5876173
i want to use the moodle sessions in my application(php)...
so that if user logged in my portal..they don't need to again logged in moodle portal..
can any one help me how to do this...
i am struggling to do this from past 2 days..but i didn't find any answer..
 
@Daruchini you are using xampp under osx or windows?
 
@JoeWatkins yes, that thing.. did you make progress on it after your initial kinda working success?
 
10:11 AM
@DaveRandom on Windows, (i'm at work) but I also have my mac with me
 
@PaulCrovella the thing we are waiting for progress on is the underlying library ... it's moving forward slowly, but still has a lot of the stupid ...
 
the guy is always working on really obscure code, it feels like he's waiting for sponsorship or something ...
 
@DaveRandom hahaha
 
@Daruchini OK here's what I recommend - not necessarily now but as a medium-term project that will drastically improve your life in the long term. Install virtualbox, set up a VM with the *nix OS of your choice (I like CentOS personally but opinions vary a lot). Learn how to configured nginx with php-fpm. It's a substantially better web server, both in the way it functions and how you configure it.
like I say though, I'm not saying you should out and do that right now, it's just something that imho is very worth putting some effort into
Still, what you are trying to do absolutely can be done with Apache
@Daruchini another point about this is: your development environment should be as close as reasonably possible to production, in OS and software
 
10:17 AM
@DaveRandom fair point. Does this mean by setting up these vhosts are a quick fix that i'll need to change again when going 'online'
 
So find out what the production server runs, and try to set up the same OS and the same versions of apache/nginx/php/mysql/whatever for developing against
@Daruchini well it depends what you are doing really, I guess the point is that you should be able to deploy from dev to production with absolutely minimal changes in config from the two environments
in an ideal world, the only difference would be the server name
 
Yeh true. Well I'm a long way off production, still on the routing hurdle haha. This isn't my normal job role anyway but still giving it a go!
 
it seems like what you are doing at the moment is a learning exercise in routing though? So for those specific purposes, any setup that works is fine, because you should be focusing on the PHP code rather than buggering about with web server config
 
hi guys can i you help me with some ideas how do you select and sql where the field for month and days are separate and you need to between it. For example

select * from notifications where days."-".months BEtween "1014" and "1030"
 
But it is 100% definitely worth having this in a separte vhost, because routing is usually done from the domain root, i.e. there aren't usually extra path components in there
 
10:21 AM
@DaveRandom @RonniSkansing thanks ;)
 
@DaveRandom I'm basically trying to set up a base structure without a framework to show the other devs that we don't need to use a framework
 
sure, well that's commendable, and I think this should be all you really need:
15 mins ago, by DaveRandom
@Daruchini e.g. create an entry in your hosts file of 127.0.0.1 sandbox.dev and then set the server name to sandbox.dev and <Directory "C:\xampp\htdocs\sandbox\public">
 
Happy birthday @Linus
 
along with whatever rewrite rules are required to actually get PHP to handle the request
 
^
 
10:24 AM
@PeeHaa thanks :)
 
@DaveRandom yeh i think i need to update my system32 host file too
 
yes, which is a fucking huge pita because windows is poo
 
YUP
 
you have to open notepad as administrator
 
ok i've done something wrong
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs"
    ServerName sandbox.dev
    <Directory "C:\xampp\htdocs\sandbox\public">
    Allow from all
    Require all granted
 </Directory>
</VirtualHost>
 
10:28 AM
actually you can also just open an administrative command prompt and run echo 127.0.0.1 sandbox.dev > C:\Windows\system32\drivers\etc\hosts
@Daruchini oh you need to change DocumentRoot "C:\xampp\htdocs\sandbox\public" as well
actually moment
 
Oh I thought that was for the parent
ah that worked :)
NOW LETS TRY ROUTE!
 
If it doesn't work, var_dump() the method/path and make sure they exactly match the routes you defined, i.e. no trailing slashes that shouldn't be there, make sure the casing matches, etc
if you want to make it case insensitive then, well firstly don't, but if you must then define your routes in lower case and strtolower() the path before you pass it in to the dispatcher
 
@DaveRandom ok so progress.. added a '/' route for the default which works fine (echo's out what it's supposed too)... still getting a Object not found for the hello-world + 'another-route' cases
URL: http://sandbox.dev/hello-world
 
odd, is the code still the same as the original gist?
 
yeh, just with an additional route '/'
 
10:37 AM
OK I'm going to try running it myself, moment
there's nothing obviously wrong with it
 
sweet, thanks @DaveRandom
yeh i'm a bit confused
 
@Daruchini can I just get you to triple check that the path doesn't have a trailing slash? I have a vague recollection of Apache doing something weird around this in some scenario or other
just setting up a fresh vhost
 
\o
 
slash in the url or the vh?
 
@Daruchini var_dump($request->getPath())
 
10:42 AM
ah
string(1) "/"
 
That's when you went to http://sandbox.dev/hello-world?
 
Nope that was just: http://sandbox.dev
sandbox.dev/hello-world is giving me an object not found and error 404
 
@Daruchini put var_dump($request->getPath()); exit; before the switch
 
Anonymous
!!wotd
 
ergate: a worker ant.
 
Anonymous
10:45 AM
@PeeHaa you smell like an ergate.
 
@DaveRandom yeh same error. eh haha
 
@Daruchini OK then the problem is with your rewrite rules
 
The routes?
 
@Daruchini No, I mean that the request is not even hitting PHP
the reason that / works is because the file is called index.php
moment
what version of apache are you running? @Daruchini
in particular, is it 2.4 or later?
 
morngins
@JayIsTooCommon o/
 
10:55 AM
@DaveRandom 2.4.26
 
Anonymous
moins
 
mornin PeeHaa
 
yes!!
 
Anonymous
good guy dave
 
10:58 AM
I need to disappear for a bit, will be back in an hour or so
ttfn
 
@DaveRandom thanks a lot!
 
So, I just realised I'm double booked for PHPNW, not sure what to cancel :/
The other thing being a company holiday
 
Anonymous
where's the company holiday?
 
some country mansion, not sure
 
sounds haunted
 
11:17 AM
Add month on date 31 july 2017 – #75011
 
wesnetmo.blogspot.com/2017/07/… new blog post. it's a question. let me know your thoughts :B
 
@Jeeves the bug is that a "month" can be a variety of lengths.. you should report this upstream to Pope Gregory XIII
 
@PaulCrovella Are you going to leave me alone?
 
I'm free wow!!!!No more bans for me !
 
@Arslan.H optimistic
 
11:25 AM
guys , halp
PHP is broken
 
and you realize that now?
 
@tereško ?
 
so .. basically I have this piece of code: class DbStatement extends PDOStatement implements Iterator (yes, I need it)
> PHP Fatal error: Class PdoCompat\DbStatement could not implement interface Iterator in Unknown on line 0
 
you are getting what you deserve if you ask me :B
 
ping, @JoeWatkins
 
11:26 AM
wrap it instead?
 
pdostatement already implements traversable rite?
 
weeeell, kinda
is there a way to feed data directly in it?
 
:)
I don't want to know what you are doing
NANANANNAAN CANT HEAR YOU
:P
 
@JayIsTooCommon you infantile pillock
 
!!urban pillock
 
11:28 AM
[ Pillock ] A man who has dropped a major bollock. Not nescessarily a stupid bloke, rather, one who has done a stupid act.
 
I have a class, that mimics PDO, so that it would work with our legacy crap
since PDO does not have a proper interface to typehint, I am extending it
 
Anonymous
@WesStark hello?
 
any ideas?
 
the message you left on the blog
 
Anonymous
Ah, crazy right?
 
11:31 AM
for is the ``Transversable` actually implemented in PDOStatement?
 
@WesNetmo ASM ALL THE THINGS!!
you see @JayIsTooCommon at least dave tried
 
Anonymous
@WesStark <3
 
> The word 'swims' upside down is still 'swims' - Jay
 
There are in VM functions like zend_compile_clone(znode *result, zend_ast *ast) and some without znode *result - when do I use passed result and when not?
 
sʍᴉɯs
 
Anonymous
11:39 AM
!!wotd
 
ergate: a worker ant.
 
Does anyone know when in zend_compile.c znode is used in a functions? What is it for at all?
 
!!dad
 
Did you hear about the actor who fell through the floorboards? He was just going through a stage.
 
12:01 PM
@MadaraUchiha you know the answer wesnetmo.blogspot.com/2017/07/… :B
 
@WesStark with the magic of binding closures nothing is safe
 
@WesStark I think the question you should ask yourself is why does screweing $a screws with $b
Also, your factory function doesn't prevent you from getting an unsafe $b from another source
 
What is znode in PHP VM for?
 
!!lxr znode
 
12:09 PM
@WesStark Why would, as long as A implements a correct interface, making a state change in one object destroy the functionality of another?
 
@MadaraUchiha e.g. B is a wrapper cache with a ttl, A fetches from storage. if i change A without passing through B the cache will break
@MadaraUchiha but you think that singleton is bad, right? why is singleton bad, but this isn't?
 
@brzuchal Seems to basically be a state bucket to hold data for lxr.room11.org/xref/php-src%40master/Zend/…
 
i mean, i can encapsulate at any level i want. not necessarily in the class
brb shower i'm melting
 
@MadaraUchiha github.com/php/php-src/pull/2662 Nothing interesting really
Just usual bikeshed effect
 
@DaveRandom Thx, I see there are lot of things I need to learn about :/
 
12:13 PM
@Jeeves /* Temporarily defined here, to avoid header ordering issues */
ah yes, "temporarily"
 
@NikiC That still wouldn't make me any less alive.
 
I'm trying to implement short closure and I already have parsing then as I can see there are some functions which operates on ast like zend_compile_something which do zend_emit_op which would be the most important thing right? the operand yes?
 
I think we should replace cleverbot with a markov chain built from the PHP manual and MDN, it would make about as much sense
 
I'm reading @NikiC blog post about VM but for a newbie it's quite hard to understand at first read.
 
@DaveRandom and the chat logs
 
12:18 PM
@DaveRandom Microsoft's nazi bot might be better if they allow people to interface with it again
 
@PaulCrovella that will totally end up with the bot posting abusive messages about @JayIsTooCommon which then get starred
 
mission accomplished
 
anyone got a sane idea of how I can test if a given phone number is in a list of 240 million phone numbers without loading the list into a database?
and without O(n) lookups
I mean obviously "create an index" but I can't do that in-memory
 
Nobody is going to check it random_int(0, 1)
 
Annoyingly they are :-/
 
12:23 PM
Well just ask them whether it was in it :P
 
I am basically going to end up writing some kind of indexing engine here and a really don't want to do it
 
oh god
 
I'm guessing you don't mean one number, but you need to check a lot of numbers
in which case you may as well cull with a bloom filter
 
The list itself changes daily, and I have to do n lookups daily where n > 0
I might just go back to them and tell them their "no database" rule is stupid
 
you didn't already tell them that?
 
12:26 PM
Thanks @Trowski \o/
 
well yes, but this time I will append "...and you can fuck off"
 
@MadaraUchiha got my point?
 
Mornigns
happy birthday @Linus
 
btw, who is this? "Very interesting. Something we should all do." someone agreed with me :B
 
Does anyone (maybe @Jimbo) have any docs on how you can show the difference to junior programmers between cutting a corner, because it doesn't need to be done now, compared cutting a corner, which means you're going to need to re-write that code in about 2 days time?
@DaveRandom create one file per phone number. then use file_exists().
 
12:35 PM
@Danack that's... actually not as terrible an idea as it sounds like
 
Yes it fucking it.
 
check your inode limit first
 
@DaveRandom an article from someone who sounds like they are solving the same problem you are:
https://medium.com/the-work-we-do-hikeapp/storing-hundreds-of-millions-of-simple-keys-in-282-mb-with-redis-2142b7c52cc9
redis isn't a DB - so that meets your criteria.
 
I'm using Auryn dependency injector to make http requests/responses:
$injector = include('Dependencies.php');
$request = $injector->make('Http\HttpRequest');
$response = $injector->make('Http\HttpResponse');
 
So yeh, I just had an update on that point, from a person who had the expression of an extremely exasperated person: apparently the person in charge of signing this off believes that databases are inherently insecure
 
12:37 PM
Which is fine (not giving an error)... but when I try to use a method from the Http, I'm getting a 'method not found', any ideas how to debug? Here is my dependencies.php gist.github.com/samtozer96/fb220cc813b2a3b73970483dac6b0f93
 
@Daruchini Don't use stringed string classes
 
@Danack maybe
 
Use Class::class
 
PeeHaasMotherHasNo::class
 
@PeeHaa if you're not using an IDE, it doesn't make much difference....
 
12:38 PM
Happy birthday @Linus :)
 
@Danack Not using an ide?
What is this
 
@Daruchini on the line before they "method not found" error, put var_dump(get_class($request)) - and see if it's what you expect.
 
Also without knowing what method on what class you are trying to call it's kinda hard to guess what you are doing @Daruchini
 
Even VI has syntax highlight so then class names are highlighted and it's not AFAIK an IDE
 
(you probably have a typo in your code btw).
 
12:39 PM
@brzuchal Yes even my crappy text editor does \o/
 
@DaveRandom Update #2: The project is temporarily on hold
 
@PeeHaa pair-programming with someone who doesn't use an IDE is my current favourtitest thing ever.
 
:P
 
"Right create a file in this directory" - 30 seconds later, the file is created.
 
Is it even possible to develop a PHP app without an IDE?!
 
12:40 PM
Sure, it just takes twice as long.
 
@Danack hehehe
 
@Danack so how long does it take to do some namespace renaming then?
 
However long it takes to open all the files and do the edits by hand.....
 
which is why you use pair-programming, so it takes twice as long for twice as many people
 
That's not gonna be twice as long
 
12:41 PM
@brzuchal When I was still doing texteditor development mostly I was a master with regex replacement and crying
 
@Danack you forgot to move every file also
 
@Danack You could come up with something where they should have used an interface, but didn't, and cutting that corner now means it's super difficult to make a change
 
@PeeHaa Yes, they're very helpfull, but I didn't get that replace syntax in VI working
 
I only use vim on servers
Also I hate even looking at servers
 
I'm pesonally doing it also, but never got that s\.... working so then I'm doing cat
 
12:44 PM
Hello guys and gals
 
@Jimbo I've actually got an example, where they've designed an object incorrectly, merging two different concerns - one of those concerns just has a mock implementation for now. We're going to have to go back and edit that class, and touch everywhere that uses it.
 
I like cats and all, but not that much
 
anybody can please spare few minutes and see my question here: stackoverflow.com/questions/45415129/…
this roadblocker for me so please help !
 
That's... js
 
But the person justified it as "we're going to have to touch it anyway, why bother getting the class design right", and it was hard to explain that getting the class design right would lead to less work overall.
 
12:45 PM
@Abdul that's jquery and js related, this is PHP chat!
 
> But this is not working.
 
Anonymous
@Abdul stop cross-posting
 
!!doritos
 
!!notworking
 
Nov 15 '14 at 23:43, by Danack
Do you mean it stays at home eating cheetos and play xbox?
 
12:46 PM
ty.
 
:-)
Was it triggered on mine? :P
I was also just guessing here
 
!!alias doritos notworking
 
Command '!!doritos' aliased to '!!notworking'
 
\o/
 
\o\
 
12:46 PM
/o/
 
\o/
 
!!alias cheetos doritos
 
Command '!!cheetos' aliased to '!!doritos'
 
@PeeHaa Sorry, I'm trying to make an instance of a Http/HttpRequest object using Auryn. The object takes 5 params which I define in the dependencies.php (gist posted). So once I use: $request = $injector->make('Http\HttpRequest'); I would expect to be able to use the public methods available within the HttpRequest class
atm, this isn't the case
 
8 mins ago, by Danack
@Daruchini on the line before they "method not found" error, put var_dump(get_class($request)) - and see if it's what you expect.
 
12:47 PM
The object is not what you think it is
 
!!alias my-arse peehaas-face
 
Command '!!my-arse' aliased to '!!peehaas-face'
 
wat
!!peehaas-face
lol aliasing unknown commands
nice
 
oops I must of missed that @Danack let me try
 
yeh should probably lex them but I am lazy :-P
 
12:48 PM
string(16) "Http\HttpRequest"
 
I know that feel bruv
 
do any of you guys remember Vice City map being so small?! i.redd.it/b5bsecgq2wcy.jpg
 
yeh VC was tiny compared to LC
 
is there any reason why pq is installed on the box for jeeves @DaveRandom?
 
@Daruchini replace that with var_dump(method_exists('request' , 'whatever_method_you_are_calling' ))
....I haven't annoyed dave recently.
!!alias peehaas-face my-arse
 
12:49 PM
Command '!!peehaas-face' aliased to '!!my-arse'
 
@Danack its ok I've been annoying him :p
 
@PeeHaa we were going to move the data storage to pg at one point, still want to do that eventually
 
hahahhaha
 
!!peehaas-face
 
it gets better
 
12:50 PM
!!uptime
 
╔══════════════════════════════════════════════════════════════════╗
║ [4 days, 6 hours, 17 minutes and 17 seconds] without an accident ║
║                   since [2017-07-27 06:32:49]                    ║
╚══════════════════════════════════════════════════════════════════╝
 
awww.....didn't kill it.
 
@DaveRandom Can I remove it for now?
 
sure
 
kk ty
I am kinda guessing why something in my application doesn't work. So I am applying "delete random stuff" until it works
 
12:51 PM
@Danack bool(true)
:?
 
@Danack I'm surprise it didn't tbh
 
ha!
\o/ victory is mine
 
morning!
 
@Daruchini Can you post that line with the debug on, and the next line with the method call on it?
@DaveRandom their could be something spinning cpu, just not dying.
 
well it would have made the bot unresponsive, it's all in one thread
 
12:55 PM
@Danack the code or the output?
 
@Daruchini the code please.
 
@Ekin ,@Kaori and whole room 11 thanks a lot for wishes :)
 
var_dump (method_exists($request, 'getMethod'));
$routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getPath());
 
@Daruchini What is the exact error message you get?
 
@Daruchini can you put the actual error message you're seeing, or split the line into one call per line.
jinx
 
12:58 PM
:P
 
!!uptime
 
╔══════════════════════════════════════════════════════════════════╗
║ [4 days, 6 hours, 26 minutes and 21 seconds] without an accident ║
║                   since [2017-07-27 06:32:49]                    ║
╚══════════════════════════════════════════════════════════════════╝
 
interesting
 
What is?
I need to reboot the machine soon to test some services if that makes you happy?
 
I'm not getting a run-time error. The methods are just highlighted in my editor with the message 'Method not found'
 

« first day (2480 days earlier)      last day (2482 days later) »