« first day (1624 days earlier)      last day (3317 days later) » 
00:00 - 22:0022:00 - 00:00

12:00 AM
hello
Access denied for user 'Bassem' @'localhost' (using password: YES)
i face this error
 
If you want to make userForm and userServer more independent to each other, one way would be not to talk them with each other. The user model could for that. Especially as persistence shouldn't bother the form and vice-versa.
 
but my user already added to DB and has all permission
 
Congratulations, that means you don't need a userForm and a userService.
Just skip those.
 
nik
yeah, but having User validate data and persist itself now kills the Single Responsibility principle which poisoned my mind
so many rules in tension with each other
 
user does not validate itself. and user doesn't persist itself. a user validator could validate a user and a user data mapper could store and retrieve a user from a datasrouce.
 
12:06 AM
please anyone help me
 
I need sleep. Please anyone help me.
 
nik
@Bassem you're using the wrong password
 
or the wrong hostname
or the wrong username
 
it is correct , i can open phpmyadmin
and select data normally
that happen when i make a select query request
 
1:00 AM
@ircmaxell news.ycombinator.com/item?id=9277835 !!! (crypto discussion D:)
 
what does this mean

'GRANT USAGE ON *.* TO ''Bassem''@''localhost'' IDENTIFIED BY PASSWORD ''*8C1F91189C7E812B7CBE5CB02BFBE5BE2EF6C30C'''
i write this

SHOW GRANTS FOR 'Bassem'@'localhost'

and get these

GRANT USAGE ON *.* TO 'Bassem'@'localhost' IDENTIFIED BY PASSWORD '*8C1F91189C7E812B7CBE5CB02BFBE5BE2EF6C30C'
GRANT ALL PRIVILEGES ON `localhost\_new`.* TO 'Bassem'@'localhost'
 
1:14 AM
@tereško wtf
 
that is my question , please any one help me i spend hours on this :(
0
Q: Can Connect to DB normally but i can't select , Access Denied

BassemI have a problem that happened in my website and i don't know how to fix it some data are disappeared and when i debug i find this error WordPress database error: [Access denied for user 'myuser'@'localhost' (using password: YES)] that error happened with a select statment . note that...

 
It's a relief to know that the commercial is fake.
 
1:32 AM
@hakre I can help you -- just a second.
Happy kick-mute!
 
gn8
:)
 
1:55 AM
@NikiC for a real challenge, try declare(Crockford=1);
 
Ugh, why do we have ZEND_AST_IS_LIST_SHIFT and friends?
Isn't that error prone?
Why don't we lest the enum type do it's auto-increment job?
 
?
 
@LeviMorrison In what way is that error prone?
 
don't those rely on auto-increment?
 
If the previous section exceeds the expected dimensions you have conflicts.
 
1:57 AM
Oh, sure
But it's a pretty neat enum hack
 
@LeviMorrison in that case won't compiler throw warnings?
 
@bwoebi Unsure but hopefully
 
@Andrea yeah, saw that ;-). Need to make a few edits for the latest post I made.
 
2:35 AM
Also, man, I have never seen hacker news agree with a php developer before :-P
 
hahahaha
...there is such a temptation to do a really mean April Fool's joke
but it'd be really mean and evil
so it'd have to be really obviously a joke
because I try my best not to be mean and evil
 
2:57 AM
<?php

enum Foo {


}
\o/ no segfault!
<?php

enum Foo {
        BAR;
}
\o/ no segault
 
3:24 AM
It doesn't do anything but the parser doesn't choke :)
 
 
3 hours later…
6:22 AM
grumble day 2... So many problems on the internet could be solved with "Just block Chinese IP space"
 
6:36 AM
hi
what is the best way to use calendar in tpl file
 
I think you have the wrong room buddy
 
ok
thanks
 
But feel free to come back when you have a PHP-related question ;)
 
ok
 
7:00 AM
@Leigh sounds like a smarty question ... which is php-ish ... but you would need to travel 10 years back in time to get an answer probably, and my time machine is broken ...
 
