« first day (1070 days earlier)      last day (3893 days later) » 

1:02 PM
Also what skill level would you say PoEAA is for?
 
@Fabien That's for hosting, though
 
morning
 
@DaveRandom For hosting?
 
I need some ideas here
3
Q: Maximum сontinuous achievable number

Alma Do MundoSO, The problem Definitions Let's define a natural number N as a writable number (WN) for number set U = {u1, u2, ..., uS} in M numeral system, if it can be written in this numeral system from members of U using each member no more than once. More strict definition of 'written': - here CONCA...

 
@Fabien Yeh, the charge is for hosting a site on that subdomain. They don't charge for DNS records
 
1:07 PM
@AlmaDoMundo That seems more suitable for programmers site.
 
@Jack but SO it a programmers site
 
@DaveRandom Oh. It doesn't come across that way.

"You can now buy subdomains from 123-reg! Each subdomain costs only £10 per year or 10 for £80.
For example, if you have example.com registered with 123-reg you can now set up http://product1.example.com/ and redirect users to http://www.example.com/products/1/ and have any email sent to @product1.example.com sent to product1-sales@example.com."
 
hi guys what's up :)
 
Yes and no. If you have a specific programming problem, SO is the right site.
 
@Jack my problem is very specific
 
1:08 PM
Here anyone is having experience in Croogo CMS? I want some help. Please find my question in stackoverflow
 
Yeah, but it's not language specific.
 
hope I've described it quite well
 
little problem here...I'm trying to add a new field to an object, but the field must be an array...
 
0
Q: Croogo Theme issue in localhost [Windows]

Britto ThatheyuI am using Croogo CMS in my Cakephp website, its working fine in server and all linux machines but it’s not working properly in windows machine. Please find below issue what I am facing in my local host PHP Version:5.3.13 Croogo Version: 1.4.3 OS: Windows 7 - 32 bit Goal: I want to use my Cak...

 
I get "Fatal error" :/
 
1:09 PM
@Fabien Oh wtf I've not seen that. Still, what you are paying for there is full domain services as if the sub is a root domain, rather than just the DNS record (which is all you need)
 
@Jack hm. Yes, it's not language specific, but then all question tagged with 'algorithm' are bad questions
 
£10/yr is still a rip off for that though
 
any language will fit here
 
$object->new_field = array(1,2,3);
 
@AlmaDoMundo Not bad, it's just that answers may be better on a different site.
 
1:10 PM
@PeeHaa never mind, wil bring some more..
 
@DaveRandom Ah fair enough. I just added A records in the advanced DNS for what I needed.
 
@gr4devel If that gives you a fatal error then chances are $object is not an object. Also your code sample is missing a ; but I assume that's a chat typo
 
Still need to setup email as zimbra didn't work.
 
@DaveRandom yeah buddy that was a chat typo
 
@Jack ah, ok, may be you're right. Well.. I see that SO provides good answers anyway (I've learned much simply from comments to my question)
 
1:11 PM
@DaveRandom and I can confirm that $object is actually an object :)
 
@gr4devel Well, errors usually have messages associated with them, care to share it? :-)
 
wow I only get 1 email address. £11 for an additional one.
 
@DaveRandom man I'm looking at the logs but there's nothing :/
 
@Fabien I just put a global forwarder on mine to my Gmail
If you want a proper email management system, set up a mail server on your server and repoint the MX
@gr4devel ...then how do you know you got a fatal error?
 
browser...white page...'Fatal error' :/
 
1:14 PM
which shows you... what?
And if you comment out that line then it works?
 
@DaveRandom yep :/
 
@gr4devel full file on pastebin please :-)
 
wait buddy maybe I found something
...
 
The only thing I can think of from the description you give is a non-printable char or weird whitespace char in your source code - in particular, you can get parse errors if you copypasta a non-breaking space from teh internetz
 
I think that the problem is more complex
the object I'm trying to modify is handled by a framework
 
1:18 PM
Ahh right, if you have a __set() on the object that could mask something
 
