« first day (1396 days earlier)      last day (3566 days later) » 

user895378
1:00 PM
And because it's clear that I'm incapable of writing 100% correct code without the aid of an IDE beyond a certain level of complexity.
 
And the second was for where to select.
 
@rdlowrey Yea, that used to bother me too but using PHPStorm made me get over that quick because it is super useful.
 
user895378
Is there no keyboard shortcut in/out of fullscreen mode in phpstorm? I can't find one and using the mouse to do it is annoying.
 
@rdlowrey humans are only humans…
 
However, committing IDE project folders into the repo reminds me of commitstrip.com/en/2014/03/11/coupable
 
1:02 PM
@rdlowrey Get a bigger screen :-D [no, really.]
 
Im just gonna try:
SELECT password_timestamp >= NOW() - INTERVAL 3 HOUR WHERE auth = :auth
 
@rdlowrey the car is Zastava/FIAT 126 also called "Little Iron" here :)))
 
@rdlowrey Not sure I don't go into full screen mode very often
 
user895378
@bwoebi My monitor is big enough. Fullscreen keeps me focused so I don't switch back to chat constantly. Especially when I keep a terminal maximized in the other monitor :)
 
@rdlowrey maximizing is enough… it doesn't need fullscreen?
 
1:05 PM
@rdlowrey On Win?
 
user895378
@Jack yeah
 
Isn't it just F11?
 
user895378
nope. phpstorm does its own thing.
 
Or some weirdo Ctrl+Alt+F or sth
On the Mac I don't bother with it ... swipe the whole desktop out :p
 
@Jack ;-)
 
1:08 PM
Though, on 27" the right side of my editor looks kind of empty in full screen.
 
@rdlowrey Setting up your own keys to (almost) any command is trivial, it's the Keymap in preferences, and then it has a search box on the right for the 'Toggle full screen mode'
 
@Jack Usually yes. But when ever you have longer lines, it's nice that they don't have to wrap.
 
That's true
 
user895378
@Danack thank you. You're like my own personal IDE angel :)
 
Annoyingly, running tests can be bound to a key....but they're not per project.
 
1:09 PM
@Danack Once a test has been selected you can just keep pressing ^R
 
@rdlowrey possibly more like a monkey on your back.......
@Jack do you know what command that calls because it gives ® at the moment.
 
@Danack Hmm, should be Run
 
user895378
@Danack still working on artax. down to only a couple things left to do ... just fixing the form body with files and allowing for non-blocking filesystem streaming in and out. will likely take all day today and tomorrow to do those things. Then I'll be writing tests the rest of the week so I can tag 1.0.0-rc1
 
@Danack Depends on the keyboard layout though =S
 
@rdlowrey Were you going to tag a 0.8.0 release with the changes currently in master?
 
1:13 PM
@Jack yep found it. That was bound to 'little house' + F10 - which doesn't appear to work for me, but yes, realise now that I can rebind that command.
 
user895378
@cspray I was going to but I figured I'd just go ahead and do the things needed to get to 1.0.0 since 0.8 was a massive BC break anyway.
 
@rdlowrey Cool, I've been distracted by learning how to RPM ALL THE THINGS so that my deploys take minutes rather than hours.
 
@Danack Yeah, Shift + Fn + F10.
 
@rdlowrey Makes sense to me
 
@Jack That makes the windows on my mac go to panel(?) mode veeeerrrry sloooowllly. It's cool effect, but it's not a unit test :-)
 
1:15 PM
lol
works fine for me.
ugh, that feel when you missed a somewhat vital abstraction ... ngnnnnnnh!
 
user895378
@DaveRandom I know I had mentioned allowing a proc-open (non-pthreads) version of amp to do non-blocking filesystem IO in artax but I realized that only works for inbound data from a response. You can't stream uploads that way because you can't pass the socket connection to the worker process (short of serious ext/sockets SCM_RIGHTS hackery).
 
user895378
For now, if you want non-blocking filesystem IO with artax you'll just have to use the php-uv extension.
 
