« first day (1794 days earlier)      last day (3380 days later) » 

02:04
good morning
Morning, Mr. Kool-Aid
Ohh Yeah!!!
and a good morning to you Mr. Kitten
02:22
hai, morning
@ekin \o
I just received a mail from a very old client
saying their site is down
I entered to cpanel and there is a baby.php file there :D
linked to this -github.com/b374k/b374k
someone owns that shit now
yeah
seems they weren't even using what I developed and they had a wordpress installation
before this happened
I can't see how that can be your problem then
02:25
yeah it's not
but I really wonder how they've done this
Abe
Abe
morning
probably some insecure wordpress plugin
sometime I think wordpress should be reclassified as malware
3
@abe o/
Abe
Abe
yo \o
02:48
Mornings
03:28
can someone help me on how to log exceptions?
:(
what kind of information do you want to log?
can be as simple as set_exception_handler(function(Exception $e){ /* log stuff */ });
might be a better way depending on the architecture of your program though
@germikee You need to be more specific about what exactly is giving you trouble. People tried to help you last time you came in asking that question and apparently it went nowhere.
03:45
@germikee How to log an exception: Write the exception to a log. If you want more specific help, be more specific with your question.
sorry.. i have different exception classes extending the exception class and i need to log these exceptions to a file
i need to log all exceptions caught
my problem is how to log these exceptions to a file
@germikee then you will need to perform a logging operation in every catch block... there is no wholesale way to log caught exceptions
$logfile = fopen("/path/to/logfile.log", "a"); fputs($logfile, (string)$e); fclose($logfile);
Then catch Exception $e. All exception classes inherit from Exception, and Exception uses the __tostring() magic method. Then, just write to a file the same way you'd write anything to a file.
Also keep in mind that you should rethrow exceptions unless you have done something meaningful with it. Some argue successfully that logging the exception is something meaningful, but this depends on the specific context of what is meaningful... I.e., not being able to save a file needs some more meaningful action than just logging; let the user know about the error as well and wait for the user to make a decision about what to do next.
can someone help me here please.. stackoverflow.com/questions/32518022/…
04:02
@Micaela you've got three answers there already with multiple votes up
@Micaela Looks like that question has plenty of decent answers already...
wow I just found this on a question pastebin.com/QawjNmxh
it has 9 nested for loops in one func
Yeah, n queens can be done so much more effectively.
Is that the place n queens on a board where they can't attack each other problem.
04:15
I saw java and c# solutions for that one
yet not a php one
Oh my... They're not rejecting a board as soon as they've found a conflict... They're testing every single combination... That's...
102
Q: Maximum call stack size exceeded error

testndtvI am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad) It says "Maximum call stack size exceeded." What exactly does this error mean and does it stop processing completely? Also any fix for Safari browser (Actually on the iPad S...

this was the question
:D
below at the comments
> This did not help me at all. I have to repeat a function 281474976710656 times for my 8queens solution finder. Luckily, I found a shortcut, now I only need to repeat it 16777216 times, which is the square root of 281474976710656.
Yeah, someone has no concept of effective recursion...
^ dont get why that didn't change to a quote
04:30
good morning
good morning
good morning
morning Joe
morning
04:41
morning
morning Nullpointer
04:57
still dark outside ... is early ...
@Ghedipunk I voted up those answers. I know it's correct but it is not exactly I wanted to do.
@PaulCrovella
does anyone here know how to log error into a file?
oh sorryy
it's 2am and I'm still writing cronjobs
phew
I need my sunday nights back
@Orangepill Thank you so much!
@Micaela then you need to edit your question to clarify it
05:12
anyone good at using ajax with php:
my autocomplete runs fine on a load the whole page, but not on an ajax data load
why?
it's the same exact data
I had a similar issue with ajax loaded(and appended to table) rows - the button clicks were not working. Related with event delegation. Not sure if it's similar though
webfarm.io click on homefront, then try the autocomplete
then try a return and autocomplete
does it send it via .keyup?
then try binding it to $(document)
maybe i should just do it with a jquery
^ not exactly same thing, but the .off() then .on() binding to document solved my issue
otherwise the ajax didn't fire since it was an ajax loaded content
05:21
hmm, i'll rewrite the section tomorrow
anyway, hope that helps
i'll jquery it
I'm off to sleep
have a good week everyone
k have fun
@Ekin good nite sleep well
05:48
Greetings.
06:11
Can anyone explain this.
lexical level, does it mean the interpreter language that communicates with machine?
?
What of those not included as an inherent component of joomla :

1) Templates