there must be something that I'm missing about this object
right man exactly :D
 
(this is why you don't use __set() magic if you can avoid it)
 
I love __set() >D
 
@DaveRandom however man let me thank you for your help I really appreciate that :)
 
np, although I didn't do anything really :-P
If you do have a magic setter and it should accept anything that you give to it though, at worse it should raise an E_USER_WARNING, having property assignments potentially blow up the whole script is bad news
E_USER_NOTICE probably makes the most sense for attempts to assign to undefined/read-only properties
 
1:28 PM
@DaveRandom you did a lot by listen to me and by trying to help me buddy :D
however I think that the object doesn't permit to set array fields
I'll go with a string and a delimiter and explode it when I need the single elements :D
@DaveRandom thnx again :), to the next time :)
@all by guys :D
 
@Jack are you here? :p
 
No, I'm hiding.
 
the question isn't obvious i guess.
Because it's hidden inside the "Specifics" header.
 
Hi everyone. :)
I need a tip about organizing my classes. How do you know when you have to put a piece of code insitde another class? I mean how do you organize your code? Do you have any tips?
 
1:37 PM
@Jack it's plain text: "so, question is:" :) - and - suddenly, on SO it's quite clear :)
nevermind - at least, I've tried
 
I'd like to have only a few methods inside each class to make them easier to maintain and read through, but then I'm worried that I'll end up with too many classes.
 
@gr4devel Sounds like a sucky solution tbh, can't you just use a different object? Expando properties are generally code smell IMO...
 
@AlmaDoMundo Maybe on SO they were so overwhelmed with the math and algorithm stuff that they just upvoted lol
 
Anonymous
YAY. My 1-week ban just got lifted.
 
Anonymous
And I haven't missed anyone, in case you are wandering :p
 
Anonymous
1:43 PM
@Jack @DaveRandom hows it going?
 
@Jack I think that belongs to SO since I want to get solution for algorithm (and such tag exists on SO)
 
You can get banned from SO chat? :o
 
@Jack as for programmers - they answered to you with "don't send SO offtopic crap to us"
sad..
 
Anonymous
@Starsong Yup.
 
also I was surprised (in bad sense) that in programmers one person put my question on hold. So based by opinion of 1 man my question was treated as crap. Sad, very sad
 
1:46 PM
i'm planning to buy a budget VPS, they provide SolusVM Control Panel, is it equivalent to cPanel? Can i run PHP as soon as i get the VPS?
 
hi all is smtp configuration is free service?
 
Anonymous
@NokImchen You must install php first.
 
@NokImchen Solus is nothing like Cpanel, it's just for reboots & reinstalls basically.
 
@Simon_eQ is wamp server is not enough?
 
Anonymous
and a webserver apache/nginx
 
1:48 PM
@Simon_eQ oh, i have no idea about VPS. i googled a bit and it says that "if u dont know then dont use it..!!" :(
 
Anonymous
@kondapaka nope, php does not mean you have WAMP installed
 
@NokImchen If you want cpanel, you'll be paying at least $10/month more than if you dont
 
@Simon_eQ all i want is a file manager, PHP, phpMyAdmin, nothing else. What is the easiest way to install those?
 
Anonymous
@NokImchen but on from vpscorder for 5$ a month, and practice with it, or download VM in your machine and play with that.
 
@Simon_eQ Not bad, you?
 
1:50 PM
@Starsong oo!! my vps cos only 10 USD/ys! i cant afford CPanel!! :(
 
Anonymous
@DaveRandom Not bad at all.
 
@Starsong you can, but in his case it was voluntary
 
@Simon_eQ is wamp server is not enough for php?
 
Anonymous
@kondapaka for PHP, the php built-in server is actually enough
 
actually i installed a drupal project in wamp server
 
1:51 PM
@Simon_eQ this is the VPS 123systems.net/billing/cart.php?gid=19 i was talking about m not the owner/ not affilated too
@kondapaka can i install wamp server in an unmanaged VPS?
 
@AlmaDoMundo Such a friendly bunch.
@Oded Yes, almighty one. — Jack 9 secs ago
 
yesh. I just hit Ctrl+W and forget that site :) I'll stay on SO (at least here I've never faced negative feedback without well explanation)
 