user895378
Of course, this only matters if you're uploading/downloading large message bodies where streaming is necessary. If everything is small enough to be easily buffered in memory then it makes no difference.
 
@Danack For me that's the effect of shift+f3 (no fn)
 
Anyone able to tell me whats wrong with my query?
$checkDatetimeStmt = $db->prepare('SELECT password_timestamp >= NOW() - INTERVAL 3 HOUR WHERE auth = :auth');
I'm getting a fatal error.
 
1:20 PM
@RahulKhosla Well, if you were trying to write SQL just about everything is wrong with that
What table are you selecting from?
 
Oh.
password_timestamp
 
Why do you have a conditional before the where clause?
 
Not sure how else I should have done it.
 
Have you written SQL SELECT statements before?
 
Yes.
Select * from
Oh
 
1:22 PM
@rdlowrey reading
 
I forgot the from
 
@rdlowrey Are you using Amp for the mpm back-end?
 
@cspray Where would I put the from? Im only selecting the non-expired links.
 
@RahulKhosla The same place you'd put it for almost every other SELECT statement you'll write
You need to move the conditional for the time interval to after the WHERE clause
 
user895378
@DaveRandom right now I'm just writing a naive class that transfers 32K at a time to/from the filesystem via stream_copy_to_stream() and a version that uses php-uv. If the extension is available then the uv version is used. I'll add an amp version at some point but I have to do some refactoring in that lib first.
 
1:25 PM
@cspray SELECT password_timestamp FROM users WHERE password_timestamp >= NOW() - INTERVAL 3 HOUR, auth = :auth

How about this?
 
@RahulKhosla You can try it. Still not valid SQL
 
What have I done wrong here?
 
When you have multiple conditionals you can't just separate them by a comma.
 
anyone use wordpress here?
 
AND?
@PhDeOliveira me
SELECT password_timestamp FROM users WHERE password_timestamp >= NOW() - INTERVAL 3 HOUR AND auth = :auth
 
1:27 PM
Well, I don't know what your business logic is or what you're trying to do so I can't possibly tell you if you should be using AND or not ;)
@RahulKhosla Try it
 
Trying, thanks.
 
@RahulKhosla if you wanted to run a function after a post is updated.. how would you do that?
@RahulKhosla i know you could use the update_post_meta()
 
Not sure, I've only done theme development. That might be something with the core functions/files.
 
but where does that go.. in your theme's funtion.php?
 
1:29 PM
I wouldn't mess with that.
 
ahhh
 
@rdlowrey Reason I ask is a) I would like async fs i/o for Addr hosts file support and b) I'd be happy to look at adding SCM_RIGHTS support for a proc_open()/pcntl_fork() driven Amp back end when I've finished the Addr redesign
 
Get a second opinion because I only use it for themes dev.
 
I don't regard SCM_RIGHTS as a hack, it's relatively complex but it is using a feature for its original purpose
 
And that's as far as my WP support goes unless I'm getting paid ;)
 
user895378
1:32 PM
@DaveRandom Yeah, I shouldn't have called it a hack. It's a perfectly legitimate thing to do. That would be awesome. I will help.
 
@rdlowrey Essentially my concern is that, given that Addr will be a relatively integral part of Artax, they should share an mpm back end
 
user895378
Though even then it won't work in windows, right?
 
user895378
Or am I imagining that?
 
@cspray Didn't work :S
 
user895378
You can't send a socket to a different process without using a unix socket, right?
 
1:34 PM
There's probably similar functionality with named pipes
 
@RahulKhosla Did it throw an exception?
 
user895378
@DaveRandom well that would be cool if so.
 
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'auth' in 'where clause'' in /home/rahulkhosla123/public_html/stockdose/password-reset.php:3 Stack trace: #0 /home/rahulkhosla123/public_html/stockdose/password-reset.php(3): PDO->prepare('SELECT password...') #1 {main} thrown in
 
