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

00:10
You can copy the example code to wherever you need it
@PeeHaa damn you are committed, was just checking out your chat chat.stackoverflow.com/transcript/43525/2013/12/19/14-21 which gave me some pointers. im getting the Fatal error: Call to a member function getAbsoluteUri() on a non-object as well and can't seem to work it out
Can I see your code somewhere?
have literally pasted from the example github.com/Lusitanian/PHPoAuthLib/blob/…
$credentials = new Credentials(
$servicesCredentials['etsy']['XXXXXXXX'],
$servicesCredentials['etsy']['XXXXXX'],
$currentUri->getAbsoluteUri()
);
Look in the bootstrap.php file
The uri is created there
have taken and look and echoed out at the end of it and it echoes
00:19
@JoeWatkins or @bwoebi could you do me a favour, and point me to an example in PHP src of how to store references from one object to another object for internal objects, and what needs to be done to make them work okay with garbage collection. For context - bugs.php.net/bug.php?id=73840
Anonymous
Noight o/
@Danack increment refcount and implement get_gc
get_gc needs to return an array and/or hashtable of the collectable values
serach for it - I'm not too happy with get_gc myself either
Wes
Wes
00:34
anyway i had a backup, it was just ages old but at least i saved myself the hardest thing to configure... the colors, fonts, etc.
@bwoebi this one seems simpler - php-lxr.adamharvey.name/source/xref/master/ext/spl/… . Are the things that are put into gc_data a list of zvals that this object is aware of, and could now be GC'd ?
@Danack the list of possibly collectable zvals, yes
@PeeHaa i've copied the init page and required it in my test page (basically the example but on my own site) and the secret and key are defined in init and pulling through. If i echo a statement in bootstrap it comes out fine. still getting the getAbsoluteUri error though..
could it have anything to do with where the directory it is. currently my login page is located at website.com/folder/folder/etsylogin.php
00:50
> $currentUri->getAbsoluteUri()
Call to a member function getAbsoluteUri() on a non-object as well and can't seem to work it out
@LewisThomas you haven't kept the bit that sets $currentUri.
@Danack ive only included part of my code above as didnt want to clog up the chat, i assume that $currentUri is set earlier in the code within (within a require etc)
01:08
@kelunik @bwoebi Hmm… somewhere I think there was suppose to be a if ($this->deferred !== null) { throw \Error("Do not call advance consecutively"); }
53 mins ago, by PeeHaa
Look in the bootstrap.php file
53 mins ago, by PeeHaa
The uri is created there
@kelunik @bwoebi If we want to allow that (which should really be necessary), then yes I would have to make that into a stack. It isn't redundant, that promise is used when there is no value available. $this->deferreds is used as back-pressure. I should give them better names.
I also could make advance() a coroutine and yield on the current deferred if it's not null.
That's what I did for the analogous class in Icicle.
I'm fine with throwing, because you're suppose to be using advance() in a loop in a coroutine… so calling it consecutively is a bug.
Listener only exists because we can't write foreach($stream as yield $value).
 
1 hour later…
02:26
So mad right now... inmotionhosting had a glitch in their datacenters, deleted all my websites, I had backups of 95% of them luckily. I uploaded a client's website a while ago. Had a backup on my server just in case. Both gone. poof.
 
1 hour later…
03:45
Does anyone know how i can replace the " � " character in a php string?
Or any non-printable characters
 
1 hour later…
Jek
Jek
05:00
Or just force certain characters
I love building force methods
05:51
@needhelpwithR Might you are having character like à, etc you can replace those with these codes
06:04
posted on January 07, 2017

New Cyanide and Happiness Comic

06:23
@Leigh Was trying to decide how many possibilities there are for that… would it be simply 6! = 720?
06:38
Hey, is anyone available to help me with a quick problem I'm having regarding an sql query?
"mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given", here's my code: hastebin.com/hohiruvova.php
oh wait! $stmt->execute(); returns a boolean, doesn't it? So how can I get data from the execution of that query?
use $stmt->fetch(); to get row
ah alright, thanks
or $stmt->fetchAll() to get all rows
hey can someone help me
-3
Q: How to know total number of views for an article just like youtube

beginnerWe know youtube can tell us how many different users has seen this video ,just like that how can i calculate how many different users has visited my article I am using cpanel , I have researched alot , their are many different ways to get the number of views for one particular article, Shou...