user895378
@Jack Nice! I'll push my SAN verification changes up to my php-src fork a bit later
 
Anonymous
So, I have finished github.com/simon-eQ/seoWrapper and it actually does what it was intended to do, but I can't think of anything else, as to how to extend the functionality or improve it in any way possible.
 
@rdlowrey Cool, btw ... do you think I should change the function signature?
I'd agree with nikic that return value > output-by-ref.
But I also believe some bad design decisions have been made in openssl ext.
 
1:55 PM
@Jack yes
 
user895378
+1 for return value whenever possible
 
Alright, 3 votes > 0 ... fixing it!
 
Hello @Simon_eQ
 
Anonymous
@Fabien what up
 
Out params are only useful for functions that have multiple return values, and then it should probably be split into multiple functions.
 
1:56 PM
@DaveRandom or an array return value ;)
Out params are only useful in C, really.
Not something for remotely modern languages
 
There is a special place reserved in hell for whoever wrote the LDAP extension and modelled it very closely on the C API
It uses a lot of out params, and it also requires that you pass two resources to many functions when (I presume) it would have been easy enough to store the link ID inside the result resoure etc
 
Anonymous
4 mins ago, by Simon _eQ
So, I have finished https://github.com/simon-eQ/seoWrapper and it actually does what it was intended to do, but I can't think of anything else, as to how to extend the functionality or improve it in any way possible.
 
@Starsong how is webmin, kloxo, lxadmin ? So they provide a file manger, php feature, mysql and a dns manager?
 
Anonymous
I will post that 100 times, until I get responses :p
 
@Simon_eQ I'm waiting for a good time and the courage to ask someone to review my last creation code wise.
Perhaps you might ask the same.
 
1:59 PM
@NikiC I don't like that a lot of the time, if I have a function where I want to return multiple values that are not a collection I tend to either use multiple functions or return a value object
 
Anonymous
@Fabien let me see it, if it is online.
 
Anonymous
If it is not complicated, then I might say something ..
 
user895378
@DaveRandom I try to create multiple functions when possible in that situation as well.
 
Anonymous
@Fabien, ok laymans term. What does it do? SHoot!
 
2:02 PM
@Simon_eQ Description on the front page as readme.md :P
Example usage.
 
Anonymous
What is it used for? a database query?
 
@Simon_eQ I use it for Solr but it's Lucene query syntax.
 
Anonymous
@Fabien after @DaveRandom I would like to thank you for introducing me into something I did not want to know about :p
 
Anonymous
I am only interested into PHP-related things
 
2:05 PM
@DaveRandom I don't really care as long as it's not using references ^^
 
@Simon_eQ Everything is related somehow :)
 
References are the root of all evil
So many things are the root of all evil...
 
@Simon_eQ Yeh Solr/Lucene are big scary things (not really :-P). If you need them for something, you'll already know what you need.
 
Anonymous
@NikiC
 
Anonymous
2:07 PM
@DaveRandom right now, I am only concerened in learning about OOP-PHP related things
 
At work we use Hadoop with Nutch to populate Solr to search for illegal content. I've set none of that up but soon it will become my responsibility. So off I go learning about big data and all the rest.
 
@Simon_eQ Get your kicks on √66
 
Anonymous
@DaveRandom me not gets it :/
 
@DaveRandom solr is awesome
 
Anonymous
Can you tell, from quick glimpse if and how github.com/simon-eQ/seoWrapper this could be improved.
 
2:10 PM
or extended :)
 
