« first day (1966 days earlier)      last day (2979 days later) » 

3:04 PM
if i print_r the array it appears like this:
Array
(
    [0] => Array
        (
            [idUtilizadores] => 11
            [username] => admin
            [password] =>
i want the password to be unset
i´m trying but it´s not deleting
any help?!
this: unset($results['password']); or this: unset($results['2']); are not working...
 
@Japa, unset($results[0]['password']);
 
let me give a try ... 1m
oh man...thank you so much!
it´s working
many thanks
 
no
np
 
Is that coming from the database?
You shouldn't store plaintext passwords in your database.
 
@JanDvorak, where do you see a plain password?
 
3:11 PM
@JanDvorak it´s not a plain password...i didn´t put it here but it´s bcrypt
anyway the result of the bcrypt appears...and i don´t want to
 
You shouldn't store anything reversible.
 
With the right amount of time and CPU power (money), everything is reversible
 
That's not the point
 
I understand what you mean.
 
@Japa : you have an array in an array, isn't it just that? I think you want to do `unset($results[0]['password'])` on that specific array. That only works on the first one, so prolly you want some `array_` magic like (from the top of my head)

array_walk($results, function($value, $key){ unset($value['password']; return $value);})
 
3:19 PM
If you are storing encrypted passwords, you are still storing passwords. Your encryption key will leak.
 
@Nanne thanks for answering but Timo002 already told me how to do it..
 
@Japa sorry, missed that in between all the password chatter :)
 
@JanDvorak it´s true i´m storing, the bcrypt password, but what would you recomend?
 
@JanDvorak correct me if i'm wrong, but bcrypt is a hash, isn't it, so it doesn't really encrypt, does it?
 
@JanDvorak if you know a better way, i would like to learn about it...i only used this because it seem to me the better way
 
3:22 PM
A hash of the password.
 
but it is a has of the password
$hashedPassword = password_hash($password, PASSWORD_BCRYPT);
thisis what i am using
 
@japa @JanDvorak yes, that's what I meant: bcrypt is a hash, right?
 
@Nanne bcrypt is a hash, yes. And password_hash is designed to hash passwords use bcrypt and a random salt. It is considered secure
 
Oh, right. Fine then.
 
found the guy who stole my sandwich
 
3:30 PM
@Japa Use PASSWORD_DEFAULT instead
And add a cost param. The default is meh
 
@PeeHaa it´s better than bcrypt?
 
@Japa it IS bcrypt :P
 
At the moment it is bcrypt, but it automatically upgrades when something better is available
@BenjaminGruenbaum what's the status of regex escape in ecma?
 
@JanDvorak are you serious? or would you suggest anything else...iºm always looking for better ways of doing "things"
@PeeHaa never read about it, i´m gonna take a look
 
!!docs passord_hash
 
3:33 PM
[ password_hash ] Creates a password hash
 
hi guys can I ask a question
 
You just did...
 
lol
Im trying to remove a lot of duplicate rows from a big database the problem is that I have 4446 table table for each school my job is to remove all those dpulicate rows is there an easy way to do it ?
 
What is a 4446 table table?
 
i mean 4446 table in database each table is for one school 4446 school
 
@KevinMGranger It's what Little Caesar's cuts its pizza on?
 
duplication is not the problem
 
It's a symptom of the problem
 
it's the fact that your DB structure has been made by an 8-year-old
 
@tereško yes thats the big problem I dont know who designed this DB
 
3:38 PM
well, what books have you read on the subject?
 
@undefined One method is to ALTER IGNORE and add a UNIQUE.
 
@Fabor can u explain more
 
*you
 
I could but you'll learn more if you google around those words.
 
> MagickGetImageChannelFeatures() returns features for each channel in the image in each of four directions (horizontal, vertical, left and right diagonals) for the specified distance.
> The features include the angular second moment, contrast, correlation, sum of squares: variance, inverse difference moment, sum average, sum varience, sum entropy, entropy, difference variance, difference entropy, information measures of correlation 1, information measures of correlation 2, and maximum correlation coefficient.
SomeOfThoseWords.jpg
 
3:40 PM
@Fabor alright buddy
 
Your db probably has metadata tables (or whatever they're called) that will allow you to "loop" over every existing table to make it easier.
Keep in mind, it may just be easier to do this the "dumb" way and just script it, and run the query for each table.
Either way, back up your data, because it sounds like you're in for a fun time.
 
dammit that rfc link had..tricky points
 
Also, don't get sassy when you're asking for help while demonstrating you haven't done some starting research.
 
@Fabor @KevinMGranger is that gonna solve duplication problem
I did
 
2 mins ago, by tereško
well, what books have you read on the subject?
 
3:41 PM
It will fix the symptom, but not the problem.
 
Jay
Hey, Anyone ever used pyrocms field types with bootstrap?
 
@KevinMGranger I imported metadata tables into phpmyadmin
 
Im trying to figure out how to create a zip file of my public_html directory inside PHP and then delete the original files and just keep the zip - any ideas ?
 
Ah, are you asking this room for help on this because you're using phpmyadmin? It's not necessarily guaranteed that we'll all be experts on it.

Whatever tool you're using to interact with the database is irrelevant-- I'd recommend looking into the MySQL official manuals: they have tons of great resources on this stuff.
 
ok thank
 
3:45 PM
@KristianHareland do you have access to exec() ?
 
on some hosts - but not on all - i need it to work on hosts without that access
 
yeah , about that ... when done right, server will almost never have "public_html" folder
just saying
 
its cpanel im trying to do it on at the moment
 
Yeah this has the smell of an XY problem
 
well - $_SERVER['DOCUMENT_ROOT'] folder
 
3:48 PM
you probably should be looking at creating a cPanel plugin
 
its for a website cms, so i need to be able to send the files to a remote server and figured thet zipping it would be the best option
 
I assume you want to crate a way for user to download entire site with a single click
what files?
all of them?
 
yes - the whole thing
 
git push naah .... that wont work, sounds like what you actually want is to sync user uploads to a remote backup
 
git will even make a zip for you with git archive
 
3:49 PM
lmao - i think you all get me wrong let me try and explain better
 
Are you using a cPanel'd host as kind of a deployment master via CMS?
 
i have a CMS which is very minimal and used for some sites, i need to be able to take automated backups of the whole website + CMS... so i figured zipping the entire document_root directory would give me the option to transfer it to the backup server faster and easier to use the files etc
 
the CMS is sometimes on cpanel, sometimes at one.com so i cant know the cp
 
sounds really really dumb
 
3:52 PM
Ah. Do you know for sure the CMS stores everything in public_html? This sounds really messy
 
if you have crated a website, then you already source in the version control
which means that the only things that you would need to backup from a live site would be user-uploads and data from DB
 
i know for sure that everything of that website is serverd from document_root ?
 
!!docs ziparchive
 
then maybe you should start by fixing that, because DOCUMENT_ROOT should contain only css/js and design elements
 
Does that zip things?
 
3:54 PM
i just need to add all files in $_SERVER['DOCUMENT_ROOT'] to a zip
it doesnt matetr what i have in the directory - i just want it in a zip
with their folders and everything
 
!!docs ziparchive
 
if you have made the site, it would be somewhat stupid thing to do
 
If you say so. If the server has zip installed, use exec. If not, look for a pure-php zipping tool. But again, this is really unclean.
 
Why you know find exact matches?
 
3:55 PM
!!version
 
It doesn't find classes \o/ so useful
 
@PeeHaa I think he's a kid who fancies himself to be a l33t haX0r
 
/me boos
user image
8
 
Must admit I chuckled a little at that. Must be new?
 
3:59 PM
it's at least 2 years old
 
Strange, I've seen +/- comments well within 2 years :P
 
some crybully was extremely offended, when people pointed out, he/she's wrong
 
@ScottArciszewski did you see this yet? interesting stuff: github.com/fulldecent/system-bus-radio
 
> negative: not enought jquery
 
:P
 
4:00 PM
Was the low quality report type also tied into that? :p
 
"Minus 1" works
 
—1?
 
Good old long dash (not that I advocate trying to circumvent the SO platform guidelines!)
 
lol
 
What is the arguments against Short Closures in php? read the following rfc: wiki.php.net/rfc/short_closures looks very useful. Is it to hard to implement, or is the "no" votes based on something else?
 
@ErikLandvall readability
 
@Jimbo ~0
 
And the behaviour of closing over variables.
 
@ErikLandvall I worked on an alternative RFC but the room 11 people couldn't reach consensus on it so I wasn't comfortable moving it to the next stage. /cc @bwoebi
 
4:15 PM
@LeviMorrison I'm still okay with \($foo) => $expr or fn($foo) => $expr
actually, were there any objections about \($foo) => $expr ?
 
Other than it felt dodgy to "escape" something... just that if we ever make namespace symbols first-class that \($foo) would collide.
I still think a fn that can be used anywhere function can be used would go a long way.
 
it smells too much like coffeescript for my taste
 
@tereško The \() or fn?
 
the RFC
 
@rtheunissen I peeked at your ds repo again.
I agree that Stack and Queue aren't really useful as interfaces.
Not in PHP anyway.
However, I do think that Map and Set should be interfaces.
 
4:21 PM
hi guys!
 
HashMap and HashSet will be commonly picked but a fair number of people use variants of Set that maintain ordering.
Plenty of other things I agree with, such as all of the implementations being final.
 
I liked the getter setter possibilirty: @LeviMorrison
    class Foo
    {
      protected $bar;

      public function getBar()      => $this->bar;
      public function setBar($bar)  => $this->bar = $bar;
    }
 
@LeviMorrison Don't know, but I feel that we shouldn't mix verbose and non-verbose. short expressions should be short, long expressions should use long forms (and not like public fn foo() { /* block of code */ })
 
Well… you shouldn't be writing public there.
Only write public if you are overriding visibility of an inherited method.
 
@LeviMorrison I'm writing public out because it looks weird if some functions are led by a keyword (private/protected) and others aren't. (the public ones)
 
4:34 PM
@bwoebi where did you get this - github.com/amphp/aerys/blob/master/etc/mime list from ??
 
but for fn getBar() => $this->bar; I'd absolutely not write public out.
@Saitama Don't know, ask @rdlowrey
 
At least that looks like a decent list
There is also the "official" list somewhere, but considering everybody can use anything not sure how useful it is
 
thnx @PeeHaa gonna parse that table using DOM :P
@PeeHaa Just a req :P not something great but could you give me some feed back on that new web server i designed ... github.com/gourabnagDev/php-webserver
 
@Saitama fairly decent list too github.com/nginx/nginx/blob/master/conf/mime.types :)
 
4:44 PM
@Saitama E_TOO_PRIMITIVE :-D
 
thnx @Leigh
these pesky little mosquitoes around me are sucking all the blood out of me.... wanna just kill all of them at once...
 
is there anything worng with this syntax:
 
@bwoebi I understand but being "weird" is less useful than actually providing purpose...
 
$temp = explode(".", $_FILES["inputCartaCurriculum"]["name"]);
		    $newfilename = round(microtime(true)) . '.' . end($temp);
		    move_uploaded_file($_FILES["inputCartaCurriculum"]["tmp_name"], "curriculos/" . $newfilename);
because the file is not being moved...
 
@LeviMorrison I really just specify it because it looks better.
In e.g. my test classes, I never specify public, because no functions have special visibility. Then it's nice.
 
4:52 PM
@PeeHaa superseded
 
@Leigh No, but that looks pretty cool
 
Where would I find PHP's source for this function: php.net/manual/en/function.openssl-decrypt.php - I'm attempting to duplicate it in another language
 
@OliverQueen it's a terrible idea to duplicate this kind of functions though
 
Well, I'm encrypting in PHP and decrypting in GOLANG
@FlorianMargaine why do you say this?
 
@OliverQueen use something around here then golang.org/pkg/crypto
@OliverQueen because security-related functions are very easy to get slightly wrong
and if you get it wrong, someone will steal your credit card
 
5:09 PM
@BenjaminGruenbaum by?
 
5:19 PM
@Saitama HTTP1.0?
 
		try{
			/* some code */
		} catch(Exception $ex) {
			throw $ex;
		}
@Saitama why try/catch there? ^
 
Why are you first building a array $head and right after it you build the same thing in $headers
 
this sounds like very prone to memory leak: github.com/gourabnagDev/php-webserver/blob/master/…
not sure how pthreads works though
 
Isn't this vulnerable to directory traversal attacks? github.com/gourabnagDev/php-webserver/blob/master/…
 
very much is
also, you should build some kind of abstraction and use "request_uri" instead of [0], imho
@Saitama nice project by the way, just never use it in production
you should try to handle http caching, that would be very useful
 
5:29 PM
evening
even-ing. Making things... even.
 
avond @DaveRandom
 
anyone have experience with Oracle stored procedures and PHP?
 
A better question would be "has any lived to tell about the fact that they have experience with ... and are they prepared to do so without a trained psychiatrist present"
 
We get a present?
Is it beer?
I hope it is beer
 
5:36 PM
I would give a case of beer if I can get some help
 
No, it's one of those fashionable white coats with the arms joined togther
 
I like those! So comfy!
 
@DavidWilkins it might be simpler if you just ask your question, it's friday afternoon so you're likely to get a bunch of dumb responses, but there might be some sensible ones as well
 
You are a dumb response
 
What have you got to lose? Apart from your marbles, obviously.
@PeeHaa Your face is a dumb response
 
5:38 PM
All your marbles are belong to me
 
This is a dumb response:
 
Ok, I have a user-defined OUT parameter, and I am getting an error "oci_execute(): ORA-06553: PLS-306: wrong number or types of arguments in call to ..." and I can't for the life of me figure out what that variable type should be in PHP before I bind it. I just have it set as NULL at this point
 
ha! I won!
FWIW it was really hard to shut up for that long
 
@PeeHaa The response is dumb, so it can't say anything
 
@DavidWilkins What does your query and code look like?
 
5:40 PM
This is also quite a dumb response: 250 Hello mail.foo.com
 
uhhh, might be too big for chat...let me go copy to pastebin...
 
how to delete duplicate rows in mysql
 
@DaveRandom Dumb response
 
good mornings
 
@undefined in past several days it has been explained to you repeatedly
 
5:42 PM
what a fine time to join this room
 
@FélixGagnon-Grenier Mogoring
 
@tereško I didnt find a solution yet
 
That's weird especially since multiple have been offered to you, including where to look for more
 
and with "find" you mean "copy-paste"
 
DELETE FROM my_table; <-- definitely deletes the duplicate rows
 
5:44 PM
^ not incorrect, technically
 
@DaveRandom I have 4446 table
 
DROP DATABASE; <- should do teh trick
 
@PeeHaa ok here it is: pastebin.com/rUNZ5C2Y
 
really ok * u
 
the params for the stored procedure are commented at the top
 
5:45 PM
lol
 
@DavidWilkins Sweet Jesus, wtf is that???
:-P
 
wow. seriously.. what does it even do?
 
@DavidWilkins oh dear
 
What is a JOURNALS_CUR anyway? Some user-defined type?
 
it's a stored procesure that is used to generate reports for transactions in a point of sale system, and yes this is how the vendor delivered it. I hate them very much
yeah
 
5:49 PM
my condolences
 
I would guess that you need to declare it as a session variable on the server before you call the procedure and pass the variable rather than a placeholder, but that's basically just a barely-educated guess
 
ugh, and now I am being asked to add new fields to it
 
What actually is the user defined type? Is it some kind of opaque cursor-like structure, or do you need to actually extract data from the structure itself?
 
Hello, Guys I've searched for very long time for something but till now I could't have an answer, its something with preg_replace in php I want to give an examples to explain what I want to do clearly lets say that I have this string:
 
did you use google translate?
 
5:50 PM
oci_parse what a terrible name
 
@DaveRandom I wish I knew, all I know is whatever is returned is used by Crystal Reports (I have no experience there)
 
if I ./configure --with-curl=/usr/ [...] curl.so should actually be built when running make. if it doesn't, it's because I fuck up something with configuration. right?
 
$string = 'My name is :13; My name is :254465; My name is :39;'; And I want to remove all the strings which contain number less that '254464' so the output must be My name is :254465; How to do that please help :(
 
@DavidWilkins So you need to actually get the variable value into PHP and pass it to another function? Or are you just going to use it again on the same Oracle connection?
(I have never used Oracle DB, by the way, I'm sure it does completely insane things just like every other Oracle product)
 
@FélixGagnon-Grenier Normally the --with-[project]=[path] sorts of parameters the build system assumes [project] is already built.
 
5:54 PM
ahhhh. so I'll actually have to manually compile curl. thanks.
 
@DaveRandom Let me start with the end goal. I need all of the data that stored procedure returns (it's just a big SELECT statement) exported to a CSV file
 
Shouldn't you set the actual types in the bind calls?
 
I was attempting to use PHP, since it is what I know, but it may not be possible
@PeeHaa Every single example on PHP.net does not
but I can try that
 
I see some that do it, but I am just making random suggestions here hoping one would help :P
 
Hello, Guys I've searched for very long time for something but till now I could't have an answer, its something with preg_replace in php I want to give an examples to explain what I want to do clearly lets say that I have this string: $string = 'My name is :13; My name is :254465; My name is :39;'; And I want to remove all the strings which contain number less that '254464' so the output must be My name is :254465; How to do that please help :(
 
5:57 PM
@PeeHaa I'll try it
 
@LeviMorrison hmmm wait. do you mean that if I leave out the [=dir] part to have just --with-curl it should be building it?
 
@NaiTreNo Does it have to be only regex?
 
it looks like the default type is SQLT_CHR which might be my problem
 
No But I think its the only way to do that without using php loop.
 
@DavidWilkins So that procedure just spits out a result set?
 
5:59 PM
I would just get all things that look like a number and run a function over it to check whether it is < 254464. Hint preg_replace_callback
 
@DaveRandom I believe so
 
@FélixGagnon-Grenier No. Either way it assumes it is built already.
 

« first day (1966 days earlier)      last day (2979 days later) »