These are chat archives for baconface/php-webkit

1st
Apr 2015
Austin Turnage
@wookiecooking
Apr 01 2015 00:33
awesome
Brad Metcalf
@baconface
Apr 01 2015 01:00
Glad you like. Might help out a bit.
Brad Metcalf
@baconface
Apr 01 2015 02:02
Been trying to find a work around for cookie support for PHP in nw.js
Austin Turnage
@wookiecooking
Apr 01 2015 02:02
might beable to pass them from express to php
thats a interesting concept though
Brad Metcalf
@baconface
Apr 01 2015 02:03
Yeah, I was playing with different ways to get that working via express
Haha, unfortunately getting PHP to run in NW.js was the easy part. Just getting it all to play well is the fun part.
Austin Turnage
@wookiecooking
Apr 01 2015 02:06
were you using the module for express for cookies?
im digging back at source now
Brad Metcalf
@baconface
Apr 01 2015 02:08
I imagine cookies are half the battle. We will likely have to get session handling to work itself. And I am wondering if https://github.com/expressjs/session will cover that part
Austin Turnage
@wookiecooking
Apr 01 2015 02:09
im pretty sure we could make a middleware that would pass session and cookie
in bridge, wouldnt we beable to set env['cookies']?
Brad Metcalf
@baconface
Apr 01 2015 02:17
So far all I have seen is things implying you know the session id like this http://stackoverflow.com/questions/23795926/share-sessions-between-php-and-node The kicker is I want to be able to handle any id set by PHP.
Austin Turnage
@wookiecooking
Apr 01 2015 02:19
Im pretty sure we could map, I was looking at the native http support
im pretty sure we would have to compile though
last night I started looking at native options, where we could maybe swap the nodejs out of nw.js and drop in php, but there would be alot of rewriting to apis
Brad Metcalf
@baconface
Apr 01 2015 02:23
I figured, it would be cool though to write PHP apps within NW.js like you would with node/io.js
Last night I played around with changing some of the code to try and make it more fast-cgi friendly. Doing so you could basically make the middle ware work with any fast-cgi language like PHP, Python, Ruby, etc.
Austin Turnage
@wookiecooking
Apr 01 2015 02:25
thats a interesting concept
but I think one problem would still be session, cookies
native libraries wouldnt work
Brad Metcalf
@baconface
Apr 01 2015 02:26
TideSDK did a similar approach and it was basically a local webserver with a fast-cgi processor that packaged the binaries for the languages. So it wasn't too far fetched of a concept
But yes, you would still run into the issue with session and cookies.
However, I am also trying to figure out if it is a NW.js issue.
Austin Turnage
@wookiecooking
Apr 01 2015 02:28
virtualmachines would be pimp
but yes, i think maybe we make a middleware for most common ones, like session, cookies, etc, and link them to a friendly api
Brad Metcalf
@baconface
Apr 01 2015 02:40
I should really get around to buying sublime text. I think about that after every 30 or so saves.
Brad Metcalf
@baconface
Apr 01 2015 02:52
Yup, sounds like the way to go
session_start();
setcookie("foo", "bar", time()+3600);
if(isset($_COOKIE["foo"] && $_COOKIE["foo"] != "") {
    echo "set";
} else {
    echo "not set";

}
Currently returns a 500 error in php-webkit.
Austin Turnage
@wookiecooking
Apr 01 2015 02:54
This message was deleted
Brad Metcalf
@baconface
Apr 01 2015 02:54
That is my PHP test script
Oops see my error
session_start();
setcookie("foo", "bar", time()+3600);
if(isset($_COOKIE["foo"]) && $_COOKIE["foo"] != "") {
    echo "set";
} else {
    echo "not set";

}
Austin Turnage
@wookiecooking
Apr 01 2015 02:55
thats awesome
Brad Metcalf
@baconface
Apr 01 2015 02:56
Looks like that script leaves php-webkit hanging
Austin Turnage
@wookiecooking
Apr 01 2015 03:00
are you running with devtools?
Brad Metcalf
@baconface
Apr 01 2015 03:16
Gotta fix my personal web host account real quick. Apparently I am 5312MB / 5000MB (106%) for diskspace.
But according to cPanel I am 5.11 GB / 14.65 GB.
Brad Metcalf
@baconface
Apr 01 2015 03:26
I guess that happens when you let some friends automate and push builds to your webserver.
Brad Metcalf
@baconface
Apr 01 2015 04:20
Just finished better error handling and added random ports
Austin Turnage
@wookiecooking
Apr 01 2015 18:57
@baconface I asked @balzohrd to help with the mac stuff, Im gonna assist him on saturday to see if we can get it running on osx
Brad Metcalf
@baconface
Apr 01 2015 20:26
Awesome.
Welcome aboard @balzohrd
You see my issue opened up for the tests? I was wondering what your thoughts where on a work around for cross platform tests since Windows will not recognize the . prefix to a directory.
Brad Metcalf
@baconface
Apr 01 2015 20:32
it requires a $PATH shell before the directory to work like node or gulp.
Stupid Windows.
Austin Turnage
@wookiecooking
Apr 01 2015 20:36
ahhh ok
yeah sorry about that, always forget windows is funny like that
when I get done with workwork I'll submit a pr for that
Brad Metcalf
@baconface
Apr 01 2015 20:38
Cool, I was just wanting to consult before I did a PR for it. Feel free to put one in, I am at work right now.
Austin Turnage
@wookiecooking
Apr 01 2015 20:38
same
Brad Metcalf
@baconface
Apr 01 2015 23:47
Also. I am getting my RaspPI 2B in Monday. Gonna test php-webkit with the ARM builds of NW.js when it comes in.