public function __construct($customPages, $defaultSettings){
needs more type hinting
Also those member are not defined in the class using the visibility modifier
 
Anonymous
@PeeHaa I am embarrassed to say this, but type hinting gives me errors.
 
ty @tereško
 
@PeeHaa Indeed it is, I wish I'd had more use cases for it actually, I don't know it well enough
 
2:13 PM
@Simon_eQ you could separate the template from the logic
 
^ +99999
 
Anonymous
@tereško thanks, but there are no templates there. If you are referring to the HTML part, it is just there as example.
 
Anonymous
So, people could get what the class does, and how it could be used.
 
HTML is a template.
 
@DaveRandom Me neither, but I know my product filter is blazing fast :D
 
Anonymous
2:15 PM
I really wanted to minimize the instancing and validating part of the PHP code, to one or two lines, but that would mean, I would have to start the object inside a class, which would not be a good idea imo
 
Anonymous
On a side note, The code is so sexy and well-eloquently-written I wouldn't mind if anyone wants to masturbate to it :P
 
@CvetomirLazarov you rang ?
 
foreach $program (@programs) {
    print "${program->name} is awesome" if ($program->author eq "Starsong");
}
Umm
Wrong language >_>
foreach($programs as $program) {
    echo $program->author == "Starsong" ? $program->name . " is awesome" : null;
}
 
> configure: WARNING: This bison version is not supported for regeneration of the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0)
WAT
Out of all versions, why does my Mac come with 3.0?
 
Because Macs suck.
 
Anonymous
2:23 PM
function returnSomething(){
  $a = array('foo','bar','tar');
  $b = array('one','two','three');
  $c = array('red','white','green');
  $all = range('a','c');
  return $$all;
}

var_dump(returnSomething());
 
Anonymous
The above shouldn't return NULL,
 
hi all
 
Anonymous
or should it?
 
can any one help me in resolving my issue?
 
@Simon_eQ Why would you ever do that? :S
 
2:24 PM
0
Q: How to access multidimensional array element in smarty template?

JSLoverI'm assigning one multidimensional array named $user_details to smarty from PHP as follows: $smarty->assign('user_details', $user_details); The actual array $user_details looks like follows: Array ( [user_id] => 263129476e186da1dc28c8d0b5e48521 [user_first_name] => Nishant [user_l...

 
@JSLover Don't ask whether someone is here to help you. If someone is around and wants to help they will.
 
Anonymous
@Starsong Because, PHP has no limits
 
@Starsong: Ok
 
@Simon_eQ Wrong
 
Anonymous
@DaveRandom but, that is just a very tiny script? it's not even a loop, how much memory could it possible require? Just doesn't make sense.
 
2:27 PM
@JSLover please STOP using chat to spam your questons
 
I may have missed some context
 
Need to make an animation for a presentation, totally think it'd be easier to do with JavaScript than to actually right click > animate every bloody thing
 
@tereško I assume that was for JSLover. :P
 
@Starsong yes ... minor fakup on my part
 
@JoeWatkins What?
 
2:29 PM
@CvetomirLazarov pthreads
 
Oh.. I was asking for an example of where would you use them.
What for :)
 
@NikiC What actual version is bison 204? I have 2.3, it should work with that no?
 
user895378
@Jack Regarding "bad design decisions have been made in openssl ext", I'm starting to think at least some of that is the result of bad decisions in OpenSSL itself -- lots of the lib functions do ugly things with references :/
 
@Jack 204 is 2.4
 
2:32 PM
@rdlowrey Sure, but that shouldn't be a reason to repeat it in the php abstraction :)
 
user895378
true :)
 
@NikiC Darn. 2.3 is too low and 3.0 is too high.
 
@rdlowrey Using references in C is the only way really, in PHP you have a choice to write sane code
 