another part of the streams API redesign should be to try and create an abstraction layer that gives a common API for the lcd features of unix domain sockets and windows named pipes
 
user895378
^ important
 
user895378
1:35 PM
of course, libuv under the hood would do that for us.
 
@RahulKhosla Progress! Looks like your syntax is correct and now you just need to figure out why that column doesn't exist
 
It has named pipe support? (probably not looked)
 
OOO
I know
Thanks
 
user895378
I don't think the extension does. But C libuv proper does.
 
user895378
libuv abstracts all the missing windows functionality in PHP so that things "just work"
 
user895378
1:37 PM
PHP has a ton of gaps in its windows stream/socket implementations that are magically handled by libuv
 
user895378
Basically, all of the nonsense we do to bend over backwards and make things work would be eliminated if PHP integrated libuv
 
@rdlowrey and libuv, sitting in a tree, K-I-S-S-I-N-G
 
user895378
It's like the jQuery of async systems programming. It's wonderful and does all things.
 
user895378
And PHP ... well ... isn't and doesn't.
 
> How do I add two numbers together in C?
I jest, but I do completely agree, btw
Wearable news: the Apple iPatch is coming https://i.chzbgr.com/maxW500/8282075904/h221A29F5/
 
1:40 PM
hehehe
 
hihihi
 
hahaha
 
how's everything this fine morning?
 
@ircmaxell you can see it above :D
 
Asynchronous
I had breakfast and part of lunch at 4am
 
1:43 PM
@ircmaxell just awesome. Took a break to work on a side project /me dicking around
 
awesome!
 
Question, is it less memory leeching to write everything away in a csv file than creating a excel file? And then force the csv file to be opend in excel?
 
@Naruto Where "memory leeching" means what, exactly?
Also I suspect the answer will be: not significantly
 
user895378
@ircmaxell Fine, thanks :) How are you?
 
Although it depends on exactly how you construct the files
 
1:48 PM
Guys,
 
Reading data from a DB query directly from the wire, and writing each row directly to a CSV file as it arrives would use a couple of KBs of memory at most (probably)
 
How to receive Mp3 format files in user submit?
 
Building the whole file structure in memory before writing it to file would (obviously) use a lot more
 
@rdlowrey doing great :-)
 
@HassanAlthaf you can recieve the file by multipart
 
1:50 PM
And I suspect that something like PHPExcel will build the whole file structure in memory before any writes occur, but if you are running on Win and use the Excel COM API it's possible that memory footprint will be significantly reduced, although also possible it won't be - you'd have to suck it and see
 
@DaveRandom Well I need to optimise a module that creates an Excel file... But at the moment we are using to much memory, that's why my idea was to create csv instead of excel and then force to open in excel
 
@HassanAlthaf Same way you do any other file upload...
@Naruto First question: what kind of Excel file? (<=2003 or >=2007)
 
>= 2007 and PHPExcel
 
Also, are you using a home-grown lib or PHPExcel
Or something else
 
50 secs ago, by Naruto
>= 2007 and PHPExcel
:P
 
1:53 PM
PHPExcel will have a significant memory footprint I suspect, and I also suspect that memory_get_usage() won't show you all of it either because libxml
 
If you're using too much memory, you need to add moar memory.
 
^ true story
 
Well atm the memory usage of this site is set to 512, and still I'm running out of it while using the old module..
 
You're using >= 512M ?
 
Atm yes, but as I said I need to reduce the memory usage..
 
1:55 PM
No matter how much it's using, it shouldn't be enough to warrant optimisation unless a) you are building huuuuuuge files (Excel is wrong format), you have too many concurrent ops (you need a bg process queue) or you have a crappy server with no memory (buy more memory)
 
512M is kind of excessive; how big are those files?
 
Wait, is that 512 global or per-process?
 
eum
 
i'm guessing per request?
 
+- 15.000 to 20.000 rows and +- 60-70 columns
 
1:56 PM
Yeh, Excel is very much the wrong format
What are people doing with these files?
 
You don't want to know
 
