I saw this priadoblender.com thing that claims to compile your PHPinterpreter dependent scripts into a standalone application where you wont need a server and interpreter running..

I think it's such a great idea!!!! I've got PHP applications deployed to my clients, and well, the thing is, i had to install apache, php and mysql all together with it.. With something like priadoblender, all i have to worry about is mysql..

So now my problem is, this is the first time i've heard of such a thing for PHp, and i was wondering if there is something better than priadoblender.com ... coz, the priadBlender project doesnt seem to be commercially dependable.. and the last release was 2003-09-28.. which prolly means the project has been abandoned..

any advise? I'd like to make my php standalone!!!! I hope smething nice is out there!

Tea

    Nope. im checking it now..

    what is it btw? ( in your own words)

    Tea

      It's probably the most popular standalone-type PHP handler out there. It just allows you to write client-side, standalone apps with the help of GTK.

        Hi

        Thanks for the input..

        First of all, it's rather confusing.. i dont even know what the site is talking about... Copying files to different directories and stuff.. adding lines??

        could you please give me a summary of what it is? How will it look like when deployed? is it in *.exe form?

        I really thought it was simple like it simply compiles a script into an executable file, and i call/send variables to it from my application...

        You see, i develop Flash Based GIU's for my applications and I use php as the brain.. mysql for memory.. apache, to make all these happen.. now with this priadblender, or GTK, or whatever, i was hoping ill just compile my script, say, random.php, and it would work like normal php, only, there's no interpreter installed..

        Am i even close???

        Tea

          PHP's an interpreted language. AFAIK, there's nothing out there to completely compile PHP applications. You will always need PHP installed. With php-gtk, it uses the php libraries to interpret the language fro mregular php files, and GTK to make client side GUIs. It just passes the interpreted code to the GTK window.

            How come priad blender claims it's almost like a compiled executable?

            PriadoBlender takes your PHP code and the PHP interpretor itself and blends them into standalone, PHP executable goodness.

            btw, thanks for your help so far! very quick replies too. awsome..
            tea

              Color me clueless 😕
              I couldn't comment on it though. I've never used priadoblender (or heard of until now for that matter), so I couldn't say one way or another how well it works. It looks like the downfall to this is that it has to compile the php interpreter into every exe you make. Plus it's not cross-OS compatible (yes, I'm a Linux guy). But I'll play around with it tonight, and see what I come up with. Get back to ya...

                all it does is stick in php.exe along with the .php file and runs one against the other :rolleyes: so, whatever the exe is, it will be ~4 meg (or whatever php.exe is) bigger than it should be.

                  @
                  thanks so much man... i really appreciate what you're doing for me.. 🙂

                  @
                  hmm.... you mean, every PHP file i have will be 4mb?

                  Well, that would suck if i had multple php files... but maybe when one makes use of the blender, one should write everything in one script.. i doubt that the includes would need to be compiled. ..

                  hmmm.. so you mean, it's the php.exe that's interpreting the script??? If so, is there a way to put your php file into one folder along with that php.exe and somehow make things work???

                  Im sorry if this sounds stoopid, im just clueless at how the whole php engine is ran.. if it's just that php.exe doing all the work, then that's cool.

                  Tea

                    Moonglobe's right, and it's stated on the website

                    PHPBlender isn't a true compiler in the computer science sense of the term. True compilers
                    take the high-level code and turn it into machine/assembly code.

                    Instead, PHPBlender takes your PHP code and the PHP interpretor itself and blends them into
                    standalone, PHP executable goodness.

                    As it goes, I just tested it out, and it's really nothing special. If you do a basic echo, all it will do is open up a command window, display the echo, then close the window. To make a true GUI to it, you'll need to use this in conjuction with php-gtk.

                    BTW...the exe I made was only 16Kb :p

                      @

                      God man, dont you ever sleep?!! heheheh..

                      well, thanks for the input, but, I'm not worried about the PHP-GUI and stuff.. you see, my case is a bit different... I dont need a gui, since, I MAKE MY OWN GUI.. So i dont think GTK was the one im looking for.

                      Here's my thing..Example.

                      I have a Flash Projecter (myapp.exe)... it has an input field with the variable name, and a button that does a POST method to a php file..

                      Then i have a php file that saves the name to a database and echo's back :
                      echo "&result=ok&";

                      Basically, you enter your name in the Flash GUI, hit the button and Flash waits for the response of the php file...

                      Now, normally, I'd have an apache server with php installed just for the above to work...and my Flash GUI would send to:

                      loadVariables("http://localhost/scripts/record.php",this,"POST");

                      So i was hoping that there's something out there that would make my life easier by not requring a whole server and php installation for every Flash Program i deploy.

                      I hope im clear somehow

                      tea

                      PS
                      I dont think GTK is meant for the above huh? this GTK thing is a GUI in itself- as i understood it..

                        Ok, then in your case, this blander may be just what you need. It just takes a regular php script that you made, and compiles an exe along with the php.exe/ini files it needs. You should be able to pass any variables you need to it. My only real suggestion would be to try it out. See what you can get going 🙂

                        And yeah, I sleep. Sometimes. 😃

                          @

                          Yeah, i initially planned to test it out myself.. however, since i just heard about it the first time, i was hoping people here could tell me there are better things i dont know of yet.. But i guess that isnt the case.. will try this now.. ill letcha know what turns up.. thanks dude!!!

                          PS
                          lolz on your sleeping habits. 🙂

                          Tea

                            hate to bother you again LordShryku but, it seems that this blender thing really does make the script call the php interpreter and stuff..

                            what i wana know now is, since the blender bundles with:

                            php4ts.dll
                            mmcache.dll
                            blender.ini

                            would it be possible to use the updated versions of the above files? like take the dll's from the new php5 (since blender works only with PHP4.3 and below...

                            And regards to the blender ini, it seems to be just the original php.ini with a new name..

                            whatcha tink bud?

                            Tea

                              blender.ini looks like nothing more than a changed version of php.ini, so make sure to change that as well. I'm going to play with this a bit more tomorrow. I want to see how much actual client control I can build into it...

                                cool.. it'd be great if we could upgrade the versions by simply replacing these files. thanks yo..

                                tea

                                  I've used PriadoBlender. You guys are right that it just bundles the php.exe with your script. As far as I can tell, It uses the Turck-MMcache encoder to do this, which means the mmcache.dll needs to be distributed with the .exe.

                                  There used to be a similar project to Priado, but it got discontinued. There is also Alan Knowles work, but that is certainly not easy to use. Priado is still active, and is supposed to have a new release soon.

                                  and yes, you can create a PHP-GTK application with priado. Here's one you can download and tryout, which I created for my brother's work:
                                  http://www.josheli.com/john/airparts.zip
                                  This particular app uses embedded sqlite for a database. Priado does not work with PHP5 (which has Sqlite by default), so i had to include the php_sqlite.dll.

                                  Also, to use PHP-GTK, you need to include all the libraries and .dll files that it requires.

                                  So my simple application directory ended up at around 9.5 mb total.

                                  What i did, was to develop normally with includes and requires and the like, then wrote a "pre-processor" script to "compile" my .php scripts into one big .php script, which was then "compiled" with priadoblender. All the pre-processor did was scan files for includes, and when it found them, include that code where the "include" is. It also removed comments/whitespace and tried to search and remove unused functions.
                                  There are several scripts already out there that will do this. Here's one:
                                  http://alex.kazik.de/twister.html

                                  The priado website is a bit misleading when it says the .exe is "standalone", because it requires some supporting .dlls and of course the .ini file.

                                  Another drawback is that if I distribute 5 Priado/PHP-GTK "executable" applications, then users will have 5 of everything (mmcache.dll, *gtk.dll, php_sqlite.dll, etc.), unless you can figure out a way to test the users PC for already installed libraries and use those.

                                  oh, one other thing... i've also combined priado with Nanoweb, a pure PHP standalone webserver to create "distributed desktop web applications".

                                  hth.

                                    i also forgot to mention that PHP-GTK required different files on different Windows OSes. XP didn't require some .dlls, while 2000 did require them, and vice versa. At least that was my experience. Also, iconv.dll seemed to be necessary/unnecessary depending on OS.
                                    I just had to play around with it and get bug reports from my brother 🙂.

                                      statrat

                                      wonderful info dude. thanks a lot...

                                      as for me, i wont be needing php-gtk coz i do my GUI in Flash.. i've been doing so for a while now.. my only hindrance is, the "bundling" of apache server and php with my app.. (is that even legal?)

                                      I was hoping for something like priado so that i my Flash Based applications will be more independent from the typical webserver setup..

                                      Also, i just figured out (and you've said it in a way) that priado compiled scripts can not work includes() properly, so that means, everything must be in one script..

                                      Now, another thing is, i though sending variables to the exe will be the same as sending to php (GET or POST) ... but it turned out to be different. i was told there's a way to send variables via command line style.. (is it hard??)

                                      Another thing is, most of my apps are networkable, and sometimes they open internet explorer windows specially for printing reports.. soooo.. bottom line is, i dont thin priado can work for me.. i guess i really need a webserver style setup.... plus, that's where im really familiar with....

                                      so, here goes another post........

                                      🙂

                                      thanks for all your help!!!!

                                      Tea