« first day (926 days earlier)      last day (4037 days later) » 

11:00 AM
Ok
 
@hakre That data isn't public, you'll never be able to do that. You can't even get that info when the user has allowed your app with OAuth and you are working with the API in an authenticated context
@MadaraUchiha Can't get on the server at the moment cos somebody has left a terminal server session open, and I can't override it even though I'm logging on administrator, because M$ are f*cking stupid. I should be able to get on to it in a bit though, but IIRC you just had to go and enable it in the properties sheet of the SMTP connector in EMC, the options were quite self explanatory. You'll probably need to enable basic auth as well, but you should be able to restrict it by host IP
 
Which means I need to go poke the admin to do it for me
 
You can set it up with anonymous access but don't. There's no point in 2003 architecture, since creating a use specifically for that task doesn't consume a CAL like it does in 2008
@MadaraUchiha Oh yeh, there's no way you are going to get this work without someone configuring something in EMC, regardless of Exchange version
 
It's about top be upgraded to 2010 though
So...after I configure the web server to be able to access SMTP, I should be able to do it without authentication?
Without authenticating myself as a user from the exchange?
 
@MadaraUchiha Mmm. I used to create a domain user for every app but I can't do that any more. I've had to just create a single user for all the apps to use because it consumes CALs and CAL consumption is now enforce :-(
 
11:09 AM
CAL?
 
Client Access License
 
@MadaraUchiha You can if the admin configures anonymous access, which I guess should be safe-ish as long as they restrict it to your server IP, but I still hate doing it
 
But will I need a domain user after allowing mail from that IP?
 
@MadaraUchiha See above message
 
11:10 AM
Oh, so I will need to authenticate
Joe do I do that in PHP?
 
Really it's a decision for the domain admin
 
@MadaraUchiha Just regular SMTP auth. Which mailer are you using?
 
I'll give you 3 guesses
 
swiftmailer - phpmailer - PEAR in order of personal preference
 
11:12 AM
I wish
mail()
 
*nix server?
 
With Microsoft Exchange?
WAMP
:/
 
Ahh well you're kinda screwed then
You can't just go dl swift?
 
I would if I could
 
You will need anon access configuring then
 
11:14 AM
The network is closed. It's not connected to the internet
 
Can't you do it on whatever you are chatting on and just copy the files across?
brb
 
And inserting stuff is a world of pain
I'm chatting from my mobile
 
:-(
You need anon access then, realistically
Unless you roll your own SMTP client
Which I don't recommend
 
@DaveRandom uhm, you can add a field called ##UserId## which will be pre-filled with the user wanting to run the query. Just insert the dashed into the query's WHERE clause.
 
@MadaraUchiha wrong @dave :) you pokes me not him. Use swiftmail and remember you need to authenticate against your SMTP server. and your usernames usually take the form domain/user on exchange
@MadaraUchiha don't forget to check if you need SSL for authentication
 
11:19 AM
@DaveRandom Hey Dave, using DOMDocument, after loadHTMLFile() can I print my new changes to the screen?
 
@Dave He can't use Swift, that's the root of the problem ;-)
 
So the admin gave me an address for an anonymous server
Let's try it
 
@Jimbo echo $doc->saveHTML();
 
@daverandom ofc he can he's just being pedantic. He clearly has internet access now and clearly has access to the code. He can copy and paste the .class from the repository into his code tree and nobody would notice :)
 
@DaveRandom Ah, just found it, thanks
 
11:21 AM
@Dave ...is basically what I said, apparently not
6 mins ago, by Madara Uchiha
And inserting stuff is a world of pain
6 mins ago, by Madara Uchiha
I'm chatting from my mobile
 
Akward but doable :) and besides who the hell works on live code on a mobile! do it properly or not at all
 
@hakre It doesn't maintain the relationship between number of votes and who cast them though, does it? They've always made a big thing of keeping data like that anonymous
@Dave Don't shoot the messenger :-P
 