@JoeWatkins written in PHP does not make it PHP, sorry, being an arsehole today. I liken it to coming here and asking why my phpmyadmin install isn't working
(hypothetical question, I obviously don't use it)
 
laravel, wordpress, drupal, and a billion other things that are discussed in here daily are also written in php, but aren't actually anything to do with php ...
 
So you're saying we need to be stricter ;)
 
it's a php-related question, moreso than most of the discussions that take place in here ...
 
Did I make you grumpy? :(
Would a big bear hug make you feel better?
Oh, how's your desk? :D
 
7:04 AM
no, but actually we spend most our time talking about C, so I don't want to go set a precedent that you can't ask questions that are loosely related, or else I'll have nothing to talk about ... nor would you, a lot of days :)
going well ...
infact, it went so well, the misses made me do another one for a dining table ... then another thing for a TV unit, and she intends to get wood for a coffee table too ...
 
Nice! :)
This time next year... Watkins' Joinery - Finest Isle of Wight Furniture
When I was a kid, I always wanted a treehouse. Not sure if yours are at the tree climbing age yet, but better if some decent carpentry is applied (mine was some stolen scaffolding planks and some rope I found in a river...)
 
I'd love to do a treehouse, we don't have a suitable tree, old lady next door does
I'd quite like to just do new sheds in the garden but not allowed ...
 
If you're really enjoying it, why not do sheds for other people and get some cash for it? Then you get the fun of building sheds without taking up your own space :)
Kind of jealous to be honest, I wish I had something I really enjoyed away from the computer, where I could use my hands to make things
 
hi all
 
hello shakti
i ll upload it, once it couplet..
 
 
3 hours later…
9:53 AM
hello
could any one please check this
http://wordpress.stackexchange.com/questions/182525/can-connect-to-db-normally-but-i-cant-select-access-denied
 
10:03 AM
@Leigh not a bad idea, space would be the only problem ... yeah it's nice to have something away from computers ... go buy some wood :)
 
Again, in my childhood, I used to carve breeze blocks and build totem poles :D
 
guys , any one can helps me
 
user2620028
Quick question guys. I am having errant behavior while maintaining a piece of code. It previously worked with a json_decode to an associative array. Now i am getting a null value out of it and i am not quite sure why. How would i best go about troubleshooting this? Php Ver 5.3.2
 
10:20 AM
I've recently started to experience rendering issues in vim (code is not updating properly). Anyone know what this might be related to?
I think this started after doing an apt-get update
 
But there's a good chance it will be a non-utf8 character in the json.
 
@ircmaxell What version do you want to target for PhpGenerics?
I.e. what do you think of making it php 7 only? ^^
 
user2620028
10:47 AM
@Danack I had tried using json_last_error but it appears to not exist in my version of php... I know it is supposed to since i am on a 5.3+ ver number but it gives a undefined function for json_last_error
 
@HatterisMad It says it's there for (PHP 5 >= 5.3.0) ?
 
user2620028
Yeah i just edited my comment
 
Yes....anyone mentioned in an edited comment gets a new ping.
 
user2620028
Oh really? i did not know that
 
That's really weird - could you be using a custom version of PHP with a different json extension?
 
user2620028
10:49 AM
I inherited this environment and with the person I took it over from anything could have been possible. Have found some interesting gems hidden in code.
 
user2620028
But up until today this code (that i wrote) has worked perfectly (for about a month) So i would believe your initial assumption that i am getting a non-utf8 character to be more likely
 
user2620028
Just tried json_last_error again.
Fatal error: Call to undefined function json_last_error()
 
Yeah, that would be what I would investigate first - maybe try cleansing the json string - stackoverflow.com/questions/4663743/…
btw technically that answer isn't 100% valid regex, but it's probably close enough.
 
i can't import .sql file to phpmyadmin
it is 40 MB
it still loading
long time
 
user2620028
I will try that thanks for the thoughts Danack
 
user2620028
11:14 AM
holy shit 5.3 was 2009?
 
user2620028
Danack the remove invalid characters seems to have done nothing. Assuming that script worked effectively non-utf8 charset appears to not be the issue
 
use terminal,
>use <databse_name>
>import /path/to/sql
 
@crafter i want to upload it to cpanel
 
@HatterisMad This is one of these things you're probably going to need to just debug through. Either the data is valid, and the weird json library you appear to be using is barfing (which could be investigated by testing against standard php 5.5) or the data is invalid, and you need to compare it to a valid set of data to see the difference.
 
user2620028
Someone just told me about jsonlint.... didnt know about that. And i am not using an external JSON library. Just php 5.3.2
 
11:25 AM
A lot of functionality in PHP is provided by extensions. Even if these are installed with PHP they are considered separate libraries, as they can be swapped in and out. And as that function doesn't exist for you, it sounds like your version of PHP doesn't have the standard json lib. Are you on Debian?
 
user2620028
I saw the Debian License thing as well. No i phpinfo() and it shows JSON ver 1.2.1
 
need some guidance for reading large JSON file,
 
@HatterisMad I believe the lovely Debian people swapped out the standard JSON library in PHP to a different one due to Doug Crockford's "Don't be evil" license being considered non-free.
 
user2620028
Yeah i read that answer on SO and i dont have access to the server info sadly so i do not know. But prior to today all of this code functioned fine. And i am the only one with access to the files :/
 
11:48 AM
Hi, its been a long time since I've done any PhP or web development but I would like to get back into it. I'm just trying to get up to speed on some of the essentials tools for dev environment and writing the code. My default would be Sublime editor and then just a XAMP install. What else would people recommend?
 
Read up on Composer (and packagist.org) - it's a dependency management tool. You might also want to read the "migration guides" section of the PHP manual to see what new major features have been recently introduced
 
ifm
An IDE with debugging options is always really helpful.
 
I am Trying Ask Question for stack overflow getting on error "Sorry, we are no longer accepting questions from this account. See the Help Center to learn more."
 
@Danack You believe correct, if your phpinfo() shows jsonc, you're boned
@James What is your target environment? I recommend developing in an environment that is close to your target (really I just hate all *AMP pre-packages), get yourself a nice Linux VM to deploy to.
Also avoid w3schools and phpclasses, the manual has way better info than the majority of the results you get from search engine results
 
12:04 PM
Good morning room minions :)
 
