« first day (1463 days earlier)      last day (3500 days later) » 

12:14 AM
Twas a good flight. Wrote 4 blog posts...
 
1:05 AM
Neat
 
 
1 hour later…
2:20 AM
@ircmaxell 4 blog post drafts or ones you'd be happy publishing as-is?
 
user895378
2:57 AM
@Danack Sure no problem.
 
ta.
 
user895378
Beijing smog, apparently.
 
user895378
3:26 AM
@Danack Got it working locally now. Should be able to add tests and push tomorrow:
 
user895378
$response = $client->request('http://yahoo.com')->wait();
var_dump(
    (string) $response->getOriginalRequest()->getUri(),
    (string) $response->getRequest()->getUri()
);
 
user895378
outputs:
 
Cool.
 
user895378
string(16) "http://yahoo.com"
string(22) "https://www.yahoo.com/"
 
moin
 
monrig
 
morning
 
 
1 hour later…
8:19 AM
good mornings.
 
8:30 AM
i am getting password authentication failed in ssh when connecting over wan while it works fine locally/Lan Any idea ?
 
@obiNullPoiиteяkenobi WWAN or WAN?
 
over internet (WAN)
 
how can you reach over LAN a remote box which would require access over WAN?
or are you not speaking about the same box?
 
i have setup a server Linux and trying to access from other computer at other place
and when i try to connect it over ssh i am getting password authentication failed
but i can login with same credential by other computer over lan
 
okay now I understand
have you forwarded the port?
and if port forwarding is not an option, there is also reverse ssh -howtoforge.com/reverse-ssh-tunneling
 
8:45 AM
yupp and now its working
thanks
 
tada :)
have fun hacking
 
9:24 AM
installed gitlab at localserver and unable to login with default
Username: root
Password: 5iveL!fe
 
because you probably do not have a database
the omni-thing package doesn't really work
 
so i should install them separately
thanks
 
you should install it using the "manual installation guide"
or whatever it was called
 
 
1 hour later…
10:49 AM
Morning
 
11:38 AM
Mornhaa
 
11:56 AM
@PeeHaa you probably don't want to learn that…
 
12:24 PM
gmp_random_seed or gmp_srandom
 
user895378
morning
 
ahoy
 
12:50 PM
If you can help with annonymous functions (problem with passing variable) :) pastie
(Altorouter)
 
Gööd mörning
 
Is this the call to the function? call_user_func($request['target']);
 
Good morning
 
@AlmaDo mörning
 
PeeHaa yes
 
12:53 PM
f*ck.. confusing this ö with o
 
:D
if(is_callable($request['target'])){
		call_user_func($request['target']);
	}
 
@VeeeneX You are not passing any parameters
 
what did i miss?
 
@PeeHaa call_user_func(closure, params) ?
 
@AlmaDo I got drunk last night and lost my keys. And now I will have to pick up my keys somehow and find my car :)
 
12:55 PM
Ou
 
call_user_func(closure, param, param)
So yeah in your case closure, param
 
@PeeHaa löl .. how nöw will yöu find it?
 
PeeHaa thanks
 
@VeeeneX yw ;)
@AlmaDo I now where it is ;) It's just not where I "left" my keys
 
12:58 PM
woops :)
 
1:19 PM
it's lack of people today since it's Saturday, eh :o
 
hi guys
 
Hi!
 
im trying to make the procession where i can get to know all session where user is login
 
BTW, Does PHP have metaclasses ?
 
and if the user is login in another session destory other all other sessions
//check other active sessions
function checkper_session($userid){
$current_session=preg_grep("/^sess_/", scandir(ini_get("session.save_path")));
foreach ($current_session as $session)
{
session_id($session);
if($_SESSION["candi_id"]==$userid){
echo "found <br>";
}
}
}
if doing some thing like this
 
1:21 PM
@FaizRasool Please format the code
 
no sense in that code
 
@AlmaDo I think the same
 
once session was started, session id cant be changed
 
session_id() may be used only for retrieving id of session during it's processing.
 
1:23 PM
@AlmaDo It could be session_regenerate_id
 
to change the id, it must be used before starting id
no sense in regenerating id, because point of the code is to "access" other sessions
 
yes
i got it i think that was error
so first i must destory the session
?
 