@DaveRandom it does not offer that data in the results - as far as I have seen. But you might be able to burry it in subqueries. As written: I was not able to, but also my knowledge of that query language / system is limited.
I could however, create a list of posts I have voted on, but not for the close-votes. TypeId 6 was missing. But I can list bounties for example.
 
Okay so @Dave
I've tried using the server he gave me
mail() gives no errors
 
11:28 AM
@hakre Yeh I think it's about keeping "negative" data anonymous, so people can't tell who dv'd them. Although having said that, close/delete votes are public when the question is actually closed/deleted, so meh
 
Also when I try via telnet it seems to be working
But the marks aren't getting sent
Mails
 
Not getting sent or not arriving in the inbox?
(i.e. spam filters?)
 
Not arriving apparently
Because in the telnet I get all ok
There are no spam filters in the network
It's an inner work network
 
Oh right, closed network, you said
Well tbh this has now become a network admin issue. If SMTP is reporting success it must be the Exchange routing that's screwy
Are you using domain internal addresses?
like bob@whatever.local
 
I am
Also there are other apps that work on this server, and it does work for them
 
11:32 AM
You need to get an admin to check the delivery queues and see if the messages a) make it into them and b) make it out of them
 
Where can I check that?
On the exchange server? Or on the anonymous SMTP server?
 
@Dave When you love your codez, you're sat on the train, and you want to do something... you use your mobile! :)
 
Is the anon SMTP not an exchange server?
 
I have no idea really
 
Well, in any case, both I guess
 
11:33 AM
Because I think my admin only has accessed to the exchange server
Access
 
Certainly if the protocol part is playing the game and not reporting any errors, this is now an administrative issue. There's no way you can debug 3rd party application configuration from your codez :-P
 
@DaveRandom But well, I think it's a sane idea, otherwise users just would go there and pick stuff out for no good.
 
@hakre Indeed. I guess "the currently authenticated user" is harmless because it's your own data, as it were, but arbitrary users would be a bad plan IMO
We would like the data through the API though, could make the labels more intelligent
 
@DaveRandom yeah, only calling for bad blood (no idea how this is called in proper English)
 
@hakre That's a term we have in English as well, so probably that
 
11:38 AM
@Dave the opening line is as follows
220 server.name MIMESweeper ESMTP Receiver Version 5.3.1.2323 Ready
Does that seem suspicious to you?
 
@MadaraUchiha MIMESweeper is a spam filter
 
So...it means my message might be filtered? But that doesn't seem likely
 
What headers are you setting? It may simply be that you aren't giving enough information about yourself and/or the message
 
I have none in the telnet
 
Also what's the content, and what content-type did you set?
 
11:42 AM
Besides to and from
Content is hello world, I haven't sweet content-type
 
lol I can tell you're on mobile
Try setting Content-Type: text/plain
 
that's by greenheart games:
> Sorry, we had to take the downloads offline for a bit to find a new home for them. Too much traffic! We will be back as soon as we can.
 
And add a Subject: as well
 
how to track youtube video clicks???
 
11:43 AM
Which I do not understand: Why not just provide the demo via bittorent as they did with their fake-crack version?
 
Also when I try MAIL FROM, it tells met the command is unknown or not implemented
 
a youtube video is embedded in my website
 
It accepts just "MAIL" though
 
i want to track no. of clicks in it
i try to do with ajax and php via onclick pr iframe don't work in it
 