Thank you for all the suggestions, I will follow up on those now. At the moment I'm just going to be playing locally for fun, not a particular project therefore not sure about target environment just yet.
 
oh hi there PH
 
o/
 
@James Definitely set yourself a goal, don't try and learn it without having something you want to achieve.
Otherwise you're going to sit and stare for 10 mins, then just close your editor and do something else :p
 
Ha, I know that feeling!
Is there anyone that does decent free hosting even if it fairly limited - just wanted to be able to set up a dev and Live environment.
 
12:08 PM
@James no
 
Decent, Free ... uh ... actually just pick 1
Use two VMs and pretend one is live
 
Anonymous
12:24 PM
@PeeHaa hows it going?
 
Anonymous
And happy birthday: )
 
@sam_io Good and thanks :)
Long time...
How are you?
 
Anonymous
I am fine. Just aging fast, because PHP ;)
 
Anonymous
Didn't expect to see everyone here, good to see you all again.
 
12:39 PM
yay
I completed first game on my new PC. This one: youtube.com/watch?v=SZeHWH_9sUg ("WTF is .." review link)
 
1:05 PM
remote: Welcome leigh.
remote: You have insufficient Karma!
remote: I'm sorry, I cannot allow you to write to
remote:     php-src.git/Zend/Zend.m4
remote: Have a nice day.
Does the Zend dir need separate karma, or have I been downgraded already? :p
 
AFAIK you need zend karma
 