@CvetomirLazarov anytime you want to do more than one thing basically ... there's a bunch of examples on github, a little article on gist, a bunch of stuff in answers I've written for people on SO (every single answer I've given is pthreads related, on purpose), and it's pretty well documented by now ...
 
user895378
makes sense ...
 
2:35 PM
@JoeWatkins Okay, I will take a deeper look into your comments/answers/gists. Thanks!
 
Search for "brew bison 2.4" and you get this as the first result ... hurray.
 
feel free to ping me with specifics ...
sorry if I am being a bit short, hands covered in oil, busy ...
 
Yarrr, c'mon 'ere you bison!
 
I might aswell give up, I'm clearly not getting an MOT this week :(
 
Useful site: explainshell.com
 
2:38 PM
never buy an old car because it looks cool ... they are better in posters than on the driveway ...
 
If, when doing deeper engine changes, just a very few tests fail, I know that I'm doing something wrong
 
Also @Simon_eQ really invest some time in some sane coding styles
 
Anonymous
@PeeHaa I thought I did almost everything you guys asked! I know, I am too noob to making OOP application but, I'm still trying hard to keep up.
 
stupid world, I'll get it next week ... I waited 30 years to have a porsche guess I can wait a week longer ...
 
Anonymous
If you are talking about SOLID principles, I am learning about them
 
Anonymous
2:41 PM
So, I can't do anything with that right now.
 
I was not talking about OOP
 
Anonymous
Well then, don't be shy and let it out :)
 
He did. Learn some sane coding styles ;)
 
Anonymous
If you are talking about github.com/simon-eQ/seoWrapper/blob/master/src/… then, I know what you mean.
 
Anonymous
I even stretched this github.com/simon-eQ/seoWrapper/blob/master/src/… to 5 lines instead of using the ternary operator, because of you @PeeHaa :)
 
2:45 PM
Stupid compiler on Mac ... one error gets burried by 553 warnings =S
> warning pile!!
 
@Simon_eQ Make it a ternary, it would be cleaner. *coolface*
 
Anonymous
@cspray thanks
 
From the ternary fan :)
 
This is the strangest CS I have ever seen
    $myStaticPages = [

        'Pages'=>[
            '/tests.php'=> [
                    'I am title for this page',
                    'I am optional description for test page',
                            ],

            '/index.php'=> [
                    'me is page title for index.php',
                    'optional page description',
                             ],

            '/contact.php'=> [
                    'title for contact page, Aloha!! Meos contactios ',
                    'optional page description',
 
Nice, short array syntax :)
 
2:47 PM
@PeeHaa ow god kill it, kill it please
 
Anonymous
@PeeHaa I wanted to give the user the ability to specify which title, and description belong to which page.
 
@PeeHaa By CS you mean str_repeat(' ', rand(0, 20)) right?
 
^ that @Simon_eQ
That's what you bracket placement looks like
Also your indentation just does something based on its mood
 
Anonymous
I take responsibility for the indentation, because I din't know how arrays are indented. But, comparing the current class to this, github.com/simon-eQ/seoWrapper/blob/… change in a short time, is really as bad as you think.
 
Anonymous
Anyway, I will improve it
 
2:53 PM
@Simon_eQ Even more horrible true :)
 
@Simon_eQ You could check out PSR-2 :)
 
@Simon_eQ Just indent 4 spaces.
Not mt_rand(0,6) spaces.
 
Anonymous
thanks everyone for the input except @NikiC
 
Anonymous
I will do my best
 
Anonymous
I was very enthusiastic about creating the lib the first time, cause I thought I would commit the hell out of it, until it becomes 'something useful' but, after few commits it got to the point, where it didn't need anymore commits, because it got the job done as intended.
 
Anonymous
2:57 PM
Now, I am turning my head towards github.com/simon-eQ/nanoscale
 
user895378
@DaveRandom @Jack @NikiC I'm trying to work out how best to handle making encrypted streams secure by default ... How do you feel about a new SSL context option "strict_mode" that defaults to TRUE? This would allow users to optionally maintain BC-compatibility by passing a context value of "strict_mode" => FALSE and avoid the hassle of having extra on/off switches for each individual aspect of the verification process (like "SAN_enabled" => TRUE). Any thoughts on this?
 
@Simon_eQ Clean it up then start another lib.
 
Anonymous
G-d, knows if anyone will ever use it.
 
@rdlowrey BC compatibility and manually in the same sentence??
 
@rdlowrey If you want code-level BC, that would need to be ini-configurable
 