They print those Excel sheets for toilet paper
"This is what I think of your report!"
 
@Jack I'm assuming that PHPExcel uses something libxml-powered (probably DOM) to construct the data files, in which case it shouldn't bug out because of memory limit unless you do something insane, because libxml does not use zend mm
 
Yeah, libxml is kinda naughty that way.
 
I tried to make it work once, segfaults for no readily apparent reason, didn't have time to debug it
@Jack It does have a mm layer that is replaceable, has a proper way to do it, if you want something to do I'd love it if you can make that workl
 
1:59 PM
ooh, how about that
 
I tried it once (only spent an hour or so on it), I managed to get it to work but the process always segfaulted on exit
It always seemed to be in the shutdown routines
 
Only segfaults in the shutdown? Ship it!
 
@Naruto I would say that the CSV idea is probably the best quick-fix
Here's a trick I have learned when dealing with CSV + Excel: Columns with phone numbers in (and any numeric data) are evaluated by Excel as numbers, and it breaks them. If you do ="012345" as the CSV field value, it forces Excel to treat it as text data @Naruto
 
user1642018
hi, how can i post data from the database as it is ? including line breaks
 
Anyone familiar with SwiftMailer?
 
2:02 PM
However, that is a format that only Excel understands (afaik)
 
@Fabien I've worked with it before but not for a while, what's up?
 
user1642018
i have inserted data in db in char field is like this 'dgfdsg

dg
sdg
s'
 
@Fabien yes it was horrible last I used it =]
I remember something about statics
 
user1642018
but when i retrieve data it shows like this 'dgfdsg dg sdg s'
 
2:03 PM
.. I think..
 
I'm sending out a few emails. Some attachments, some not. I only instantiate the thing once but loop through changing the content/attachments of the emails. But it seems the email attachments aren't clearing. They just keep getting appended
Is there a way to clear the attachments?
 
=/ sorry no idea
 
@Fabien Instead of instantiating it once, why don't you have a factory you use to get the object? Then, you start with a clean slate each time?
 
@Fabien You instantiate what once?
You want once transport object, you want a new message object for each distinct email you are sending
 
@DaveRandom Ok thx, altough no phone numbers involved, barcodes however are there, but it's indeed a nice trick, thx for the advice :)
 
2:08 PM
@Naruto If the data has spaces in it it will also be treated as text (although leading/trailing spaces are ignored)
There was another thing I found as well to do with dates, although I have now forgotten what that was :-(
 
@DaveRandom The swiftmailer objects
transport, mailer and message
 
user1642018
nvm, found solution, needed to use nl2br
 
hi guys...does anyone here works with my sql workbench? i´m trying to understand how after creating a database, the connection is make with wampserver..
 
@Fabien You want one transport/mailer that can be re-used, you need a new message every time
 
Yeah.
 
2:15 PM
Similarly, you only have one instance of outlook open, but you press "new message" every time you want to mail someone, you don't press "forward" on a random message and delete all the content...
 
Well transport gets updated.
aSide the point that can be set
 
Same goes for HTTP clients and requests btw, this is another thing that people seem to have difficulty getting to grips with for a reason that eludes me
 
Shut it, I got the concept :P
 
@Fabien How so?
 
smtp changes
 
2:17 PM
@Jimbo That wasn't directed specifically at you, many people do it
 
Am I using AND correctly?
UPDATE users SET password_auth = :newAuth AND password_timestamp = :newTimeStamp WHERE password_auth = :auth
 
no
 
How should I be using it?
 
@RahulKhosla read the manual of whatever db you are using?
 
@Fabien Then create a mailer/transport for each server I would say, modifying it in flight is likely to cause issues, and transports that can do it (like SMTP) will keep a persistent connection open over which multiple messages can be sent
tbh I personally would handle that by dividing the mail send tasks up so that you have one (or more) processes per-server
 
2:20 PM
New mega Pokemon everyone
 
@DaveFurry Muff cheers
 
DaveRandom is now known as DaveFurry
 
DaveFurryMuff
 
user895378
@DaveRandom someone should write an async mail lib
 
@rdlowrey oh yeah. I have some use fo dat
 
2:25 PM
@DaveRandom After they've finished what they're doing now and then help me on seedstream shout shout loud shout
 
Been on my list of things to do for literally years (at least 2), I even started it a couple of times, but SMTP is a great big bag of horror
 
user895378
^ I assumed as much.
 
user895378
SMTP just sounds terrible.
 
user895378
But slow mass mailing seems to plague everyone
 
, not AND I got it thanks @Patrick
 
user895378
2:27 PM
An async mailer where you could send hundreds/thousands of mails in parallel would be a big win.
 
@DaveRandom Do it Do it Do it Do it Do it Do it Do it Do it Do it Do it Do it Do it Do it <sub><sub>I need it for my project soon (couple of days)</sub></sub> :P
 
The problem is that async mailing wouldn't make a tiny little difference unless a) the remote relay server will accept multiple concurrent connections and b) the bottleneck is not bandwidth
 
> the remote relay server will accept multiple concurrent connections
I don't get that one?
 
user895378
The remote server would have to accept more than one connection at a time, right?
 
Don't they all do that?
 
user895378
2:29 PM
It's not bandwidth that's the problem now. It's doing each mail one after the other.
 
Now b) is unlikely, but it is highly likely that you will be using a relay server because of ISP restrictions and simply because sending valid email is hard and relays make it easier. Many many many services will only allow a single concurrent connection, which is why local MTAs are still a thing
 