Oh well, sorry PHP, I tried. Time to find some computer games to play
 
Hi I've written an wordpress function which is working fine in normal posts which starts with text
but not working fine with the post which have any special widget like review
can anyone plz take a look at my function and tell me how can I improve it
here is my code
function insert_ad_block( $text ) {

	if ( is_single() ) :

		$ads_text = '<div class="center" style="width: 100%;">
					<ins class="center">
						<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
						<!-- sidebar ad -->
						<ins class="adsbygoogle"
						style="display:inline-block;width:336px;height:280px"
						data-ad-client="ca-pub-7130580263731329"
						data-ad-slot="1039945099"></ins>
						<script>
							(adsbygoogle = window.adsbygoogle || []).push({});
 
@Leigh What did you want to push?
 
@bwoebi github.com/lt/php-src - master, PHP-5.6, PHP-5.5
 
1:11 PM
I dont understand that what I did wrong
so I hope you guys can help
 
Why the hell did that merge create 3 commits..
 
@Leigh good that you didn't push… github.com/lt/php-src/blob/… looks bogus.
 
blargh, conflict
:)
 
user895378
1:27 PM
morning
 
@rdlowrey morning
 
@bwoebi Ok, fixed, went through again and double checked the conflicts and made sure I caught everything
 
@Leigh you need extra karma for the Zend directory, to push there.
 
@salathe Good job there's plenty of minions here :)
 
:)
 
1:33 PM
Is there a good reason for it needing separate karma? Or is it just something esoteric/archaic?
 
1:44 PM
@Leigh nah… we just want less people (like me) who commit bogus things into the engine…
 
@bwoebi So, can you push it for me please? :)
 
@Leigh Do I look like your minion? :-P
 
You might do
 
(nah, no problem… let me just review it once first.)
 
The Zend.m4 change is part of the CSPRNG RFC anyway
 
1:47 PM
yeah, but you want to commit to 5.5…
 
because the old logic is flawed - even backwards
 
@Leigh The ini comment change is imprecise
 
It's no worse than the original...
 
@Leigh Maybe you didn't intend to drop the first line?
 
No I did. Most other settings in the ini file don't have a "Default:" line, they have a ;session.entropy_file = /dev/urandom style line for the default.
 
user895378
1:56 PM
/me just pretends ext/session isn't a thing.
 
yeah… it's just a gigantic hack…
 
2:11 PM
@Leigh ok
 
2:32 PM
void *temp;
temp = zend_fetch_resource2_ex(connection, PHPIREDIS_CONNECTION_NAME, le_redis_context, le_redis_persistent_context);
> warning: assignment makes pointer from integer without a cast
.....anyone able to guess what's wrong?
 
@Danack check your compiler warnings ...
 
I can't see where the integer -> pointer conversion is happening...
 
Probably the function was not declared
 
types of the other vars? what is PHPIREDIS_CONNECTION_NAME?
 
just some #define'd string - it's probably the header not being included.
 
2:37 PM
@NikiC it supports 7 today. What do you want to use to require 7 only?
 
@ircmaxell oh nothing particular. just asking what the minimum php version is supposed to be, as composer doesn't tell
I'm just defaulting to php 7 only for my own toy code ^^
Do you have any plan wrt testing strategy?
 
Blah - Laruence had moved functions around recently.
 
@NikiC I'm thinking 5.5 for now
@NikiC no, it was a proof-of-concept. I wasn't planning on making it serious or going much futher with it
if you want to run with it, go for it
 
> measuring a library's worth by it's number of twitter followers? Shit, better hope Kim Kardashian doesn't release a session handler. --reddit
@ircmaxell Depending on level of boredom, I will ^^
 
2:57 PM
@NikiC I'm going to remember that
 
user895378
So many userland php devs are so stupid.
 
So many userland php devs are so stupid.
 
@rdlowrey context this time?
 
user895378
@bwoebi I was just reading the reddit thread from that twitter comment Nikita posted above.
 
