These are chat archives for baconface/php-webkit

3rd
Apr 2015
Brad Metcalf
@baconface
Apr 03 2015 00:04
Solution
binExists(bin, function(filename){ 
    bin = filename;
});

function binExists(file, callback){
    fs.stat(bin, function(err, stats) { 
        if(!err && stats.isFile()) { 
            return stats.filename;
        } else {
            return 'php-cgi';
        }
    });
}
Austin Turnage
@wookiecooking
Apr 03 2015 00:07
:+1: I figured that would be best solution, maybe
there isnt much options either way
Brad Metcalf
@baconface
Apr 03 2015 00:11
Gonna sync and submit a pull request
Ah, damn shame. Can't PR my own repo apparently? Well, guess I will have to merge.
Austin Turnage
@wookiecooking
Apr 03 2015 00:14
I was thinking maybe we should just make a org
this way we can have multiple repos
Brad Metcalf
@baconface
Apr 03 2015 00:15
Yeah, and I can do PR so I can have code reviews done to my code by you or someone else.
Austin Turnage
@wookiecooking
Apr 03 2015 00:15
exactly
Brad Metcalf
@baconface
Apr 03 2015 00:17
Well, code pushed. Time to drive home. Ol lady kinda not happy I spent a little more time at my office tonight. Haha.
Austin Turnage
@wookiecooking
Apr 03 2015 00:18
i hate you chat >.>
I have a similar issue
Brad Metcalf
@baconface
Apr 03 2015 01:14
So I realized my earlier commits had a typo in the email. If I do this would it do any damage to the repo? https://help.github.com/articles/changing-author-info/ If there is a risk I am not gonna bother. No biggy, just would be nice to have the correction.
Austin Turnage
@wookiecooking
Apr 03 2015 01:18
I dont think theres any damage in doing that, looks like youre just going to regex to replace the email of the commits based on the old email
plus
ill just clone it again
ive done similar things to manipulate my history to do dumb things like this, https://github.com/gelstudios/gitfiti
Brad Metcalf
@baconface
Apr 03 2015 01:47
Ha
Brad Metcalf
@baconface
Apr 03 2015 02:03
Looks like that worked.
I just never like messing with the actual git config and such.
Austin Turnage
@wookiecooking
Apr 03 2015 02:04
i hear you
things can go bad, quick
Brad Metcalf
@baconface
Apr 03 2015 02:05
Time to get back on sessions and cookies
I think I am over thinking it. So I slept on it.
Brad Metcalf
@baconface
Apr 03 2015 04:05
You are gonna think I am crazy but I restructured the main.js tonight.
Needed to be done.
Austin Turnage
@wookiecooking
Apr 03 2015 04:06
pushed?
what are your feelings about ecmascrip6?
Brad Metcalf
@baconface
Apr 03 2015 04:10
Gonna push it in about 15 min, still testing.
Brad Metcalf
@baconface
Apr 03 2015 04:45
New version pushed
Austin Turnage
@wookiecooking
Apr 03 2015 04:55
cool ill pull shortly
Brad Metcalf
@baconface
Apr 03 2015 04:56
Ok, I accidently goofed up my email again in request
Fixed it with another history rebuild. Last time I promise. Haha
Brad Metcalf
@baconface
Apr 03 2015 05:01
Now I can get back to sessions and cookies.
Repushing the repo, didn't realize it was reverted. Getting real sick of Github for Windows.
So you might want to pull it again.
Brad Metcalf
@baconface
Apr 03 2015 05:27
Sessions are working
Brad Metcalf
@baconface
Apr 03 2015 05:46
For some reason php-webkit switches from 127.0.0.1 to localhost occasionally. So cookies and sessions worked. But due to this bug cross domain restrictions won't let them talk to one anothers sessions/cookies
At least I can kinda stop pulling out my hair
Brad Metcalf
@baconface
Apr 03 2015 06:19
Gonna do a little more testing and upload the fixed version
Austin Turnage
@wookiecooking
Apr 03 2015 06:20
I think ive dealt with cross domain issues before in nw with another project
is it php doing it or nw?
Brad Metcalf
@baconface
Apr 03 2015 06:21
Fixed version makes the host localhost. 127.0.0.1 no longer used. But it will show up if you request the local address.
Austin Turnage
@wookiecooking
Apr 03 2015 06:21
cool
Brad Metcalf
@baconface
Apr 03 2015 06:22
This way it is more compatible with WP, Joomla, etc. And you can also change the host if you wanted to, a custom dns name if that was your bag.
But basically just a big mix up with the ENV and host name being the IP.
So everything was working right, I just misconfigured php-webkit.
Brad Metcalf
@baconface
Apr 03 2015 06:27
Can't log into wordpress still, but at least it doesn't tell me cookies are not supported.
Wrong password it alerts me but using the right one does nothing.
So I imagine I am missing an ENV wordpress relies on.
I suspect it is number 7.
I don't even like wordpress. I just feel like it needs to work in it. Haha
Brad Metcalf
@baconface
Apr 03 2015 06:34
Site front end shows me as logged in. WTF WP
Brad Metcalf
@baconface
Apr 03 2015 06:39
Pushed new version. Off to bed.
Brad Metcalf
@baconface
Apr 03 2015 16:15
Reading up on node.js cluster. I think it might make a big difference and fix issues we have or will have. Especially if we have a case like WP that wants to run multiple PHP instances at a time. - https://nodejs.org/api/cluster.html
Brad Metcalf
@baconface
Apr 03 2015 16:34
For example, I make an ajax request do a get and post at the same time or just any multiple requests vanilla express.js fails to deliver. This should integrate with with express.js and resolve that issue if what I am reading is true.
Otherwise we would have to look into packaging a webserver like mongoose to achieve functionality for more complex PHP projects. Something I would like to avoid.
Brad Metcalf
@baconface
Apr 03 2015 16:40
And according to this it could help overall performance even with a basic implementation. - http://rowanmanning.com/posts/node-cluster-and-express/
Brad Metcalf
@baconface
Apr 03 2015 16:59
But I guess a limitation would be if you were running on a single core machine you would still suffer this issue.
Brad Metcalf
@baconface
Apr 03 2015 21:33
Got my raspberry pi today. Woot.