user895378
That's some BS.
 
I understand why they impose that restriction. The spammers have spoiled it for everybody.
 
Need to send a load of emails fast? Spin up a load of free aws boxes to do it
 
Or just use the Amazon email service - aws.amazon.com/ses
 
2:32 PM
btw, local MTAs are often a good route to go down here. You can configure them to accept as many connections as you like, and while it doesn't mean that the emails will get to the recipient any faster, it does mean that your application can stop worrying about it
 
user895378
/me washes hands of any/all SMTP knowledge
 
Also not using a mail relay is a viable option if your ISP will let you and if you understand email, and especially spam metrics, well enough to be confident your mails will actually get to the other end
Oh also that means you code needs to be able to resolve MX and handle weighting etc
The long of the short of all this is that it is very worth paying for one of these services that deal with all this shit for you
 
Then it's generally just a nice clean HTTP multiplexing problem, and that is a thoroughly solved problem
 
sum1 halp!!!
 
2:38 PM
@HassanAlthaf Okay, now you're starting to be annoying.
Formulate a question on Stack Overflow, and stop dumping your code/non-question here
 
@HassanAlthaf a) do not use txt spk on the internet. Your ISP does not charge by the byte. b) that is an instruction, not a request, people who give help for free do not respond well to demands c) what @SecondRikudo said
a) is a particularly important point
 
@DaveRandom s/on the internet//
 
@SecondRikudo I can accept it in actual text messages and on twitter if (and only if) the message would have overflowed the character limit without it
 
@DaveRandom Eh
We've no such things in Hebrew, luckily.
We have other crap to deal with
 
I have occasionally wondered how non-ASCII text messaging works, but never wondered enough to actually find out
 
2:42 PM
Here's a conceptual idea, want to hear your opinions, @DaveRandom @rdlowrey @PeeHaa
How about a mail protocol that sits on top of REST and HTTP?
 
@SecondRikudo I think that's called "gmail" :-P
but seriously, someone must be working on something like that already
 
I mean something that would completely deprecate SMTP
 
Please help if possible, guys. pastebin.com/MwaBpKtX My Problem is stated there.
 
user895378
The problem is that everyone/everything uses SMTP now. It's basically "too big to fail"
 
user895378
You can't shift everyone to something new because there's so much legacy software depending on it.
 
2:45 PM
Looks like there have been many many attempts to do this over the years but SMTP is just too ingrained to make it practical
 
user895378
If you notice we're still using all the same basic protocols (with some modifications) from the early 90s when the internet became a thing.
 
