This question already has answers here:
Convert a PHP script into a stand-alone windows executable
(7 answers)
Closed 9 years ago.
I developed one project using YII framework. Now I want the project in single executable file.
Is it possible to create using yii or php libraries.
How to create .exe executable file for yii project.
And is it possible to convert project file to some format that if I install it any others
place that they can't read may be some encrypted format.
Short answer: Not possible.
Long answer: It depends.
You could install a web- and database server on his machine (or create an installer that does it) and run the application locally on his machine.
or
You keep the application on a server and just provide a launcher that opens his browser and points it to the URL of the application.
It might be a good idea to switch to SQLite instead of MySQL but depending on how your application is written it might require a lot of code and SQL Query changes.
PHP Desktop which allows you to create desktop apps in the same way as you build websites with php/html/js.
The convenient solution is not to convert the website to .exe. I think it will be better if you have portable server/php/mysql and make the website work from a usb or CD with autorun.
there are many good options for the same and you can find them at PHP Compilers
I have used PHPLanger for the same
Related
This question already has answers here:
How to install ffmpeg for PHP
(2 answers)
Closed 6 years ago.
I made a code in php that extracts mp3 audio track from a video file using the exec function to execute ffmpeg.
All works fine on a local server using WAMP on windows. But when deploying the script to the server, I can not run ffmpeg anymore because the server does not have the software.
Is there a class in pure PHP, or an API that is capable of the same or at least the basic ffmpeg functionality?
But when deploying the script to the server, I can not run ffmpeg anymore because the server does not have the software.
It's easy to get ffmpeg on your server:
Download a static build of ffmpeg for Linux, Windows, or OS X.
Point your script to it.
Encode.
See FFmpeg Wiki: PHP.
EDITED:
As any conversion is very CPU intensive, there is no pure PHP solution and in near future never will be.
For conversion you can use https://cloudconvert.com/ that provides rest api and asyncronous conversions.
First your question title mentions "videos", but the question body asks about MP3s, could you please clarify?
Second, just because the server does not have ffmpeg this does not mean you cannot install it. This probably should be the option to pursue - and if the host is that strict, it is unlikely you'd be able to install any other solution anyway.
PHP as a language does not have MP3 decoders, and while it is possible to write one, or even to find one already written, I would avoid it. Parsing multimedia formats is tricky, as recent Stagefright bug in Android proved, so you'd be better using a well-tested and supported frameworks such as GStreamer or FFMpeg.
Also if you need to convert only certain formats such as MP3, you can look at MP3 decoders such as lame.
I know that it is possible to compile php codes and use them. I also know that there is some techniques to use php compiled files in .NET.
I have made a project with Yii framework and I need to run a demo of my project some period of time before my customers decide to buy it or not.
I want to know if there is any way to compile a Yii based project to a single binary file and use it standalone or with Apache or IIS.
If there is no such a way, could I close Yii based project source code in a manner?
If you can compile a PHP script into some sort of a portable binary file, with Yii framework it shouldn't be any different, as the Yii framework is still a collection of PHP script files.
This question has already been answered here in Stackoverflow: Convert PHP file to binary
This question already has answers here:
How do you deploy a website to your webservers?
(7 answers)
Closed 8 years ago.
We have a small company and we have developed our own CMS in PHP/MySQL.
The code is stored in local files and in the database.
We'd like to be able to update the code of the CMS on our client's servers.
This process should be semi-automatic, once we 'publish' the update, the code gets replaced on the client's server and in the database.
I was thinking about using Bazaar in combination with Bazaar Upload. This would take care of the files.
But what about the database? Is there a standard method already available or should I upload a .sql file that gets installed when a user logs in to the CMS?
Thanks in advance for your suggestions!
For this sort of thing I'm considering liquibase, but it needs java to run so you either need java on the server or maybe on the machine from where you are triggering the deployment.
Use combination of SVN/SVN and Cron
use install package (.rpm,.sh,.deb, whatever) and setup cron job to run your update script
UML:
#!/bin/sh
fetch $version
if(version > current_version); do
cd /path/on/client/server
svn update
/path/on/client/server/update_script.sh
done;
where update_script.sh will take care about whatever you need (sql,cron,files,certificates, ...)
Second variant
You can use something like fake cron job
In Administration you can create "Autoupdate" feature, which can be triggered by button/link or by timer. Timer is activated by running autoupdate script after login to CMS Administration
Simple check time from last update check and perform download of files, running .sql scripts or whatever you need.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
PHP Source Control Server
Hello,
I know there is a SVN Extension for php before some one comments on that.
I'm asking for a php SVN Server as i would like to read how SVN's save the changes as i want to do the same ting but use mysql Database instead for my content allso i would like to see how it's formed when the latest Repo is downloaded so i could do with project.
I dont mind other scripting langs just no compiled application posting please
EDIT
Ok what im looking for is the method svn uses to detect and save changes.
And the method used to construct the end result file when downloading a repo
THIS is not for me to build on SVN its for me to build a System that replicates the 2 parts mentioned above
Awnser ----------------------------
http://pear.php.net/manual/en/package.text.text-diff.intro.renderers.php
If your interested in looking into the data format they use, do you know SVN has a Berkeley DB backend?
http://svnbook.red-bean.com/en/1.5/svn.reposadmin.create.html
svnadmin create --fs-type bdb /var/svn/repos
I have developed a PHP-MySQL web application, which is a school-based project.
My client wants this application to be converted into a .exe file such that it can be installed on his desktop and use it.
How the PHP website can be converted to a .exe file and can it be run without the need of a database/server software?
Please advice.
The convenient solution is not to convert the website to .exe. I think it will be better if you have portable server/php/mysql and make the website work from a usb or CD with autorun.
NuSphere's PhpDock claims to do this: It serves as a deployment helper and comes with a bundled web server. However, I don't know about the database part, and it's not free.
PhpDock enables you to deploy any PHP web application as a Stand Alone Windows Desktop application w/o any changes in the code.
I don't know that particular product, but I have been using their IDE for years and am quite happy.
try using a site-specific browser. it will make a desktop app that is basically a portal running to your webapp. try this one:
https://mozillalabs.com/prism/
It allows alot of advanced features like system tray icons and such. I have used it many times!
Hope this helps, JL
Short answer: Not possible.
Long answer: It depends.
You could install a web- and database server on his machine (or create an installer that does it) and run the application locally on his machine.
or
You keep the application on a server and just provide a launcher that opens his browser and points it to the URL of the application.
As Artefacto mentioned, it might be a good idea to switch to SQLite instead of MySQL but depending on how your application is written it might require a lot of code and SQL Query changes.
No. You have at least to remove the dependency on MySQL (and use e.g. sqlite instead).
Then, you would either have to:
Convert the webpages to windows dialogs. This would completely change your application (e.g. what would originally be http "form submissions" would be someting completely different). At this point, it'd much easier to write a .NET application
Bundle a web server (e.g. Apache) with PHP installed.
Another try would be to turn your php project into PHP-GTK (http://gtk.php.net/).
Yet another one is to give HPHP a try (https://github.com/facebook/hiphop-php/wiki/) and try to turn the generated C code into something like a .DLL in .NET and use it for the logic while coding the UI in say, C#.
Just create a simple program in C or C++ that will just add icon in Start menu, desktop and Quickstart. If your client clicks the icon it will open the default OS browser and point it to URI of your application online.
That might fool your client :)
Or maybe it will be enough for him (he might be asking you to convert it to exe because he can't remember URI or something - ask him what is the reason).
You can use xampp open-source project to pack your PHP site into an executable file.
Use the following steps:-
1. Download Xampp source code.
Add your PHP file inside htdocs directory(Ref:- https://sourceforge.net/p/xampp/code/HEAD/tree/win32/xampp/htdocs/).
Now compile the XAMPP source code and distribute it.
For DATABASE creation and initial data loading in the database, you can code your site in such way that if database is not created, it redirects the page to install.php which do the database creation and data loading task using sql file provided(you need to add SQL file containing database structure and required data).
Don't forget to delete the SQL file post installation of database.
Not sure that's gonna be possible but have a look at:
WinBinder
WinBinder is a new open source
extension for PHP, the script
programming language. It allows PHP
programmers to easily build native
Windows applications.
(source: winbinder.org)
Solution 1:
There are several solutions to convert your web application into a desktop application, the one I prefer is the open source solution: PhpDesktop, but unfortunately it only supports SQLite.
Best Solution:
To convert your PHP application with MySQL I know a paid solution that does this: 'ExeOutPut For Desktop', it is the best for this job
Php desktop is the way to go, it's actually very simple to modify to the version of PHP you want to use and is open source too https://github.com/cztomczak/phpdesktop