2) Components

3) Social Media

4) User Management
you have joomla homework? wtf?
what you mean @PaulCrovella
@andho lmgtfy is considered rude. please avoid. thanks.
@Gordon need a nicer version of it hehe
06:28
its not a homework its just a question
i cant find something
@Orangepill yup it successfully did :) thank you
can someone help me guys ?
Morning
morning have a nice day
06:53
<?php
$a = 1;
include 'b.inc';
?>
the variable $a is visible always in b.inc or only if b.inc have php code ?
what are you talking about???
b.inc is a script
i can have access on $a always or only if it have php code ?
well everything would be there which is within your <?php .................... ?> code
you can access a php variable using php , if you gonna access a php variable in javascript in same file then you have to do some coding about it ,,,
yes, except in function
@Rafee morning
07:03
morning
how are you?
i'm good,
hw about you?
and how's going in india?
posted on September 14, 2015 by nlecointre

/* by Ruan M */

@Feeds lol
its great.. so far so good. here.
love the feed.
that's cool
07:10
hello here
anyone to really help me out here
why don't you simply ask your question? if someone would be willing to help he/she would do it for sure.
3
Q: Proper way to pass IoC container

sitilgeI am getting my head around DI and IoC; using Pimple for now. Lets say I have my IoC defined early in the execution flow $container = new Injection\Container(); $container['config'] = function ($c) { return new Config($c['loader']); }; $container['request'] = function ($c) { return new...

@HassanZia any ideas?
@sitilge i'm sorry but i'm a beginner
07:49
morning guys
@Naruto hi there
morning
@PeeHaa You have a link for that issue?
it seems awefully quiet around here this morning
in asp.net application we have a page_load event in the .aspx page and the same page_load event in code behind. Which of them will run first ?
1) page_load event in code behind
2) page_load event in aspx page
3) at the same time
4) page_load event in html page
i am sorry but in c# sleep
07:55
@Naruto depends on the time zone you live in
@gtzinos I don't wanne be rude, but you know this is the PHP room right?
@Naruto agree
yes but in c# room anyone answer
@sitilge the same one most 11 roomers live :P
i am really sorry @Naruto
07:56
@Naruto and that would be?
i just ask if someone is a member of c# here
@gtzinos and you keep asking multiple choice questions - I doubt folk are gonna jump on the chance to do your homework/quiz for you
@Naruto GMT+2 here
not i dont need someone for a homework
i wanna make something on my application and i need this to help me
07:58
oh not
really thank you @sitilge
08:14
hahaha @sitilge
Guys the mechanism postback is an http post which use redirection ?
XD
why don't you ask the question in specified chat room instead of wandering off in multiple chat rooms.
post back is web development mechanism
its an http post i am not in the wrong room
user924016
Morningssh
08:27
@NikiC I don't have a link for that specific issue sorry. I have another opcache bug for you though :P
Mornign all
mornign @RonniSkansing, @PeeHaa
user924016
yo Paul =) and PeeHaa
morning
08:35
o/
what does it describe??? "o/ " @Naruto @PeeHaa
@HassanZia It's like raising your hand waving at someone saying YOOOOOO,
ohhhh got it :P \o/ i'm raising my both hands now :P
morning
@PeeHaa \o
08:51
moin
everyone is waking up ,,, moin moin
I never said I was awake
Loktar's one is really fun
09:10
/me grunts
@FlorianMargaine I like Loktar's
Next year I will also submit something :)
I am wondering whether one can fit a "daw" in 13k :)
daw?
and 13k is a lot, really
A digital audio workstation (D.A.W.) is an electronic device or computer software application for recording, editing and producing audio files. DAWs come in a wide variety of configurations from a single software program on a laptop, to an integrated stand-alone unit, all the way to a highly complex configuration of numerous components controlled by a central computer. Regardless of configuration, modern DAWs have a central interface that allows the user to alter and mix multiple recordings and tracks into a final produced piece. DAWs are used for the production of music, radio, television, podcasts...
The last time I played with the audio api I hade lots of fun
09:43
plug.dj/nē
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO:
when I use for ($i=1; $i<=10; $i++){} is the same with 10 if(){} condition ?
10:00
\o
RIP Ocramius. Was nice knowing you.
morning @AnmolRaghuvanshi
does this violate any popular coding standards ...
if (!class_exists('something', false)) {
    class something {}
}
hmm ... who shall I ping ...
ping @PeeHaa, he always enjoys being pinged
yeah, try @PeeHaa
okay, so two votes for @PeeHaa, anyone else ?
or just @PeeHaa on his own ?
or @PeeHaa with someone else ?
they are the options ...
to summarize, we can ping @PeeHaa, or @PeeHaa and someone else ...
10:23
hmm... just @PeeHaa is probably enough
What's the deal with @PeeHaa?
I haven't read the whole document, but the first two sentences are a scary reminder of how different the opinions of the US and UK government agencies are ...
@JoeWatkins The more relevant question is whether there's any other way to accomplish what that does, and I'm not aware of one
Not sure why anybody would ping @PeeHaa anyway.
I don't know anyone other than @PeeHaa who likes pings the way @PeeHaa does
10:24
@DaveRandom class could be namespaced, subject is polyfilling pthreads
classes in root namespace,so difficult to autoload polyfill, right ?
How would you polyfill threads with equivalent functionality anyway?
just the api requirements, not the execution model
Is O:8:"stdClass":4:{s:13:"currency_code";s:3:"EUR";s:13:"currency_rate";s:7:"1.00‌​000";s:20:"currency_percent_fee";s:4:"0.00";s:17:"currency_modified";s:10:"144186‌​8823";} Not a object json_encoded ?
I suppose it depends whether you want to provide the dynamic run-time check or force people to use compile-time imports (i.e. use)
10:28
so namespace the extension classes in pthreads (and register aliases so as not to break shit), or if(!class_exists(..., false)) {} ... which do we prefer ?
I think most people are used to imports ... if (!class_exists()) is a bit ... yucky ...
@Epodax that's a serialized object
not json.
but so is moving all the classes to a namespace because of docs
@Ocramius ah
@JoeWatkins It's not a question of what you are used to, it's a question if how portable you want your code to be. Imports require that you know whether the classes are available at compile time, the class_exists() approach allows you to write code that should "run anywhere" if you have a graceful degrade
what about all the classes being in one file ?
that's what is being suggested I think ...
I guess that being an array means there can be more than one actually ...
10:33
@JoeWatkins You could still maintain class-per-file code and just have a bunch of if (!class_exists(...)) require_once ...; in the autoload bootstrapper
I should really learn how composer works :)
is there a way to map class to file in composer.json ?
"autoload": {
    "files": ["src/pthread.php"],
}
because that would be nice-ish, the autoload just won't get hit if the ext is loaded anyway
^ just includes the named file(s) when you include 'vendor/autoload.php';
@JoeWatkins Maybe you can use {"psr-4": {"\\": "src/"}}, however, that will attempt to load everything non-existent then.
10:36
Oh wait yeh that's true, you don't need to do anything different to what you normally would, you can just do "psr-4": { "\\": "src/" } that^
user5020521
can anybody tell me why this ternary operator doesn't work?
doesn't that effect the behaviour of other packages though ?
user5020521
<input type="text" name= "nome" value="<?php echo(isset($user])) ? echo htmlspecialchars($user["nome"]) : ''; ?>">
Well, it may try to load it from your src first, fails and tries the other options then.
@Riccardo990 remove the first echo.
user5020521
what echo? before htmlspecialchars?
user5020521
10:39
@kelunik
@Riccardo990 echo(isset($user])) check this you have unwanted ]
user5020521
as a matter of fact I need the user input to be remembered
@kelunik doesn't really matter. It's pretty rare you'll have more than one "\\" entry, and the perf hit of potentially having to hit more than one autoloader in that case is negligible. In all other cases it's irrelevant anyway, because any non-existant classes in the root ns that are referenced are about to cause a fatal anyway, the extra autoloader hit doesn't matter.
No, the first one before isset, it always returns null, because echo doesn't have a return value.
user5020521
@kelunik can I show you the whole project?
10:40
@DaveRandom Oh didn't think about it, but more specific autoloaders are executed first, right.
Yeh, that autoloader won't ever be hit unless the referenced symbol is in the root ns
and I don't think anyone really both uses composer and doesn't use namespaces
@Riccardo990 No reason to do so, it's really just <?= isset($user["..."]) ? htmlspecialchars($user["..."]) : "" ?>.
user5020521
I removed the first echo and still 500 server error
@Riccardo990 You have a few other things like a ] misplaced there.
@DaveRandom PHPUnit. :P
@Riccardo990 try this 3v4l.org/iqopl -- no need for ternary
10:44
@DaveRandom Either root or any other non-existent namespace.
user5020521
@kodeart I need the ternary operator
Hello
i getting error like :
sudo: unable to open audit system: Permission denied
@Riccardo990 when you get a 500 error you should be checking your server's error log
when i run php script from apache
@DaveRandom possibilities are always there ... i have small website and i just use swiftmail than i wont need to use namespace ( btw i am not sure weather this can be called php project )
@DhavalBharadva simple you dont have permission, whats the question ?
10:46
Greetings guys..
@Riccardo990 no you don't. but if you insist to be a ternary --> 3v4l.org/1X3vj
I just installed CentOS 7 on XenServer VM
whoopie..
user5020521
<?php isset($user) ? echo htmlspecialchars($user["name"]) : '';?>
@NullPoiиteя i have found SO link but nobody have answer that question
0
Q: sudo: unable to open audit system: Permission denied