@MadaraUchiha That's weird. Still, telnet mail is a total PITA anyway, I would probably just be testing this with PHP. Use Wireshark if you want to view the raw SMTP
Oh you probably can't do that either
:-(
 
11:45 AM
Yeah, I can't
 
@upcomingdeveloper you don't have access to external resources (frame/iframe)
 
I can try opening a socket to control exactly what I send
 
0
Q: Switch/Break indenting in PHP

FreoniusI have a really dumb question and not really important but it has been bugging me for quite some time: how do I indent "correctly" the "break;" inside a switch statement in PHP? Like this: case "foo": do_whatever(TRUE); break; case "bar": ... or like this? case "foo": do...

I'm amused. ;)
 
yes
youtube give me a simple iframe code to embed video in my web page
but now i want to track number of clicks
 
@upcomingdeveloper try another way, without frames
 
11:48 AM
like??
i mean how??
@kaᵠ
 
@MadaraUchiha Yeh that'd work I guess. But first I'd just try something like:
<?php

    $from = "<from address>";
    $to = "<to address>";

    $body = "This is a test message";
    $subject = "Hello world";
    $headers = "From: $from\r\n"
             . "To: $to\r\n"
             . "Subject: $subject\r\n"
             . "Content-Type: text/plain\r\n"
             . "Content-Length: " . strlen($body) . "\r\n";

    mail($to, $subject, $body, $headers);
Epic syntax fail
Tell the server more about the message and it may get through
 
Goddamnit all external idiots should die
2
 
@DaveRandom fail no.3 ?
 
@kaᵠ I'm still gonna go with it being Monday's fault.
 
Just tried@Dave
No error, no mail either
 
11:55 AM
:-(
Does the From: address get a bounce-back mail?
 
Sigh what a major pain in the ass
No
 
Server admin needs to check the logs then. Hopefully it will provide a verbose-ish error message to help you fix the problem, or confirm that the message is being relayed successfully
 
I'll try
Damn thing
 
It may simply be that the content is too short I suppose. But if it's being blocked by a spam filter then it's kinda debugging a black box, the very nature of the thing relies on the fact that you don't really know the exact logic it uses to detect spam
Whatever is going on, you've now hit a wall that only the sysadmins can help you get past :-(
 
I don't think it's the content length because I can send one character or even zero length mails from the outlook client
Also, it's highly unlikely that there's any spam filters, because, well, I have yet to have a mail blocked
Know what? I'll deal with that as it comes
I have another question
I need to save a lot of data from a form
Originally I thought to just json_encode the whole thing and decide it when I need to display it again
 
12:05 PM
@MadaraUchiha Yeh but outlook a) doesn't use that SMTP server and b) adds a crapload of other info to the message headers
 
But I need to make reports and statistics based on this data
What's the best way to pull it off?
Brb
 
@MadaraUchiha It is the data multidimensional?
 
@LeviMorrison it's internal API because I prefer the apply name to call_user_func.
 
@igorw Seems a bit confusing to other developers IMO. If it was a method on Closure I'd fell different about it though, I would like $func->apply() and $func->call().
 
would be nice, but then it would only work with closure, and not all callables.
in js it works because you don't have callables.
 
12:19 PM
@igorw Mmm, I'm now thinking about Closure::createFromCallable(). Feels dirty but at the same time I sort of like it.
 
forcing everything into closures is messy imo
 
@igorw Messier than allowing arbitrary strings and arrays to be callable?
At least if you enforce callables into a closure you know if will be a rigidly defined object.
 
if you want to go that route, make a real Callable class or so
 
Damn I don't like mondays
 
Fair point
But then they don't satisfy callable typehints
 
12:25 PM
well, it would have to be added to core
 
all my friends are dead they got kicked in the head all my friends are deaaad
 
@igorw I wish PHP had create_alias; something like create_alias('igorw\\apply', 'call_user_func_array');
 
there's class_alias, there might actually be the same for functions as well.
hm, doesn't look like it
 
Good Morning
Efficiency is really meaningless in this context. It might become an issue if you do tens or hundreds of thousands of elements, but not before. Do whatever makes you code better readable — Pekka 웃 6 mins ago
@PeeHaa埽 i still feel echo current(array_keys($data)); meaning less
 
12:42 PM
@LeviMorrison interesting approach to varargs btw, hadn't seen that before. it does stand out a little less visually though.
 
@LeviMorrison that would be nice .......
 
@DaveRandom Well still missing $class = class {...} and $obj = new $class(); and $obj = new class {...}(); in PHP syntax until then.
or as @igorw once said in front of an audience not that long ago: PHP is a pirating language.
 
interfaces for functions would be nice
 
Damn
Anyone tips for generating a CSV from 1 sql table?
 
It is @Dave
 
12:50 PM
@igorw yes, yes they would
 
Tried fputCSV etc but I have some troubles
 
@Duikboot if it's MySQL, you can use SELECT INTO OUTFILE
 
That's what I am using :)
"SELECT * FROM pit_data INTO OUTFILE 'exports/results.csv' FIELDS TERMINATED BY ';' ";
 
so why are you talking about fputcsv then?
 
@Gordon Any advice for me heading to Berlin this weekend?
 
12:52 PM
Im a bit stuck in how to handle this
Just adding $stmt = $db->prepare($sql); $stmt->execute($params); ? because that doesn't seems to work well
 
And some of that data needs to be in a report
The multidimensional that is
 
@Duikboot "doesn't seem to work very well"? please give a description of what the problem is.
 
I don't know how to handle it now do I have to prepare and execute the data only?
Or how can I generate the download for the 'into outfile'?
 
you are exporting it into exports/results.csv, so once it is done, you do a redirect to that file. then the browser will be able to download it.
 
Ok, but I have to execute the SQL no? :)
 
