1. Herve5's Avatar
    Being a newbie here and not having the PB yet, I understand the machine can "serve" html pages: one can load a site on it and then view it "locally" through the web browser (is this true? easy?)

    But I have one more question. Apart from static sites, many functionalities now can be greatly improved via php scripts.
    Thus my question: is there a native PHP capacity on the PB?
    Or can one "install" such a package somehow?

    I feel if this is true, a very large range of application becomes available in the form of "just local web apps"... I for one have solutions for almost all my needs concerning document writing, calendars, wikis... in the form of PHP-driven local sites.
    (indeed, an additional support for MySQL would help in some cases)

    Thank you!

    H.
    06-20-11 07:13 AM
  2. nike.stars's Avatar
    currently no, i've tried php loaded as a file and it failed. html files works just fine though.

    as for javascripts it worked partially, not all function would work well

    if there is a full web server inside the playbook, could you imagine security risk it possessed?
    06-20-11 07:18 AM
  3. Herve5's Avatar
    Thank you for this NikeStars!
    As concerns the webserver, I insist all we need is a local server, not serving to the outside (so no security risk) -moreover we could serve from a specific folder only for instance. FWIW, this is something that was implemented straight on Apple's ipod touch in the weeks after the first model started to sell, years ago...
    06-20-11 08:48 AM
  4. fruitloaf's Avatar
    There is a WebKit development environment that allows you to create HTML + Javascript + MySQLlite apps already out there. There's no PHP support though, I'd be shocked if there was one available on iOS too (at least without rooting your device) as Apple is extremely strict about letting code from anything but the Apple app store on the device.
    06-20-11 10:10 AM
  5. cas118's Avatar
    Potentially, the NDK would allow you to compile PHP and use this to create a PHP app - but I doubt that this would be trivial.
    06-20-11 11:51 AM
  6. Shao128's Avatar
    if there is a full web server inside the playbook, could you imagine security risk it possessed?
    Actually... PlayBook does run a webserver It runs bozohttpd.
    06-20-11 12:02 PM
  7. fruitloaf's Avatar
    if there is a full web server inside the playbook, could you imagine security risk it possessed?
    Nope tell me about it. What is the risk vs visting external websites?
    06-20-11 12:04 PM
  8. nike.stars's Avatar
    Nope tell me about it. What is the risk vs visting external websites?
    I'm no expert in php programming, just had a usual day-to-day php server monitoring.

    based on my experience, php execution can be quite disastrous on a server, in this case on playbook localhost, let's say a malicious php file gain an access to the root of localhost webserver, based on my experience (again), if a php file have successfully gain access to webserver root level, then anything can happen like deleting all files & and folders in the localhost machine.

    CMIIW
    06-20-11 12:20 PM
  9. fruitloaf's Avatar
    I wasn't meaning with PHP but what allowing that would do is essentially put the PB on the same security footing as Android in that it would allow unsigned code to run. If a malicious program found a way to break out of the security sandbox then it could potentially get root privileges (depending on the flaw) and then do anything it liked.

    There are a good few ifs in there and it certainly would reduce the security of the PB.
    JAKrzysztow likes this.
    06-20-11 01:58 PM
  10. FTWrath's Avatar
    Hey Herve
    The Playbook does indeed support PHP
    Click the link in my sig. It's a PHP powered Youtube Download for the Playbook.
    Also, me and Keeper have gone one step further by developing it into a PHP application and it runs perfectly fine (you have to side load it).
    So yes, php scripts run fine, you just have to package them as .bar
    One last thing, which is most important. If it requires a wifi connection to run you do have to host the script on a server.
    Shoot me a p/m if you want to discuss it some more or develop some of your scripts into applications.
    Herve5 likes this.
    06-20-11 02:23 PM
  11. mjs416's Avatar
    If anyone cares - php is a server side script that is executed by the server, creates the html and interpreted by the browser (roughly). Thats why if you check the source code of a php page in your brower - the code is all html. The only time you should actually see php is if the server fails to execute - which will give you gibberish.

    Javascript, to the contrary, is client side and needs to be executed by the browser.

    And its not the php that results in hacking but usually bad security parameters on the MySQL databases (which usually run along with php).
    pcguy514 likes this.
    06-20-11 02:37 PM
  12. Shao128's Avatar
    Hey Herve
    The Playbook does indeed support PHP
    Click the link in my sig. It's a PHP powered Youtube Download for the Playbook.
    Also, me and Keeper have gone one step further by developing it into a PHP application and it runs perfectly fine (you have to side load it).
    So yes, php scripts run fine, you just have to package them as .bar
    One last thing, which is most important. If it requires a wifi connection to run you do have to host the script on a server.
    Shoot me a p/m if you want to discuss it some more or develop some of your scripts into applications.
    Youre talking client side, PHP is server side, they are talking about running PHP on the PB.
    06-20-11 03:56 PM
  13. FTWrath's Avatar
    It is hosted on a server, the app itself simply runs it.
    Which is why i told him he needs a wifi connection to power his php "apps" not scripts as to my knowledge the PB can't run php scripts offline.
    All he has to do is package it in a .bar file and point it to his server and he's set.
    Thats all me and keeper did.
    06-20-11 04:18 PM
  14. s219's Avatar
    The PlayBook opens local HTML files via file:// URLs. That is not the same as being a web server. PHP is a server side scripting language that runs on the server. Clients connecting to PHP scripts receive HTML back and never actually parse or run the PHP script.
    06-20-11 04:40 PM
  15. Herve5's Avatar
    I'd like to thank everybody for this very interesting discussion, specially as I'm quite illiterate (the best I am used to do is recuperating open-source scripts and installing them on servers )

    Indeed I was considering runing a PHP server straight inside the PB, like I did long ago on my fossil iPod touch. Once this works plenty of already existing applications become available, you just have to install their script folder somewhere. I remember having carefully selected a very nifty wiki on the iPod that brought lots of things that were missing at the time, like search capability etc.

    I wish to turn the PB into a PHP server.
    Presumably the underlying linux behind can do this, but I'd like not going too far in terminal work, simply because I know I'll hit my limits pretty soon there...

    Herv
    P. S. I have no security concern as my use for the server is just on the machine, not outside: the PB will just not be a server to the outside, it'll just serve pages to my browser --sorry for the ambiguity
    MedChemist likes this.
    06-21-11 04:35 AM
  16. RobertJay's Avatar
    Actually... PlayBook does run a webserver It runs bozohttpd.
    Thank you for this valuable information. Can you say more about this feature?
    Is there a way to run and use bozohttpd on the Playbook?
    How is it done in practical steps?
    My main purpose for having a local web server on the Playbook is to run offline local flash sites as demos for my customers.
    For the moment, I'm facing some annoying limitations as my sites rely on flash ExternalInterface which cannot be run locally unless a local web server is set on the local machine.
    Thank you very much for your help!
    07-21-11 10:10 AM
  17. TheMarco's Avatar
    Hmmm running PHP locally would be ok I guess but having Node.js would rock way more. On WebOS you can write system services in pure javascript using Node.js. The OS comes with it! It's absolutely awesome. I'd love to see this on the PlayBook as well.
    07-21-11 11:11 AM
  18. chaosdivine's Avatar
    Anyone tried to get an Android apk and convert it to bar and sideload? I want to try BitWebServer since it has PHP, MySQL and PHPMyAdmin too. No root privileges needed and only Android 2.3.3.

    https://play.google.com/store/apps/d...erverweb&hl=en
    05-30-13 10:03 PM
  19. KermEd's Avatar
    I'd you really need this and have funding - PM me.

    I have a development team that can compile a wamp engine to pb/bb10 for you to use. But it would take serious effort and testing so it probably wouldn't be financially worth it over just using JS.

    Re apk: http://apk2bar.unker.net/

    Posted via CB10
    05-30-13 10:17 PM
  20. chaosdivine's Avatar
    I don't personally have the funding to offer this project but perhaps you'd consider a Kickstarter project? I mean, for me, my tablet isn't the ideal coding resource as I use my laptop 95% of the time, but when I'm out in the field and need to fix something pdq, then this app would kickbutt.

    There isn't anything in BB World that can do it all...they're all half baked implementations.

    I did convert the Bit Web Server APK to BAR and it did install via DDPB and it ran even. But I don't have a license since I can't buy the app via Google World so I'm SOL. Too bad too, I'd easily spend the $2 if it worked...and it seems to, I mean I can get into the settings and the whole bit but can't serve up any web pages without a license. I might contact the vendor and see if I can get one. Would be worth the gamble...

    I'd you really need this and have funding - PM me.

    I have a development team that can compile a wamp engine to pb/bb10 for you to use. But it would take serious effort and testing so it probably wouldn't be financially worth it over just using JS.

    Re apk: PlayBook .apk to .bar converter

    Posted via CB10
    Last edited by chaosdivine; 05-31-13 at 12:23 AM.
    05-30-13 11:13 PM
  21. KermEd's Avatar
    I don't personally have the funding to offer this project but perhaps you'd consider a Kickstarter project?
    It'd a good idea.

    It's tough because we have a lot of active projects + contracts for apps for organizations at the moment. So taking them off anything means less income.

    But i wonder if moving a EasyPHP source code into github might encourage some community folks.

    Posted via CB10
    05-31-13 10:33 AM
  22. chaosdivine's Avatar
    I understand time constraints and priorities. To be honest, I just appreciate you replying and discussing it - I mean that's progress in my opinion. You know, releasing something to the open source community would be a very noble thing to do. As of this point anyhow, no one has done that with regards to getting a web server stack running on the PlayBook to my knowledge. If used properly, this type of thing could be used to generate positive publicity for your company/organization.

    Or, you could use this as a way to generate income for your company. I mean, it's not like it has to come out tomorrow or anything like that. As is stands, there is nothing out there that works properly so it's a prime opportunity for someone with some coding skills. I do not have those myself with regards to the PlayBook or else I'd be interested myself in doing it. It's over my head...

    Anyhow, I appreciate the reply! Think about it and consider a Kickstarter perhaps...I'd contribute anyhow.
    05-31-13 12:27 PM
  23. KermEd's Avatar
    Probably the best approach would be for us to take a LAMP approach...

    http://en.m.wikipedia.org/wiki/LAMP_(software_bundle)

    We have the L (in this case QNX will have to do).

    We have a Web server + SQL. However the challenge is integrating php.

    So I see two attempts at this.

    LAMP using QNX + webkit + php server.
    LAMP using QNX + custom we server + php server.

    Posted via CB10
    05-31-13 02:08 PM
LINK TO POST COPIED TO CLIPBOARD