user895378
The inertia you'd have to overcome to change things like that is enormous.
 
That said, M$ could be the ones to lead the way here - if they create an open-standard way for Exchange servers to communicate with each other directly, using a mechanism that still has a first hop of MX instead of some stupid centralised service, then people would actually follow on and implement it
 
user895378
It'll be interesting to see over the next 30-40 years how these things evolve or if we're basically just stuck with early decisions forever.
 
That's a pretty big if though
@rdlowrey I am struggling to think of one thing that has been cleanly replaced
I mean, people still use telnet for things, ffs
 
2:48 PM
browsers?
 
user895378
Even when things get replaced you still have to support the old things.
 
Some who can ask questions in StackOverflow, who can share my question?
 
@FlorianMargaine Nothing has fundamentally changed at the bottom level there though, it's still just HTTP
 
user895378
But browsers aren't protocols.
 
@HassanAlthaf make a new account
 
2:49 PM
@FlorianMargaine okay, then.
i hope i dont get a shit tonne of downvotes. -.-
 
user895378
And browsers change largely because early iterations SUCKED at implementing the established protocols.
 
@DaveRandom yeah, well, we still use assembly.
 
That's different though, that's not a protocol, it's a fundamental way to describe how a computer works
 
user895378
I sometimes wonder if over the next few decades all our software will become top-heavy and un-modifiable because of the weight of backward-compatibility.
 
that's the same at a different level. That's the fundamental way to describe how internet works.
 
2:50 PM
You can swap HTTP out for something better tomorrow if everyone does it at once, you can't swap assembly out without a whole new model of how a computer works
 
Hey guys, I am trying to remove special characters from a string by writing a small Utility Function to do so. However it is not working. Any idea why?
 
Changing HTTP is not about changing how the internet works, it's about changing how we use it
Even IPv6 hasn't made any real significant changes, all it's done is remove some bits people never used, and add some bits that should have been there in the first place
 
user895378
@DaveRandom except you still have to support the old way :)
 
user895378
That's the problem.
 
user895378
Backward compatibility is a real problem.
 
user895378
2:51 PM
It sucks.
 
@rdlowrey If everyone does it at once then you don't. Of course, that is not actually possible, so in practice that is true.
 
Yay. my dell venue pro arrived.
I know know nobody is interested. :D
Morning, btw
 
I can't help wondering if "HTTP2" (whatever that ends up looking like) should just "not use" port 80. It would make BC a lot simpler, and it would make implementation somewhat simpler, and potentially could make the protocol itself a lot simpler
 
0
Q: PHP, not inserting query?

JohnPlease note, this is not a duplicate. Also, do not down vote if you do not have a solid reason why. I'm trying to upload a file, it get's uploaded, but, it doesn't enter anything in the database. According to my test, the function get's called, but the database doesn't get populated. Any help? ...

 
Hey guys, I am trying to remove special characters from a string by writing a small Utility Function to do so. However it is not working. Any idea why?
pastebin.com/PJtdHp47
 
2:57 PM
hi everyone
 
@Leri what is that? Tablet?
 
user895378
@Leri morning
 
require_once('global.php');
really? ...
 
@BDillan what does it output so far?
 
@Patrick what
 
2:58 PM
@iroegbu Yeah, with windows 8.1 and pretty lightweight.
 
The same string
 
8" or 11"
 
@BDillan well I'm guessing your regex is wrong
 
Whats the best way to do this:
I need to reset an account_type when membership_days == 0.
 
2:59 PM
I don't know what would be correct though
 
Cron job or?
 
It's not
29
Q: Remove all special characters from a string

user115422 Possible Duplicate: Regular Expression Sanitize (PHP) I am facing an issue with URLs, I want to be able to convert titles that could contain anything and have them stripped of all special characters so they only have letters and numbers and of course I would like to replace spaces with...

I'm taking the first answer and it's not working
 

« first day (1396 days earlier)      last day (3566 days later) »