I have made a web application with php and mysql in wamp server. Now i want to convert it into desktop application for windows platform which will run offline as complete desktop application.
Please anybody help me. Because it so so important for my job place...
Thanks..
nightrain - https://github.com/kjellberg/nightrain
PHP Nightrain is a packager written in Python for the PHP Programming Language. Using this tool you can convert your PHP/HTML/CSS/Javascript application to a Native Desktop Application. Currently, PHP Nightrain supports the Windows, Mac (OS X) and the Linux operating systems.
PHP Desktop - https://github.com/cztomczak/phpdesktop
PHP desktop GUI framework with HTML5 Chrome/IE engine.
You can check out exeoutput for php. It's a paid application priced at one time fee of USD 99. They also have discounts for students and teachers.
It outputs the file in a single exe file format for Windows and the exe can be run as a standalone file without installation and portable in a USB too with complete web server, chrome browser packaged as an application.
You don't need to rewrite your existing html, php code and can use it as it is.
You can also connect to sqlite and mysql databases if your app is database dependent and place the database either outside the main exe or embedded inside it. The latest version is packaged with php 7.3 which you can upgrade if needed. All major php modules are included by default
Your complete PHP, HTML java script code is protected since it's inside of an exe which doesn't extract when running so no one can reverse engineer the code and redistribute your app. You can also set a splash screen png image, an expiration date so just in case some one redistributes it, it will become invalid and unusable after the expiration date. changing the system clock will not allow reuse of the expired app.
I have been using it for some time and that's the only solution i found which was polished enough for use.
I tried PHP Desktop before but the code is exposed in that case and end user can modify your code and redistribute it in PHP Desktop.
Note: I am not associated with exeoutput in any way but found the app so useful hence the lengthy answer.
Related
I wanted to convert my php application into desktop application to run it as an .exe file by just double clicking on it. For this I found many third party softwares like bamcompile,wapache,Php desktop chrome,etc. From these the most compatible and the one which fulfilled my requirements to accountable extent was php desktop chrome.The rest both had their drawbacks-
1.Bamcompile-It runs the application on commandline and does not show GUI,so I was not comfortable with that.
2.Wapache-It runs the application but it run it in Internet explorer browser so it cannot run the framework supported by my application.I need Google Chrome for that.
3.Php desktop chrome- This fulfills my requirement to a great extent but the problem is that it does not supports sql server database.I thought about using sql server as database because I don't want to install xampp/wamp on every machine where I want to use my application.I added the drivers needed for using sql server to php desktop/ext folder but I am not finding the php.ini in php desktop application where I can add extension to it.So it there any way that I would not have to install xampp/wamp or any other application on client machine to run my application.
Problem with converting the application into exe file is solved with php desktop. That means when I start only mysql from xampp my application runs perfectly fine ,there is no need to start apache for that.So now I want to do something that can include my database as well in the php desktop chrome folder and supporting application into it as well.So that I don't need to start phpmyadmin always.Or is it possible to install only phpmyadmin/MySQL without xampp and if yes how to configure that?Because I installed that individually but I don't know why is it showing Access denied.
Thanks in advance.
I have tried to provide as much details as possible ,in case you need to know anything else,please let me know. I have tried all possible way please help me out.
Your need is quite exotic. Try phpinfo() in your application - then you will find where your php.ini is served from. That might put you on track. Another thing to try, if your database is not too big, SqlLite database in your project, because it is bundled with php and does not require a separate server.
I'm developing a Qt desktop GUI.
I need to be able to run:
php myWonderfulScript.php parameter from the Qt app.
php is available on the command line on my development computer, however it's unlikely to be available on the user's computer. I also need php5-curl installed...
Can I reliably distribute php .so/.a/.dll files with my Qt desktop application so it will run on Mac/Windows/Linux? (I know there are big licensing issues that arise in this situation and I will be sure to not steal anyones work)
I'm using Qt Creator 3.1.2 (based on Qt 5.3.1)
I have built a website using php, jquery and mysql.it is running on the server now
Ive seen a Couple website to convert local php pages to exe files.
But i am looking for a program that will allow me to run my website inside the exe
Is it possible to run a website on A Server in an Exe.
I was thinking of using an hta but it isn't much compatible with Internet Explorer. It changes the look and position of element on the website.
The reason is because I don't want people viewing the source of my website and some other reasons.
NuSphere has a product that can do what you are looking for. It is called PhpDock. I have used it and it performs as advertised. It comes with a web server built into it, so all you have to do is distribute the .exe to the user and they will then be able to run your web application as a native application.
NuSphere PhpDock Product Page
I have my application written on PHP/MYSQL. We are looking at option for deployment at client site machine. What is the option and how to do it? Apart from that we are more concern about protecting our code. Hence, we're looking at the option that can make a binary application for our web application developed on php/mysql.
Apart from that is there any installer available that can extract and install php/apache/mysql stack ?
See this previous response to a similar question for a comprehensive list of the options available for compiling/wrapping PHP code as an executable for Windows
Other options available for non-Windows:
HPHP (Facebook's HipHop)
https://github.com/facebook/hiphop-php/wiki/
https://github.com/facebook/hiphop-php
HipHop for PHP is a source code transformer for PHP script code. HipHop programmatically transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.
HipHop was created by Facebook to save resources on its servers. It is being distributed with its over 300,000 lines of source code written in C++ and C as free software under the terms of version 3.01 of the PHP License.
Facebook has also developed HPHPi, which is an experimental interpreter designed for development with no need to compile the PHP source code before running it.
Roadsend and Roadsend Raven
http://www.roadsend.com/home/index.php
https://github.com/weyrick/roadsend-php/wiki
https://github.com/weyrick/roadsend-php
Roadsend PHP is an open source implementation of the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter. Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (!MicroServer), desktop GUI applications with PHP-GTK, and console applications. It is known to build on Linux, Windows (using mingw), Mac OSX, and FreeBSD.
Roadsend Compiler also contains facilities for interpreting, profiling and step debugging PHP code.
Roadsend PHP is a completely independent implementation of the PHP language and runtime environment, and is not based on the original implementation (using the Zend engine) which is separately and freely available at http://www.php.net. Zend PHP is not required, and is not used in any way, by Roadsend PHP.
Last change to the roadsend code was 17 months ago (a patch for Ubuntu 10.04 llvm package), prior to that was 21 months ago. Readme's have been updated in the last two weeks (at time of writing this) so perhaps it's about to be resurrected again.
Can build Linux executables
Phalanger
http://www.php-compiler.net/
http://wiki.php-compiler.net/Phalanger_Wiki
http://phalanger.codeplex.com/
Phalanger is a project which was started at Charles University in Prague and was supported by Microsoft. It compiles source code written in the PHP scripting language into CIL (Common Intermediate Language) byte-code. It handles the beginning of a compiling process which is completed by the JIT compiler component of the .NET Framework. It does not address native code generation nor optimization. Its purpose is to compile PHP scripts into .NET assemblies, logical units containing CIL code and meta-data.
phc
http://www.phpcompiler.org/
phc is an open source compiler for PHP with support for plugins. In addition, it can be used to pretty-print or obfuscate PHP code, as a framework for developing applications that process PHP scripts, or to convert PHP into XML and back, enabling processing of PHP scripts using XML tools.
phc for PHP programmers (See Manual):
Compile PHP source into an (optimized) executable (supports entire
PHP standard library).
Compile a web application into an (optimized)
extension (supports entire PHP standard library).
Obfuscate PHP code (--obfuscate flag - experimental). Combine
many php scripts into a single file (--include flag - experimental).
Last change to the phc code was on 18th December, so sill actively ongoing development.
Can build Linux executables
Can be used to build C code, with appropriate PHP "macros" for extensions
ROSE Compiler
http://rosecompiler.org/
Dependent on phc compiler for working with PHP
Look at PHP obfuscators, examples:
http://www.seocompany.ca/software/free-encryption-software.html
https://stackoverflow.com/questions/908678/is-there-any-good-php-obfuscator
Obfuscators aren't 100% but they are easy to implement and the output is pretty gnarly.
I am not sure about windows but on Linux you can try using Facebook's HipHop project, Of cource if you are not using eval() and other functions. Get more info and how to on Facebook Hiphop PHP - git
Any installer for "php/apache/mysql" stack? yes there is one EasyPHP, you can get the portable(extract and run) version too.
If you can do some R&D try using vmware ThinApp for windows platform. With VMware ThinApp, applications are packaged into single executables that run completely isolated from each other and the operating system
I'd like to develop a PHP application that users would download and then could run. The application will have a web service.
I assume they will need Apache, but my main question is what is needed for PHP to run on their machine? Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
Is anything else required that I did not mention?
Thank you,
They will need a web server with a compatible version of php. That's it.
Are you asking what is required to run a .php file on a windows machine? Do you mean like an executable or a web server script?
If like an executable need the php files:
Download the php installer from http://windows.php.net/download/, and then you can run php.exe script.php
If like a web site:
You need a webserver (like apache) and the php.exe files. I would suggest if testing to download a prebuilt webserver like XAMPP (download from http://www.apachefriends.org/en/xampp-windows.html)
It depends on the application. At a minimum it will need PHP.
Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
PHP. Presumably as difficult as it is for you, but it depends on the platform. OS X comes with it. Most Linux variants either come with it, or allow it to be installed with one command to the package manager. Windows users will have to download it seperately.
As for other things that might be needed…
If it has a GUI, it might need PHP-GTK.
If it expects to be accessed via HTTP then they will need a webserver which supports PHP. This could be Apache, IIS, or one of numerous other servers.
(It isn't clear if, when you say "The application will have a web service.", you mean "The application will access a web service" or "The application will provide a web service". If the latter, then a web server will be needed).
If you use any non-core modules, then they will be needed as well.
You need to describe your proposed application a bit better. Is there a reason the application must be in PHP? It may be possible, but it's certainly not common to code and distribute a desktop application written in PHP.
There are a few options.
If you are just writing a script (command line, etc) you don't need a webserver. You just need PHP installed to run it (there are even downloadable installers for it).
If you are writing a web-based tool, then you will need your users to have a webserver if they are meant to run it on their physical machines. And you don't need a framework...
just think of it as a Webserver + PHP as a plugin. Some webserver options: Apache, nginx, lighttpd
Try having users install WAMP, MAMP, or Zend Server CE all of which are free and come with both a webserver and PHP.
If you really want a deployable PHP script/tool, maybe look into something like PHPDock, which gives your users a single installable app (embedded server, php). NuSphere PHPDock
Honestly, it's not the greatest language to use for this type of deployment, but it's certainly fun to try to figure out! Sorry for not linking out also, don't have enough rep points for all of the links I had intended to supply.
Actually you can run php script without the need to have a webserver installed.
Just install php and then from command line:
$ php myscript.php
If you really want you can even build GUI application with php even though I would not suggest it.
Cheers Andrea
you could also try to use quercus.
Quercus is Caucho Technology's fast,
open-source, 100% Java implementation
of the PHP language (requires JDK
1.5).
This way you only will need a jvm+quercus. It also is platform independent this way because it runs in the JVM.