DanielI need to execute php script, but the below information has appeared: sudo: unable to open audit system: Permission denied And my php script: <?php echo shell_exec('sudo php index.php 2>&1'); ?> Also I've added user to sudoers: apache ALL=(ALL) NOPASSWD: ALL

user5020521
@kodeart
10:47
@Riccardo990 <?= isset($user) ? htmlspecialchars($user["name"]) : '';?>
user5020521
@NullPoiиteя thank you man
@Riccardo990 echo is language construct it doesnt return any value
@Riccardo990 codepad.viper-7.com/w6zrAy if you want to return value use print instead echo
Rewriting a small codebase is the best way to Monday.
user5020521
@NullPoiиteя what I do need is to remember the user input whether the user is adding a new record by a form and accidentally leaves a required field blank have I been clear enough?
user5020521
and I am using the ternary operator because whether the user action is add I set the $user to null else $user is equals to name or lastname and so on
10:53
i am using some validation class try that pastebin.com/CRU6PhcR
i am not sure whether its nice or not but it get my work done with very less efforts
you can add more function to it ... its at starting level
@Riccardo990 check above link ^
user5020521
I have just taken a look at it and I think that is quite interesting and I want to implement it quite soon but now I need to make the code work counting only to my code
user5020521
I'm gonna try that link asa I fix the current problem @NullPoiиteя
user5020521
thank you
user5020521
may I ask you whether you got at what I mean?
user5020521
10:58
an input mask a form which according to the user action (add/edit) either is blank or fetches the data to edit
just trim and see if its not empty
user5020521
if no required field is blank you insert or update
user5020521
else header(location: go back to form)
user5020521
and if you go back to form page you must see the already entered data and fill in the missing one(s)
@Riccardo990 no you validate first by javascript and than submit form and if again there is any error than redirect to previous page
user5020521
11:02
that's what I am already doing the missing part is to remember the user input
and most of time if user dont fuck with js you wont need to redirect with php ... js would handle everything .
@kelunik Oh, no
I must've missed it
user5020521
@NullPoiиteя can I show you the error that occured soon after I replaced the code?
user5020521
that's very weird
2 days ago, by kelunik
@ScottArciszewski Any reason to keep the id column if you have selector and make it the primary key instead: https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-pers‌​istence#title.2?
11:04
sorry i am busy i can not check the code now
user5020521
so I just write it here warninig: Illegal string offset 'nome'
user5020521
what does this mean?
@Riccardo990 Your $user variable is a string, not an array.
user5020521
@kelunik an input mask a form which according to the user action (add/edit) either is blank or fetches the data to edit
user5020521
if no required field is blank you insert or update
else header(location: go back to form)
user5020521
11:07
and if you go back to form page you must see the already entered data and fill in the missing one(s)
Oh, the answer is simply: if you already use integer IDs internally for your database, there's no point in rewriting your entire application to use the obfuscated method
PostgreSQL has an extension for UUIDs IIRC
if you wanted to go that route
@Riccardo990 man that is really simple task ... validate server side because you dont want to have false data and ... dont submit form untill your js validation success ...
user5020521
@NullPoiиteя your suggestion is what I already have the only thing I can't achieve is to remember the user input and after googling I found the function htmlspecialchars
user5020521
to enter in a ternary operator within the form page
..which is completely unrelated
user5020521
11:11
the question is how to rember the user input?
user5020521
remember*
@kelunik You used phantomJS much or before?
@Riccardo990 use local storage or cookie .. which i see no need
@Riccardo990 just use isset and echo... <input type="text" value="<?php ...." />
user5020521
11:14
@MarcelBurkhard what do you think of this? value="<?php echo ($user != null) ? htmlspecialchars($user["cognome"]) : ''; ?>"
R.K
R.K
how to eliminat eduplicate values in array?
it took me more time than to just post the link but that was worth it
any one, knows why it shows powered by Fedora when i install nginx on Centos
11:20
@Rafee are you using EPEL ?
user5020521
@MarcelBurkhard @NullPoiиteя $user["name"] = $_GET'name';
echo isset($user) ? htmlspecialchars($user["name"]) : ''
$_GET'name'; come on .. you can do better
lol
@FlorianMargaine tnx
hi guys
user5020521
11:25
@NullPoiиteя what do you mean I can do better
Any moodle experts??
user5020521
I have data in the table that must be remembered if redirect occurs
please take a look guys
@Riccardo990 data in table has nothing to do with redirect
user5020521
the redirect is in the else
user5020521
11:27
and the else occurs if required fields are empty
0
A: moodle php page redirect continue page comes while redirecting