So if I do
$result = $stmt->fetch();
is $result["columnName"] supposed to return the data of the row found from in the query
yes
print the row , print_r($result). So that u can see the result
06:48
$result = $stmt->fetch();
print_r($result);
doesnt print anything out :~
then their may be something wrong in your query
$stmt = $conn->prepare("SELECT * FROM users WHERE username=?");
$stmt->bind_param("s", $usr_username);
table name is users, row im searching for username from is named username
looks right to me
in $conn = new PDO()
conn is new msqli
u are mixing the object oriented php and procedural php
06:54
that's my code rn
try this
$stmt = $conn->prepare("SELECT * FROM users WHERE username=:username");
$stmt->bindValue(':username', $usr_username);
$stmt->execute();
$row = $stmt->fetch();
do i need to execute before fetching?
no, right?
execute before fetch
and u should create ur $connection like this
$conn =new PDO("mysql:host=localhost;dbname=blogs data","root","",[PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_ASSOC,PDO::ATTR_ERRMOD‌​E=>PDO::ERRMODE_EXCEPTION,PDO::ATTR_EMULATE_PREPARES=>false,PDO::ATTR_PERSISTENT=‌​>true]);
ok
well theres a problem with bindvalue I think
Call to a member function bindValue() on boolean
$stmt = $conn->prepare("SELECT * FROM users WHERE username=?");
$stmt->bind_param("s", $usr_username);
$stmt->execute();
$result = $stmt->fetch();
print_r($result);
that printed out 1
check $usr_username
07:02
Hi guys
$usr_username is correct aswell
@astrosixer please help @JustinG I can't find out the problem
"Call to a member function bindValue() on boolean"
that happens when I use
$stmt = $conn->prepare("SELECT * FROM users WHERE username=:username");
$stmt->bindValue(':username', $usr_username);
your $stmt is not correct
oh, what's wrong with it?
user6927987
07:06
Hi!
$conn = new PDO("mysql:host=localhost;dbname=database name","username","password",[PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_ASSOC,PDO:‌​:ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION,PDO::ATTR_EMULATE_PREPARES=>false,PDO::ATTR‌​_PERSISTENT=>true]);
I have to use that for conn?
not mysqli?
yes
try it
@JustinG i advice u to learn object oriented php first
syntax error, unexpected '=', expecting ']'
this is coming up on the line of the pdo connection now :/
$conn = new PDO("mysql:host=" . $server . ";dbname=" . $dbname,$username,$password,[PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_ASSOC,PDO:‌​:ATTR_ERRMOD‌​E=>PDO::ERRMODE_EXCEPTION,PDO::ATTR_EMULATE_PREPARES=>false,PDO::AT‌​TR_PERSISTENT=‌​>true]);
no idea what's wrong with that, I copied+pasted it
@beginner any idea what that's about?
i don't know , whats going wrong
@JustinG ok just try this
07:17
I removed the optional parameters at the end of the pdo declaration and the error stopped happening
$conn = new PDO("mysql:host=" . $server . ";dbname=" . $dbname,$username,$password,[PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_ASSOC]);​
is it working now
yes I think its working :D
i'll play around with it a bit to confirm, but im pretty sure its good now
default fetch mode is important
other you can skip for now
hi
will $conn = null close the connection?
07:20
i think so
alright, cool, I can't thank you enough!
@JustinG $stmt = $conn->prepare("SELECT * FROM users WHERE username=?");
$stmt ->bindValue(1, $usr_username);
$stmt->execute();
$row =$stmt->fetch();
all right, you can also use unset($conn) for close the connectin
yes, it's working, i switched mysqli to pdo and that seemed to fix it
ok thanks
your welcome
07:30
we usually use the letter of i as a counter variable (EX: $i = 0; $i++;). I want to know i stands for which English word?
maybe integer? not 100% sure tbh
anyone see a problem with this line?
$stmt0 = conn->prepare("INSERT INTO users (id, username, password, expire, hwid) VALUES ('', :username, :password, '', '')");
those are double single quotes with nothing in them in the values section
I hardly think so .. integer is a type ..!
well yeah, but when you're making a counter you're just incrementing an integer :P
08:14
@JoeWatkins for some reason I thought because the bit at the top of the loop was a declaration with an initialisation, it was only run once. Didn't realise it would be treated as an assignment for subsequent iterations. Seems obvious now :P
@Shafizadeh I always assumed it was for index
Ultimately it's from maths :)
I see, thx :-)
09:17
Already I've seen an example of a static property which keeps the first value (it didn't re-initialize) .. but currently when I set a new value to a static property, the old value will be gone .. does anybody know what thing exactly have I seen already?
@Trowski yeah, but you e.g. might want to skip a value?
Could someone so kindly take a look at this? Thanks.
http://stackoverflow.com/questions/41519817/laravel-getting-all-records-not-just-the-first-and-putting-together
09:35
morning all
!!dad
Wanna hear a joke about paper? Nevermind, it's tearable
@J
@Jeeves lol
@Linus I'm not surprised.
@ZhengquanBai 很明显啊
09:54
@蔡正海 嘻嘻
Hello, native English speakers, do you say "as of" in your daily conversions?
@JoeWatkins could manage to add a backlink to appveyor on php.net/thanks.php ..? The would add 2 more concurrent builds for doing so...
^ could sou manage I mean
Sou -> you.. fu mobile keyboard
They already increased the concurrent builds
@Shafizadeh That is the correct behaviour, it's a variable property, not a constant
also, you misspelled construct
10:16
mornin
@ZhengquanBai Sure, when referencing a time "as of tomorrow I will ..."
@Leigh Is there any other way of putting it when you intend to say "as of"?
It depends :)
When you say something like "as of late" you can say "lately". When you say "as of tomorrow" you can say "from tomorrow". When you say "as of yesterday" you say "since yesterday"
As of next week.Does it mean from next week,after next week or during the course of the week?
It means from, and ongoing
10:27
Ok.
thorough explanation
As of Java SE 8, you are allowed to add static methods to interfaces.
Yep, from SE 8 onwards
And personally, I think it actually sounds nicer to say "as of" rather than "from" in that context
So the ingredient following "as of" can not only be a specific time, but also be a particular event.
Wes
Wes
mornings
Hmm, I think it has to be tied to a time. Events happen at a time. Java SE 8 was made available at a time
"As of the next version" pretty much equates to "At the point in time that the next version is available"
Good to know.
10:36
if i am getting this error :Class 'OAuth\Common\Http\Uri\UriFactory' not found on this line of code: Class 'OAuth\Common\Http\Uri\UriFactory' not found , can anyone give me an idea of whats going on? i know it lacks context but didn't know if it was just a case of directories etc
Are you using composer?
But you have some kind of autoloader?
yes i do
And is your autoloader loading the file that the class is in? (have you made sure of that?)
Also, really quickly, do you have a preceding "\" before the fully qualified class name?
10:52
May please someone rephrase this :
> +1 for attributing to psychosis what some imagine to be style.
> +1 for saying that something is a form of mental illness (or ".. is a result of mental breakdown"), what others see as "style"
.. I think
Wes
Wes
@bwoebi should've had a 2 weeks vote. maybe people is still on vacation
i noticed the ml is not very active... unless it doesn't work again?
Hellooo :D
Anyone knows how to get rid of special characters that are invisible?
http://stackoverflow.com/questions/41520531/cant-get-rid-of-the-invisible-sign
@tereško I see, thx
@divHelper11 your editor should have "show invisible characters" option
11:01
@tereško I was checking it by notepad++ with showing invisible characters but nothing shows there. I also clicked to reformat code to utf8 without bom
I also went to windows and used notepad.exe. I copied all my code there and back to the editor and also didnt help me
I have this sign only on the server, my local website doesnt show it
do you have any php code in that vicinity ?
Wes
Wes
@divHelper11 seems what you see in the inspector is the result of the browser attempting to fix your html, probably because of php tags that behave differently
This view doesnt have any php or js
Wes
Wes
or just unmatched tags
oh sorry it does have php
Wes
Wes
11:06
because you got all the content moved to the body. this kind of stuff happens when you have invalid html
I will check everything line by line
it looks like there is some shit either before or in your doctype
wow thats crazy
not sure how to delete it since there is no even space before doctype
@Leigh have tried to work it out but struggling. an easy way to test if the autoloader is loading the class?
@divHelper11 btw, dump the notepad++
if you are not going with a commercial IDE, then try atom.io or sublimetext.com/3
11:13
I have phpstorm, netbeans and notepad++
phpstorm should have "show hidden" option
uh, the byte order mark?
What encoding are you using?
I have this option in notepad++
and it looks like this
I am using utf-8 without BOM
Nothing before the doctype damn
The illegal character you have is a byte order mark
@littlepootis I will read about it thank you
11:19
I see two of them, btw.
@LewisThomas var_dump() inside it
posted on January 07, 2017 by kelunik