user895378
That some moron thinks twitter followers or composer install counts has any correlation to quality is just beyond idiotic :)
 
user895378
3:06 PM
Of course it's a laravel "dev"
 
Well, I have enums being parsed correctly.
Small victory. That's the easy part.
 
/me hates these moments thinking the whole logic would be flawed…
 
Is there any character that is a &laquo; only pointing upwards?
 
7
A: Down angled quote (« and ») in HTML

SDCThe short answer to your question is "No, there aren't." &laquo and &raquo are not actually intended as direction arrows, despite their frequent usage as such. What they are actually intended for is hinted at by their entity names -- they're supposed to be "angled quotes". Certain European cou...

 
@PeeHaa ︽ < that one?
 
3:12 PM
hey that kinda looks like what I need
Does it also come with a single arrow variant?
That would be awesome
 
︿ … two codepoints later…
 
@PeeHaa or rotate the one you want with css?
 
Thanks bob!
 
"PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET"
 
@Patrick I don't want to do ugly things or I end up with insert peter griffin css meme here
 
3:15 PM
Hello, is there any way to make a confirmation with PHP? I always read, that i should, for example never delete a record in a database with a javascript confirmation. BTW: What happens if js is turned off?
 
@Proton How many of your users have javascript disabled?
 
I did not know about U+2400 to U+2421
 
3:37 PM
@PeeHaa More than you think. A lot of users use noscript, way more than I expected.
 
I would suppose it depends on the actual target. Sure tech people have no script, but I am sure for 99% of websites targeting non tech people that number would be much lower
 
3:59 PM
lol @rlemon

King of PHP

Oct 29 '14 at 0:35, 2 minutes total – 2 messages, 2 users, 2 stars

Bookmarked Oct 29 '14 at 7:46 by easwee

 
4:15 PM
@PeeHaa As said, more than you'd expect. Most of them aren't tech people, at least the ones I talked to. They just complained it's not working. ^^
 
@kelunik why do people disable js at all?
 
@bwoebi Because of all those evil sites tracking them. ;-)
 
Anonymous
4:32 PM
@Patrick hi
 
Anonymous
Anyone here uses windows, 32bit?
 
4:45 PM
3 messages moved to bin
1 message moved to bin
 
Anonymous
@LiamHardy first behave, second give us more details. What are you using? linux, windows..
 
@sam_io Nobody uses 32bit for windows...
 
Anonymous
Unfortunately I do @NikiC
 
Time to reinstall windows I guess ;)
 
Anonymous
Or find something that works on 32 :)
 
4:48 PM
I mean seriously, what can you even do with a 32bit OS?
It kinda has memory limits :P
 
@NikiC can you please kick me. I forgot what the message says
 
@PeeHaa done
 
Anonymous
Mine shouts, I can only play pes2013 for 30 minutes, before it shuts down @NikiC ;)
 
Anonymous
But, its not unmanageable
 
ty
 
4:50 PM
@PeeHaa and, what does it say?
 
You've been kicked from PHP.

Generally this means that your behavior was not in keeping with the norms established in that room.

Most rooms have a topic or topics they prefer to chat about. In PHP, the topic is this:

Discussion for all things PHP, and stuff. Chat Guidelines : room-11.github.io
Always be respectful of others.
Spend a bit of time reading what others are talking about before speaking up yourself - try not to interrupt active conversations!
You'll be allowed to talk again in 58 seconds.
 
@NikiC nobody needs more than 2^32 bytes of ram anyway... What would you do with all of that if you had it? I mean that's a lot of 2's
 
@ircmaxell Yeah, 4 gigs should be enough for everybody
 
except when they aren't :-)
(because apps leaking memory or just inefficient memory management…)
 
@bwoebi Because compiling and because multiple VMs, primarily
 
4:54 PM
@bwoebi then just fix those bugs. Dam sloppy programmers ruining it for the rest of us
 
@bwoebi More for caching tiny files.
 