2:58 PM
Good luck with that :D
 
Anonymous
@Starsong yeah, that is the plan. It should keep my commit status alive until I start the project.
 
user895378
Ugh ... I hate global php.ini god values
 
Strict mode that defaults to true sounds a bit .... strict :)
 
Adding an option that must be disabled in code in order to have the old behaviour is not BC.
 
@rdlowrey That's why you would need to do it the otherwy around
 
3:00 PM
I think the mode, that would encompass multiple settings, could be nice.
 
Like I doubt Lester will let you hav it
;)
 
Lester is a tough crowd heh
 
user895378
@DaveRandom No, I'm talking about a 5.6 where secure-by-default is implemented.
 
Although for the record, if it were totally up to me, I'd just force it on users and make them learn what they are doing if they want to turn it off
 
user895378
BC breaks allowed.
 
3:01 PM
If we can get enough peeps on board it might work.
 
user895378
@DaveRandom But that's why I need something like the strict switch. Because if you're going to optionally require things to be correct then you have to add optional switches for ten other things.
 
@rdlowrey If you explain to me what that SAN thing is I might give feedback
 
SubjectAltName ... that's all I know about it heh
It's that thing that makes mydomain.com and www.mydomain.com work for https
 
@rdlowrey At least your mail about it to internals sounded like you went crazy
It sounded like you would have to specify multiple options holding "www.github.com" in order to use ssl
 
user895378
@NikiC nah, it's not like that ... (working on a brief explanation)
 
3:03 PM
@NikiC No it's the opposite of that really, allowing github.com to be the CN or in the SAN and passing either
 
ssl should work with enabled peer verification and a cert DB, but no more than that. Correct?
 
user895378
Basically SSL started with a 1:1 matching between a certificate and the name identified by that cert. Then we got wildcard certs so that you could support multiple names with the same cert like "github.com" as well as "subdomain.github.com." Then we added the SAN extension so you could do both "github.com" and "someothersite.com" with the same cert.
 
user895378
If the certificate presents a subjectAltName list then the spec says you have to check for a match in that list before checking for the standard common name (CN_match)
 
user895378
Currently PHP doesn't check for SAN matches at all.
 
user895378
This is technically a violation of the relevant spec.
 
3:06 PM
$ctx = stream_context_create(['ssl' => [
    'verify_peer' => TRUE,
    'cafile' => '/path/to/cacert.pem',
    'SAN_required' => TRUE, // default
    // No SAN_match, no CN_match
]]);

$uri = 'https://www.github.com/';
file_get_contents($uri, FALSE, $ctx);
^-- what will this do?
 
user895378
I'm killing "SAN_required" altogether ...
 
okay, assume it killed
will the above work as expected?
I'm mainly asking to make sure that any weird SAN and CN or whatever are just optional for whatever purposes and that a normal request will work
 
user895378
If the remote server uses a cert with a SAN list then the connection will fail in the above scenario.
 
@rdlowrey why?
 
user895378
Because that's what the spec says MUST happen.
 
3:08 PM
if I access github.com with the browser, it works
 
user895378
@NikiC because the browser is validating the SAN list.
 
user895378
PHP is not
 
what does validating mean?
 
@Fabien No. Although it's nice to have everything in one place - being reliant on an IDE for ssh is a step too far imo. You need to be able to run that without PHPstorm.
 
user895378
@NikiC All it means is that the client says, "I'm looking for github.com. I've verified that the remote peer is who they say they are (verify_peer) and I've verified that the SAN list in the peer's cert contains an entry for github.com."
 
3:10 PM
@rdlowrey okay, so why can't we do that?
without any additional context options?
 
^ I was starting to wonder this
 
@Danack Yes, ultimately I have switched back to mtputty. Same goes for file upload. If it's a singular, no problem, if it's a few files/directories I am back on filezilla.
 
Really the only change needs to be validate the sAN and change 'verify_peer' => TRUE, //default
 
user895378
@DaveRandom That's what my code does right now.
 