12:56 PM
yes, you need to actually execute the query.
 
I do this now but receive an error
 
well, what is the error?
 
General error: 1 Can't create/write to file '/Applications/MAMP/db/mysql/exports/results.csv
Can't I export it to a folder I want :)
 
ok, paste that error message into google
 
I know how to handle it :)
but I don't know how to change the download location for the export
 
1:00 PM
0
Q: SELECT INTO OUTFILE can't write to file

Jason SwettI'm trying to do a SELECT INTO OUTFILE and I'm getting the following error: General error: 1 Can't create/write to file '/home/jason/projects/mcif/web/downloads/dump.csv' (Errcode: 13). Failing Query: " SELECT name INTO OUTFILE '/home/jason/projects/mcif/web/downloads/dump.csv' FIELDS TERMINATED...

5
Q: How can I have MySQL write outfiles as a different user?

David LockeI'm working with a MySQL query that writes into an outfile. I run this query once every day or two and so I want to be able to remove the outfile without having to resort to su or sudo. The only way I can think of making that happen is to have the outfile written as owned by someone other than ...

^ read those
 
Ok :)
Dammit this sucks
 
@igorw I find it emphasizes varargs even more.
 
Oj @igorw It works now, the export thanks, I just have to find a way how to pass it to another folder the CSV file. :p
 
@Duikboot well, just move or copy the file...
 
Best way to do this is just write a function to grab the file and move it then? Or is that not the best solution?
 
1:10 PM
PHP already has a function to move files
 
I know but it's just not in code that I talk it's more logic.
 
yes, that's what I would do in this case.
 
So 1. generate CSV 2. csv in the dir 3. move to another dir where I can grab it
ok :)
thanks
 
FFS, why they keep on beating the same dead horse
 
BAAAAACK!
 
Anonymous
1:26 PM
I am backkkkkk
 
Anonymous
After a week of suspension
 
Anonymous
I tell y'all it felt like vacation
 
Helooo
 
@PHPfan Suspension? What happened?
 
Anonymous
I asked to be suspended, just to concentrate on other things @Jimbo
 
Anonymous
1:28 PM
It feels good to take some time of the screen
 
That's very mature. Reminds me of when I had my xbox taken out of my room while I concentrated on 3 weeks revision for my artificial intelligence uni exam. If I hadn't done that, I wouldn't have a degree.
 
@Jimbo power plug adapters. apart from that no, just be yourself and make sure to socialize a lot
 
Anonymous
@Gordon do you detail out the reason when you suspend me? I don't want it to look like, I did something wrong
 
@Gordon: Do you know when the PHP 6 branch was deleted?
 