side note - it's totally wrong in sense of security to do that
 
why is that
explain please
 
I mean - to access sessions which are not related to this user
 
1:25 PM
yes true
but im trying to make some thing like
 
just register your own session handler which will track sessions with connection to user id
 
user can see where other places user is login
ok great i got it
one more questions
 
and when session is started, destroy all sessions, which were retrieved by that connection. You may store that connection in some external storage for instance
 
im new to PHP
 
however, it's hard to imagine why to do that in the first place (i.e. why destroy all other sessions)
 
1:27 PM
im trying to use the class of Respect/Validation
but cannot find the documentation to load it with out using EAR and Composer.
PEAR *
any one knows how to use it
like for instance respect library exits in this path
library/input_validation/***
 
@FaizRasool Build an autoloader
 
please explain im preety confuse in this
im already using SP-0
standard auto loader
function autoload($className)
{
$className = ltrim($className, '\\');
$fileName = '';
$namespace = '';
if ($lastNsPos = strrpos($className, '\\')) {
$namespace = substr($className, 0, $lastNsPos);
$className = substr($className, $lastNsPos + 1);
$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
}
$fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';

require $fileName;
}
 
If you will call the class Validation search it in ....
 
still confuse in this last step
like i have this function
and then how can i call the function
i mean class
 
$loader->registerNamespaces(array(
* 'Validation' => __DIR__.'/library/input_validation',
* ));
So use a namespace
 
1:32 PM
ok
with * ?
is the code you given up is correct
?
 
No that's the commented part
@FaizRasool And you can't use composer?
 
im like coding from year now
i still think im learning
no i dont know
much about composer
 
It's easy to use
 
ok can you explain a bit
 
@FaizRasool quite easy to use
 
1:36 PM
what is composer
 
@FaizRasool Give me a minute
 
ok @VeeeneX appreciated
@VeeeneX for your information im using Netbean
on MAC
 
Ok
 
developing on live server FTP
 
What's the output in console of php -v
@FaizRasool
 
1:40 PM
sorry Veeenex
i did not get it.
console of PHP means PHP version ?
or what
 
Normal console in mac
:D
 
:D
but im developing in live server
 
And enter a command php -v
Ok that's nice
 
yes this is what im thinking
im devolping in live server
 
Oh
 
1:42 PM
how can i do this in live server
i have WHM access
it is virtual private server
 
You can copy files trought ftp right?
 
yes this is what im doing
ftp sync
 
Great
 
so what should i do
 
Try to open console in your localmachine and paste the following command
php -v
 
1:47 PM
terminal
Faizs-Mac-mini-2:~ faizrasool$ php -v
PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
Faizs-Mac-mini-2:~ faizrasool$
i have PHP 5.4 in server
 
Great!!!
 
yes
 
ok let me look
 
2:05 PM
@NikiC Is there a reson FastRoute doesn't havea v1.0.0?
 
hi can some help me a simple xml issue i cant get my head round it
 
try and explain it @NasirShiraz
 
Jul 27 at 21:28, by Danack
Hello, I have a problem, but I am too lazy to write the question out until some says that they will help me. http://sol.gfxile.net/dontask.html
 
:D
@FaizRasool So
 
true @Danack, so true...
 
2:16 PM
ok thanks cs. im trying to get the url from enclosure tag from the following xml <enclosure type="image/jpg" url="http://img.skysports.com/14/09/128x67/football-louis-van-gaal-manchester-un‌​ited_3202836.jpg" length="123456" /></item>
ive tried $url = $xml->channel->items[$i]->enclosure->url;
 
6
A: PHP SimpleXML + Get Attribute

Rocket HazmatYou need to use attributes() to get the attributes. $id = $xml->show->attributes()->id; You can also do this: $attr = $xml->show->attributes(); $id = $attr['id']; Or you can try this: $id = $xml->show['id']; Looking at the edit to your question (<show> is your root element), try this: $...

 
ok thanks il give that a go now
 
in HTML / CSS / WebDesign: 18 years of CSS, 13 mins ago, by Billy
Anyone use less.php? I can't get the source map to spit out the right url for the imports :(
I've implemented just like it says in the docs
tried setting import directories, too..
	$root = __DIR__;
        $less_files = array( $root . '/css/profile-styles.less' => '/' );
	$directories = array( $root . '/css/' => '/css/' );
	$options = array(
		'cache_dir' => $root . '/css',
		'compress' => true,
		'sourceMap' => true,
		'sourceMapWriteTo'  => $root . '/css/profile-styles.css.map',
		'sourceMapURL'      => '/css/profile-styles.css.map' );
	$parser = new Less_Parser( $options );
	$parser->SetImportDirs( $directories );
	$css_file_name = Less_Cache::Get( $less_files, $options );
 
@Danack i get the following error when i added the attributes Trying to get property of non-object in /hermes/bosnaweb08a/b683/ipg.n4zorg/connection2.php on line 123 Fatal error: Call to a member function attributes() on
 
Now would be a perfect time to use a debugger to find out what the error is in your code.
 
2:29 PM
my code doest like the attributes function
 
@Fabien not really
 
It's stable isn't it?
 
@Leigh gmp_random_seed would be my preference. (or leaving it out altogether ^^=
@Fabien yeah
So I spent a shitload of time yesterday trying to make qemu map a serial port to a tty. Today used a pty instead, was working two minutes later...
 
@NikiC It would be good to tag it. Some people/companies have a policy against using stuff that hasn't reached 1.0.0 on the grounds that most people interpret a less than 1.0 release number as meaning "Don't use this yet, it may change wildly".
 
@CSᵠ any suggestions please
 
2:48 PM
Good morning
22:23 <tedivm> ircmaxell, had i known you were going to use my reddit comment as the basis for your blog post i would have made it a bit more thorough. Thanks again for proving that you care more about pulling one over on people than actually solving anything.
22:26 <tedivm> it also just reeks of ignorance- "So to say "the simple way doesn't handle stampede protection" is completely disingenuous." is complete and utter shit
23:45 <Korvin> tedivm: chill
23:45 <Korvin> take it in stride :)
05:09 <ircmaxell> tedivm: realize something. I tried to have a conversation in the reddit thread. But ev
 
@ircmaxell Made more typos than normal there, mate ^^
 
I was typing while pissed on a tablet :-)
 
lol
 
@NikiC heh, I had some not fun with ttys a couple of days ago, but haven't worked out what I was doing wrong yet. In C I can fopen("/dev/tty") and write to it, affecting the current terminal, in PHP I can't...
 
Then, this morning, a tiny excerpt:
09:17 <ppetermann> which brings us back to the complexity
09:17 <ppetermann> so have you looked at other caching standards?
09:17 <ppetermann> like JSR107, Jcache?
09:18 <ircmaxell> No, I avoid most things written in Java as they are typically known to be extremely overengineered...
09:19 <ircmaxell> I prefer systems like haskell and Scala which tend to encourage small composable systems rather than gigantic one-size-fits-all solutions...
09:20 <ppetermann> well, if you haven't looked around, it is probably not so easy to find a size comparison for what is "gigantic"
also, @LeviMorrison 3 publishable blog posts, and one that's a draft that I'm not sure if I want to publish
 
3:01 PM
I get a faint smell that there's discussions about you when you're not there.
As they say though, if you throw stones in a pond, expect ripples.
 
throw stones in a greenhouse, expect to get showered with shards of glass.
 
You shouldn't throw stones in a glass house.
 
I can take it. I don't mind. All I know is I've been pinged by a large number of people, many of whom are very prominent saying "Thank you for saying what needed to be said"
 
You should start using that batman photo of yours as your main avatar instead.
 
I don't want to be "that guy":
 
3:07 PM
lol true.
 
@ircmaxell are you going to submit to phpconference.com.au or have you been contacted by them?
 
I haven't yet, and I'm not sure. I'd like to, but timing...
 
k. I'm going to submit a paper (almost zero chance of getting accepted as a speaker as I hardly have any public visibility) but I just found out yesterday that the people organising are nothing to do with the Sydney PHP user group, and don't seem to say who is actually organising it.
 
Good luck!
 
3:23 PM
 
We know.
 
3:51 PM
hi folks
is there a way to get the number of pdo connections ?
 
4:10 PM
I have an internals question if anyone's around.
 
I'm around
 
1) Would it be okay to bundle libtommath into Zend (i.e. put it in the repo) rather than use it as an external dependency for bigints (allows us to use custom allocators, also means no new external dependency) and 2) In that case, should I make an m4 for it, or should I just make our build scripts call its own makefiles?
 
if any one can help me on benchmarking PDO , to reduce number of connections Please
 
if we do bigints it makes sense to have a bundled version
note though that distros will use a shared library instead
bundling is just convenience for people compiling themselves
 
I'd prefer if they didn't. That removes the custom allocators.
Then again, distros could make a special shared lib which enables them.
 
4:16 PM
also I'm not sure what I think about this decision to use libtommath. I mean, I'm all for using open-source software, but I'd assume that this library is somewhat less optimized than gmp is, for example
 
It is less optimised, that's true.
It does have a nicely organised, easy to browse codebase, though.
 
@NikiC What is the correct function to dtor the retval variable from zend_execute()?
 
@NikiC Also, we could still use GMP as a compile-time option. The backend of bigints can be switched out fairly simply.
 
Hey guys. Suppose you had within your code: "$user->NAME;" and the class was obfuscated.

How would the class with that variable look like if you want to re-create it?

class foo
{
$NAME = 'jacob';
}
$user = new foo;

doesn't work...
If you want to echo $user->NAME;
 
@bwoebi huh? is it somehow special?
 
4:22 PM
@NikiC well, I tried zval_dtor(&retval) but that just made the whole thing segfault later when reusing that variable…
 
@BDillan Where is the problem?
How can I redirect or rewrite from /js to /public/js?
 
@bwoebi always use zval_ptr_dtor when in doubt
 
what's the difference between them?
 
there isn't much difference anymore
zval_dtor will directly free arrays instead of using refcounting and not add to the gc buffer
 
@VeeeneX if I wanted to re-create a class so I can access '$user->NAME' how would the class look like? It's not a problem, I just can't find a tutorial online that deals with PHP and accessing class variables
 
4:24 PM
the former is not something you usually want. and to avoid gc better use zval_ptr_dtor_nogc instead of zval_dtor
 
@BDillan Can you make pastie with result class?
 
@NikiC ah thanks. Will try. … better :-)
 
I am just given '$user->NAME' and want it to print a name. Any name. How can I write a class so when I echo $user->NAME it gives me a name?
 
@BDillan You're missing a public/private - 3v4l.org/queQl
 
@NikiC GMP is super optimised, and that's great, but the whole unhooked abort() thing and the custom allocators are a problem
 
4:29 PM
Plus the license being not compatible with PHP's.
 
Ok I see. Thanks guys
 
@AndreaFaulds The library doesn't look very maintained
 
@NikiC It is maintained, actually. It's just the master branch isn't the trunk, that would be develop
 
@BDillan yw ;)
 
4:33 PM
I also thought it wasn't. They seriously need a README.
 
having fun with watchpoints in phpng……… It's the single most complicated thing to port...^^
 
@bwoebi porting phpdbg?
 
@AndreaFaulds yeah, nearly finished. Just watchpoints left.
 
Glad to hear it! Getting annoying typing --disable-phpdbg
 
huh? phpdbg should be disabled by default anyway?
 
4:41 PM
My build script adds it.
So I have to remove it.
 
@AndreaFaulds ah
why ... why do people do that?
 
@NikiC Currently asking the maintainer the same question on IRC.
 
there's some tests the haskell people did, comparing various MP back-ends, no cases where LibTomMath is faster than GMP
 
Also, does it have docs?
 
@NikiC could you please explain to me when IS_INDIRECT and what for it is used? (porting watchpoints, not sure what I need to make attention for here...)
 
4:50 PM
@NikiC Yes, there's a LaTeX-generated PDF: github.com/libtom/libtommath/blob/develop/tommath.pdf
It not only describes the API, but also its internals ^^
 
@bwoebi if a zval is stored somewhere else, but you need to be able to access it via ht as well
e.g. if the value is stored in the CV table and a symtable is created it will contain INDIRECTions to the corresponding CVs
the same with the property table of objects
 
Wait, no, that specific PDF doesn't describe the API, only its internals and rationale. There's a LaTeX file with API docs though.
 
@NikiC is it just used in symtables/property tables or also somewhere else?
 
@AndreaFaulds is there a built version of the file?
 
4:58 PM
Not sure.
 
@bwoebi those should be the main usages. but there may be others, not sure
 
@NikiC can we assume that the pointer of that indirection never will change during it's lifetime?
or when is that indirection ptr changed?
 
@bwoebi I think so
 
@NikiC that makes everything much easier, thanks
 
5:10 PM
@NikiC There is in the v0.42 tarball, I checked.
 
heh
my interest usually doesn't go far enough to download and extract tarballs
 
:p
OS X auto-extracts tarballs, so I don't fear them
 
Really, one of the most important things for any library is having good online documentation
 
Yeah, that could certainly be improved
 
and by online I mean in html
 
5:14 PM
Right
That's one thing GMP has over this.
 
GMPs docs aren't great. They miss a) version information and b) specification of how things should behave (like, if I pass a negative number, what do I get?)
But at least they are available
And I think with GMP b) is mainly because they don't know themselves. There are discrepancies between versions about things like that.
 
The embarassing thing is that LibTomMath and GMP still have far better documentation than the Zend Engine itself
 
but the gmp docs it's still better than not having any docs at all, like libtommath
 
LibTomMath has docs, they're just not online. They probably should be. Hmm...
 
I'm pretty sure this can be easily fixed if we already have the html...
 
5:19 PM
just uploading a rendered pdf would already be a good start ^^
 
Well, we're making progress. It should soon have a README, plus he switched the default branch GitHub shows to develop
 
cool
btw, it's a really awesome project
it gets us another step closer to free us from the joke of G* software
 
It's one of those few awesome projects that are Public Domain
Ahahahaha
PHP ruins everything, as usual :p
 
@AndreaFaulds :D
 
user1642018
5:53 PM
how can i view old chats ?
 
user1642018
@PeeHaa ty
 
np
 
6:52 PM
@Leigh usually it is a good idea to not commit documentation changes referring to unreleased versions.
 
@Tyrael where would you then push them?
 
@bwoebi ? you simply push it later after the release is announced.
 
@Tyrael so, ideally: release is announced, commit is waiting to push, but we naturally have forgotten about our pending doc changes…
 
@Leigh we had to sync up 5.6 with the other branches, otherwise the latest 5.4 and 5.5 would announce security issues which also affects 5.6 but no release is available with the fix for 5.6 but the problem is made public leading to potential exploitation.
@bwoebi I can understand how can that be a problem, and while I don't have a good solution (other than check after the release that you don't have pending changes) but commiting first will lead to confusion, either because you refer to an unreleased version or as now, where your change doesn't end up in the release for some reason.
 
we'd just need branches like in php-src which are merged by the RM into master when the release is announced too
 
6:59 PM
and for the record, I did mentioned in my previous email
to the list that one of the potential outcome is that 5.6.2 will be released this week containing only 5.6.1+sec fixes
anybody can created branches, so if you think that would help +1 from me
 
@Tyrael uh, docs are on svn, I won't touch that thing…
 
(anybody = anybody with phpdoc karma)
@bw
ehh,
@bwoebi so your question was hypothetical or you are using the online editor?
 
@Tyrael the latter usually
I didn't do a lot on docs yet, but when I did (except once and then never again…), always the online editor
 
maybe we could ask Yannick if he has some idea for that
I prefer svn because I can do a full build there (usually I'm a bit afraid I break the build)
 
@Tyrael The question wasn't why the sync is necessary, but why it required doing a sec only release
 
@NikiC because we either delay 5.4 and 5.5(including the outstanding security fixes) to have a proper QA cycle for 5.6 or shortcut the 5.6 release cycle to have it in time
and as the 5.4 and 5.5 was already on the same timeline, we (Stas, Julien and me) decided that it is better to have 5.6.2 with security fixes only
than to delay 5.4 and 5.5
releasing 5.4 and 5.5 with the security fixes while not having an 5.6 release was out of the question
 
so, 5.6.3rc1 in two weeks?
 
yep
 
@JoeWatkins @FlorianMargaine @rdlowrey I finally decided xml-protocol branch is mature enough now, merged it now into master.
 
7:41 PM
@Tyrael sounds reasonable
 

« first day (1463 days earlier)      last day (3500 days later) »