@rdlowrey then everything is okay
 
user895378
3:12 PM
Well I've been working in the framework of the existing system where these values are only checked if a context option exists to tell PHP it needs to check. It should be possible to automate the whole process based on the host name ...
 
so why do you need a strict mode then?
verify peer seems like the only necessary option
 
user895378
@NikiC I guess I don't really.
 
user895378
It's unfortunate that the "CN_name" isn't just "name" because we really don't need two separate options for "SAN_name" and "CN_name"
 
Can't you just alias and deprecate?
 
user895378
probably. We could add "peer_name" and use that for SAN and CN name matching and deprecate "CN_match"
 
3:16 PM
@rdlowrey So just to be absolutely sure I got what you mean by "That's what my code does right now.": I do not have to specify CN_match/SAN_match, PHP will automatically check this based on the requested host?
 
^ anything other than that would be ridiculous
 
@DaveRandom indeed :)
 
user895378
@NikiC No, right now it doesn't happen automatically for you -- you have to manually specify "SAN_name" (which I'll change to "peer_name"). It would be really nice to automate that process so that it "just works" if you don't know anything about anything but that could get messy.
 
user895378
I haven't really looked into what would be necessary to make it work automagically.
 
I can tell you for certain that it needs to work automagically for it to be accepted ;)
 
user895378
3:19 PM
@NikiC Currently it works in exactly the same way as the existing functionality.
 
@rdlowrey Yes, but currently nobody is verifying peers :D
If we enable peer verification by default it should also be somewhat usable ^^
right?
 
user895378
@NikiC That's why I basically said, "before I spend more time on this PHP needs to decide if it's going to pull it's head out of the ground on SSL issues and stop being horribly insecure."
 
@rdlowrey I think automatically checking this is worthwhile even if we don't have peer verification enabled by default ;)
 
Anonymous
@Jack php-fig.org/psr/2 doesn't have anything on indenting arrays
 
But it looks like enabling it is quite realistic, especially if we bundle a cert db
 
user895378
3:21 PM
@NikiC I agree -- it's just a much easier change to add the functionality without changing the status quo :)
 
@Simon_eQ A combination of 2.3 and 2.4 are the rules for arrays
 
@Simon_eQ because then they still would be arguing about it
 
user895378
In conclusion: new context option "peer_name" aliases the existing "CN_match" (which should be deprecated). "peer_name" is used to match against both SAN and CN fields of the peer's certificate. As long as "CN_match" still exists in php-src it will be interchangeable with "peer_name". This adds SAN checking (which is sorely needed) and has no BC breaks.
 
user895378
Whether or not "verify_peer" is enabled by default has no bearing on the above ^
 
Rao
I want to remove all the strings that start with 'The ' from the array, for this i have written <?php foreach($pubs as $p):
    $p = preg_replace('/^(The)\s/', '', $p);
  ?> but its not working, what is wrong?
 
3:28 PM
@rdlowrey ...where peer_name defaults to the hostname of the current request?
that's the final step in making it useful I think
 