- Defined what `resolved` means. - Changed namespace to `AsyncInterop` instead of `Interop\Async` - Improved wording to be more concise.

@littlepootis oh its just the BOM. But I was saving the file through notepad++ clicking on "without bom"
@Leigh in the autoloader page or the class?
shrug, both?
11:21
Ill try to delete this file and create it over again
your code man, do a much as you need to work out where the flow breaks
posted on January 07, 2017 by kelunik

- Changed namespace to `AsyncInterop` instead of `Interop\Async`.

Nothing helps. What the hellll
Is there a "Convert to UTF-8 (without BOM)" option?
Does hitting that twice help?
Yes I clicked to convert to utf8 without bom in notepad++
11:31
user image
8
The strange thing is that I dont have it when i run page as local
I see this character only on the server
//i.sstatic.net/m68hn.png
Wes
Wes
fail
Huh, I thought that worked now @PeeHaa?
btw that is a real, undoctored screen grab of an application I use at work, and just found that while perusing the options
Wes
Wes
11:44
it's great :P
Lol I recreated this file and now I also have this invisible character locally haha
switch to sublime text
I will download sublime
right now
After this operation, 1,480 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Abort.
xD
okay I have sublime
hmm i dont see anything that would help me wrrr
11:54
can anyone recommend a simple oauth 1 library?
@staabm oh wow
yes, I can do it
done
(deploy may take some time, no idea how long)
12:12
@JoeWatkins perfect thx
can you put note on pr #2229 please @staabm
^ put that one on
slow clap
@JoeWatkins One more extension to write, one more greenlet
@bwoebi I must rest today ... plan on doing as little as possible ... sorry ... tomorrow hopefully I'll have more energy ... am very exhausted and didn't sleep at all properly last night (not more than hour at a time)
@staabm av appeared on php.net
with two slashes ... @bwoebi see, I can't even write a fucking link :D
12:25
Howdy
@DaveRandom do you know much about this library ?
@LewisThomas I know it was written by someone who was a regular in this room at the time most of the work was done, and that it has had contributions from several regulars in this room, and that the regulars of this room are some of the finest developers I have ever known, and that it has been continuously very popular.
However I have personally never had cause to use it.
I do know that if I needed an OAuth client for something, I would start with that lib and if I found anything it didn't do that I needed (or anything broken) then I would fix that lib and contribute it back to trunk
@JoeWatkins yeah, no problem; I just can't wait to play with it
apparently it's contentious to add appveyor to php.net ...
@DaveRandom ok, great i think the developer was helping me out last night but we weren't able to solve my issue. its highly likely an error on my end that im just not seeing, so will keep slogging
12:30
@bwoebi there's really very little to play with right now, just some swapcontext and makecontext in the right places ... none of the ze stuff is done, no preempt either ... it's barely even skeleton ;)
@LewisThomas well the guy who originally wrote it (@Lusitanian) doesn't come in here much any more but I think @PeeHaa did a fair amount of work on it
I personally do not understand OAuth. I tried to once but after a couple of attempts at reading the specs I was losing the will to live.
@JoeWatkins You mean yielding control, not premption?
@DaveRandom starting to feel the same but hoping to integrate with alexa so its only the start of my brain melting experience
yeh have fun with that :-P
!!reminder list
12:34
Registered reminders are:
• @⁠DaveRandom http://chat.stackoverflow.com/transcript/message/33706606#33706606 → Id: :33706826 → Saturday, 29th April 2017 12:01 (UTC) - Set by Gordon - Seconds left: 9674769
• finish cleanup of http://php.net/manual/en/function.session-start.php → Id: :34521502 → Monday, 09th January 2017 22:32 (UTC) - Set by PeeHaa - Seconds left: 208643
• http://meta.stackoverflow.com/questions/338573/sensitive-info-disclosure/338583#‌​comment425942_338583 → Id: :34823661 → Wednesday, 11th January 2017 14:13 (UTC) - Set by PeeHaa - Seconds left: 351524
@Leigh god fucking damn it.
Sorry, it's out of date now, you can remove it :)
@JoeWatkins @PeeHaa looks like your reminders for this morning didn't make it
@Leigh I'm torn, it's so well executed that I almost think it deserves to stay :-P
12:36
@bwoebi no yield is separate, I did find a thing about preemption using signals, wanted to have that ... though I haven't even attempted it yet, just read stuff
Wes
Wes
indeed
@JoeWatkins I doubt that's safe... At least in PHP
Cannot stop watching this youtube.com/watch?v=cO0kdsHEJhM
@bwoebi I love unsafe things :D
yeah it may not be, like I said, no code yet, just idea ... the only code that exists is make/swap context stuff and some boilerplate, not interesting at all ...
Wes
Wes
that's a nice career @DaveRandom and i'm saying that absolutely not ironically :B
12:50
@Wes is that yours?
Wes
Wes
ya :B
your commitment to avoiding work is commendable
Wes
Wes
yesterday, by Wes
this is how i waste my time
What's the meaning of cast exactly? I see it everywhere .. in database (type of column), in voting (some people say: cast a vote), in porno industry (it's like a interview) .. well I'm confused, what's the meaning of it exactly?
Wes
Wes
AHAHHA
12:57
mornign
Yo :-)
@LewisThomas Sorry was afk last night
Still having issues?
@PeeHaa no worries...and yes unfortunately. likely an issue of my understanding. currently getting the error Fatal error: Class 'Autoloader\OAuth\Common\Http\Uri\UriFactory' not found
@bwoebi There is so annoying bug in it I need to investigate. I think that if I restart him they will come through
@staabm are they going to add php to their index (cool customers) ?
12:59
@Shafizadeh it would translate as "to play the role of"
@DaveRandom hmm not sure if I fixed that one yet

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