Ahmed AliTry the following in your code : redirect("page2.php?cId=".$cid, 'Loading', 1); this will display "Loading" message and delay 1 second.

user5020521
and I am afraid that data can't be remembered because of the php redirect in the else
user5020521
am I totally wrong?
> Moodle is an open source learning management system
wtf :D
I know that I am using that and coding on it just check that question buddy.
11:30
@Santhucool no idea about that moodlelol thing but you can redirect by header("Location: url");
Tried that buddy but not working :(
R.K
R.K
i am beginner to laravel 5, i am having mysql table like

parent p_title p_url child c_title c_url main
page1 p1 p_url1 page4 p4 p_url4 1
page1 p1 p_url1 page5 p5 p_url5 1
page5 p5 p_url5 page6 p6 p_url6 0
page5 p5 p_url5 page7 p7 p_url7 0
page7 p7 p_url7 page9 p9 p_url9 0
page2 p2 p_url2 page8 p8 p_url8 1
page3 p3 p_url3 page10 p10 p_url10 1
i just want create a menu using this like

page1
laravel ahhh! let me see! :/ looks different things! got it ... only php artisan can answer laravel question :D
R.K
R.K
ok can you tell me how to do this in php? NullPoiиteя
@kelunik True, but it's likely that anything which fell through that far would be about to fatal anyway
user5020521
11:39
@NullPoiиteя what do you think: if (empty($error)) { //enter or update } else {
header("Location: " . $_SERVER['PHP_SELF'] . $_GET['id'] .
'&error=' . join($error, urlencode('<br/>')));
it should work ... but still i dont see any need of it
user5020521
I understood now that the reason why I can't remember the user input is related to the redirect
user5020521
I tried to enter some data after editing the ternary operator and still I couldn't remember anything
user5020521
so I thought about the if else statement within the page which either inserts or updates the database table data
user5020521
am I wrong? @NullPoiиteя do you get at what I mean?
11:45
@MarcelBurkhard yes, i did
i believe this wont effect with nginx. right?
we call "method" for a function in the class, now I want to know what we call for a variable in the class ?
variable
@Sajad you can call them class properties
if its in a function.. its method member variable.
@NullPoiиteя ah what I want was "properties"! thanks
11:48
@NullPoiиteя There's an argument that they would be more correctly called "fields" though
may be variables are good.
@DaveRandom yes fields is correct too, but I heard it for java.
user5020521
I am trying php self and it seems it can't prevent the form from being submitted
A "property" is distinct from a "field" in many languages, and what PHP has is what those languages call "fields". A "field" is just a dumb data store, a "property" can have some transformation or computation between the returned value and the underlying data
user5020521
header("Location: " . $_SERVER['PHP_SELF']);
11:51
Anyone got triple monitor stands?
user5020521
this is currently not working
@Fabor Yeh I do at work
@DaveRandom I see
Is it the same monitors across all three? You remember that mine don't quite fit :( Getting a little annoying now. Trip stands are expensive though
@DaveRandom agreed... i still use old C++ book terminology i studied back in college days
11:58
@Fabor Yeh I got amazon.co.uk/Digitus-Triple-Desktop-Monitor-Stand/dp/B008RWG0IO with 3 amazon.co.uk/LG-22MP65HQ-22-inch-Widescreen-Monitor/dp/…, took me a lot of fucking around to make them all fit perfectly but they do now an have have <2mm gap between them
Abe
Abe
mornings
Maybe I'll use a plane to scrape my monitors down -_-
@Abe mornings o/
user5020521
@NullPoiиteя not to piss you off but could you please tell me why header("location:".$_SERVER['PHP_SELF']."?id=$id"); can't make you stay on the same page?
Morning Abe

« first day (1794 days earlier)      last day (3380 days later) »