user895378
@DaveRandom That's what I'd like to do, yes (but haven't looked into how yet). So that way we could enable secure-by-default and actually make it easier to be secure.
 
@Rao foreach($pubs as $k => $p) $pubs[$k] = ...
 
user895378
PHP would try its best to make everything work automatically and you'd have the option to tweak specific settings as needed if you're having trouble connecting securely.
 
@Rao Did you forget the /m? And /^The.*/m is the right expression.
 
Rao
@DaveRandom @Jack I just need the reg ex part for matching all 'The ' at the start of the string.
let me check
@Jack what's /m for ?
 
user895378
3:33 PM
I'll distill all this into a summary email to the list once I look into what's needed to make the relevant functions (file_get_contents, fsockopen, etc.) autoset the "peer_name" context for you ...
 
@Rao It means RTF/m
 
user895378
Another thing that needs improvement ... currently the wildcard name matching for "CN_match" is about as useless as it could possibly be ...
 
@Rao You forgot to pass $p as reference...
 
Rao
@Starsong @DaveRandom thanks.. will change that
 
3:37 PM
@Rao foreach($pubs as &$p) {
 
@rdlowrey I almost clicked that ...
 
user895378
haha it's not rickrolling I promise
 
I wish those links would have a tooltip that reveals the video title :)
 
Jitterbug!
 
@rdlowrey I actually don't see anything wrong with that?
 
Anonymous
3:44 PM
@PeeHaa Do you have anything in mind for a cool project? Like you last suggestion for sitemap generator? This time, I want to do it alone, because then orangepill did everything, and I lost interest.
 
user895378
> Names may contain the wildcard character * which is considered to match any single domain name component or component fragment. E.g., .a.com matches foo.a.com but not bar.foo.a.com. f.com matches foo.com but not bar.com.
 
As expected, my question is getting the attention of a turd and two doves ...
 
user895378
vs. how php actually does the wildcard matching
 
@Simon_eQ How about a simple project/job planner?
 
Can you have *.*.*.domain.com certs? =D
 
user895378
3:46 PM
hehe, not likely I don't know. I've only ever seen wildcard certs with a single leading *.domain.com
 
Or, better yet, **.domain.com
 
Anonymous
@Fabien E_TOO_DIFFICULT
 
@rdlowrey Yeh I was just reading that, it seems to satisfy *.a.com matches foo.a.com but not bar.foo.a.com (unless I'm reading it wrong), I don't understand the second example though, where is the wildcard in it?
 
It could be argued that you need a *.foo.domain.com and *.bar.domain.com cert then.
 
@Simon_eQ Break it down in to parts and it becomes fairly simple.
 
Rao
3:47 PM
<?php foreach($pubs as $p => $a):
$a = preg_replace('/^The.*/m', '', $p);
?> @Jack is this correct?
 
Are you sure that the strings are stored as the keys of your array?
 
user895378
@DaveRandom oh, I should've added backticks because in the quoted text markdown formatted away the * in the examples :)
 
Also, assigning to $a will not update the array, if that's what you're after.
 
user895378
@DaveRandom I quoted that from here: tools.ietf.org/html/rfc2818#section-3.1
 
Anonymous
@Fabien Have you made one?
 
3:49 PM
@rdlowrey I didn't even know you could have a wildcard that wasn't the first element of the name. That sounds dangerous. Personally I don't have a problem not checking for that, but I suppose the spec should be implemented to the letter.
 
@Simon_eQ Nope but it's on the list of prospective builds.
 
user895378
@DaveRandom well, I'm unlikely to bother with changing the wildcard matching unless I just having nothing better to do. Too much work right now.
 
Anonymous
@Fabien hehe, asking me to create something you haven't yet dared, will get you a flag next time :P
 
@Simon_eQ It's a lot simpler than you'd imagine. Plus you can use some fancy HTML5 with it.
@Simon_eQ How about a forum then?
 
Anonymous
@Fabien A forum sounds a delicious idea. But, it's unlikely anyone will be interested as there are many already.
 
3:53 PM
@Simon_eQ There's still value in building it.
 
Rao
@Jack Im getting an empty string after running the above code, What I want is to just remove 'The' from the start of the array, but its removing whole string which starts with 'The'
 
@Jack and what the hell you expected?
 
@tereško One human being :)
 
.. so cute of you
 
Anonymous
I finished a quiz script yesterday. One of those, where you are asked one question on every page, with radio-button and a submit one in it, and the questions change on each page refresh, and finally you get the result by email. The whole thing was so easy, fast === awesome codding experience. I may upload the whole thing on github, what do you think? @Fabien
 
3:55 PM
@Rao Oh, /^The(.*)/ and replace by '$1' then.
 
Anonymous
 
Anonymous
I am hooked to that site :)
 
@Simon_eQ Do it. Ask for feedback as you did with the seoWrapper. Feedback can suck but it's growing pains. :P
 

« first day (1070 days earlier)      last day (3893 days later) »