@kelunik what are you talking about?
 
MemTotal:        8047280 kB
MemFree:         1338632 kB
MemAvailable:    4311784 kB
Buffers:          420436 kB
Cached:          2729336 kB
 
No, I'm not talking about the caches. OS can free them when needed.
 
Anonymous
what do you guys use for local svc aside from gitlab (if) ?
 
4:58 PM
I use gitlab ^^
 
Pages free:                               17555.
Pages active:                            654358.
Pages inactive:                          563463.
Pages speculative:                        14203.
Pages wired down:                       1238668.
Pages purgeable:                          15630.
 
@bwoebi Sure, but that's a reason to have more than 4G.
 
o/ @JoeWatkins
 
If I put an advert out saying I will pay any *man* to work on something, I would get so much shit. It is not okay to do same for women only.
am I wrong ?
I really don't see how creating adverts for jobs that are aimed at women is helping to make anything better ... it's a bit like arranging another bus for Rosa Parks ...
 
@JoeWatkins No you are not imo
 
If you put out an add saying you will pay any man, I would assume that to refer to any person, regardless of gender...
 
5:22 PM
Yeah that too
 
what if in the small print of the advert, I was specific, and actually said this position is for a man ...
that would be offensive, and rightly so ...
 
Hello, i have two question, could somebody help me?
1. Is there any way to make a confirmation with PHP? I always read that i should, for example never delete a record in a database with a javascript confirmation. BTW: What happens if js is turned off? Should i do it with PHP or should i let it as it is? Currently i've made it with JS.
2. I would like to create an ini. (initialization) file but i have never done it before. I want to save backend settings there, like how many records should be loaded to the backend or which backend site is the first one after login and some other small setti
 
Anonymous
1 yes. 2 !?
 
@JoeWatkins Well, if your the ad is looking for subjects for testicular cancer research, I'd say it's okay :P
 
:P
 
5:26 PM
@NikiC hehe ... then it's okay ...
 
Anonymous
Or has to do with heavy lifting, like rolling tractor tires. And hope, feminists do not read that ad.
 
Anonymous
* radical feminists
 
I just don't think you solve the problem of inequality by introducing inequality. What you do is become the kind of employer that appeals to all genders for the right reasons, flexible hours/locations, good maternity/paternity pay, childcare, pensions and whatever else. Then you consider applicants based on merit, not genitals.
 
Anonymous
5:46 PM
Apparently developers do rest on weekends :). This room is awfully quiet today.
 
mhm… no… they're so busy coding that they have no time for this room :-)
 
Anonymous
6:01 PM
 
Anonymous
@bwoebi ^^
 
:-D
 
6:13 PM
moin
 
 
2 hours later…
8:03 PM
Hello
 
jtc
8:55 PM
Greetings all
 
9:49 PM
@JoeWatkins in an ideal world, i agree 100%. And i have raised those issues before. But tge problem is we dont live in the real world. There is a very real gap that exists...
 
good mornings fellows
 
wow
are you in japan?
it's not morning yet
 
nope, not from japan.
it's just the phrase.
 
ah
I see
wow @hakre you have quite a lot of experience
 
Google "UGT IRC"
 
9:55 PM
Yeah I know Allen
I just forget
I guess if you say "UGT Good Morning"
:D
 
That HN thread has earned me a lot of upvotes in
160
A: Best Practices: Salting & peppering passwords?

ircmaxellOk. Seeing as I need to write about this over and over, I'll do one last canonical answer on pepper alone. The Apparent Upside Of Peppers It seems quite obvious that peppers should make hash functions more secure. I mean, if the attacker only gets your database, then your users passwords should...

 
@ircmaxell Which you don't need ^^ You need answers in security :P
 
That was at under 50 yesterday...
 
ircmaxell wow, generics! seriously tho, why not? :D
 
@NikiC Yes. Yes I do
 
00:00 - 22:0022:00 - 00:00

« first day (1624 days earlier)      last day (3317 days later) »