@PHPfan chat suspension are not visible but yes, I do leave annotations on your user profile explaining you asked for the ban and linking to the transcript
 
Anonymous
1:33 PM
thanks
 
Anonymous
because i'm running for a mod next year :)
 
Anonymous
i need a clean sheet
 
@OlegOrlov I know one person at least who did, his name is Derick. Why do you ask?
 
That's like comparing a potatoe to an apple. Both sort of round, but totally different overall.
 
@OlegOrlov What's your question?
 
1:38 PM
anyone an idea about what I could be doing wrong?
v
I want to remove the oldest file in a dir
( I only want the most recent file in a directory )
 
2
A: How to delete files from directory based on creation date in php?

GordonTry SplIterators // setup timezone and get timestamp for yesterday date_default_timezone_set('Europe/Berlin'); // change to yours $yesterday = strtotime('-1 day', time()); // setup path to cache dir and initialize iterator $path = realpath('/path/to/files'); // change to yours $objects =...

 
Some people have better search engines then I do. Thanks @gordon :p
 
0
Q: Tricky mysql and php query

Rusmanica Tudor Nicolaeso i have 2 tables table1 id username category 1 nick 1, 2 table2 id category 1 friend 2 enemy 3 neutral now i want to print a list of just the categories with the id that does NOT appear in the table1 category li...

Why do people keep storing csv in database fields?
 
Thanks gordon im almost there
The systems counts all the records in the folder but won't delete them :p
 
Yo dawg, I heard you like data so I stored some CVSs in your MySQL so you can MySQL your CSV's.
 
1:46 PM
and I have the unlink option on.
 
@Duikboot enable error reporting to see if it gives any errors, likely about permissions
 
= enabled no errors
 
@kaᵠ Restecp
 
PHP Notice: Trying to get property of non-object
oh
 
@kaᵠ I'm even more disgusted by the fact that MySQL apparently offers a function that can deal with that. Yuck...
 
1:49 PM
cool :)
 
Feels like food for trolls.
 
does MySQL also have a function to deal with JSON embedded in CSV ?
 
I sure hope it doesn't. Eeew.
 
lol
 
1:51 PM
@kaᵠ you can write one for mysqlnd
 
3
Q: php crypt for password hashing. Blowfish produces weird output

AnpanI am having a bit little bit of trouble understanding php's crypt function. My PHP version is 5.4.7. I want to use crypt to store salted passwords in the database, because as far as I am told, developers who use md5 to hash passwords are to be staked and burned on the spot. I wanted to use the ...

+ Nice just curios why you did not use RecursiveFilterIterator since your answer is all about Iterators :) — Baba 3 mins ago
@kaᵠ unknown image found
 
@Baba ?
 
@Baba do you mean for limiting the files by date? It would require a custom Iterator
 
@Gordon but cleaner and re-useable
@kaᵠ are you the name @kaᵠ i know ?
 
@Baba yes, changed my avatar, check the questions :)
actually i'm working on a better avatar (smooth as the old one was pixelated) but i'm not great with GIMP
 
1:55 PM
@kaᵠ Nope am going to do my own @kaᵠ test .... What is ka best database a. FoxPro b. Flat File c. dev null
 
@Baba yes, but I would have to explain how it works then while the current works as is
 
Something must be wrong, it wont remove my files at all :( pastie.org/private/bxuxipld4av21kn3zcfc5a
 
@Gordon cool .. why the hell did he pick while (false !== ($file = readdir($handle))) ?
 
@Baba lol, C ofcourse, and if not possible, B, and if pigs fly, A
 
Some OP never appreciates a good code
@kaᵠ hehehe ....... how are you doing ?
 
1:56 PM
lol :)))
making a quality avatar :))) rofl!
 
@kaᵠ updated my brain with the new image
 
@Baba don't it's saved in /tmp and planning to reboot soon :P
 
@kaᵠ dully noted
 
@Duikboot try unlink($object->getRealPath());
 

« first day (926 days earlier)      last day (4037 days later) »