i have developed in-house software for hotel management system using PHP/MYSQL. Our Client wants Software in .exe format and used in desktop. i use various softwares for .exe conversion but it only support php but i want's to connect with MySQL Database. Please anyone can help to create .exe conversion with MySQL Database..
Download PHP Desktop Chrome.
Copy all your code from site directory to Phpdesktopchrome/www directory.
Run Phpdesktopchrome.exe, it will execute like a browser with PHP compiler.
Download Innosetup Software for make exe file.
Install and run Innosetup and select Phpdesktop chrome files to create a EXE file in Option.
Install wampserver in client system with database import.
Enjoy.
There are many compliers available on web by which you can create EXE in PHP.
This program runs through dos and windows only... :) so this is good news for windows user
First Download zip from Here.
Now unzip it and open Command prompt and then go to its directory location.
Start -> run then type ‘cmd’
Use the “cd..” command to change directory.
Place PHP script to be compiled next to bamcompile.exe place it in same directory.
In the cmd prompt, at that directory, type:
bamcompile test.php
variations:
bamcompile -c test.php gives compression.
-e:something.dll allows a DLL to be embedded
Ready made examples are given in Zipped files which you have downloaded,just try it out.
Another application wapache is also there but i dont know much about it.
DOWNLOAD WAMP server from wampserver.com.
its very good for offline use server for desktop, then just copy and paste you script abd .sql file into it. and you are Done.
If your client using highspeed interenet then they can connect the server to online. but they need super computer for more traffic, another option is LAN.
If the program is for office use and no need to connect a lot of computer and internet then use LAN and WAMP.
------ Another possible you can use --------
Install WAMP then copy then .exe file "click start button > all program > and paste into startup folder". server will run automatic windows OS start or restart but it take 2-3 min. (green light)
go to wamp folder > www > make a folder for your program then paste your script.
open any browser then in address bar type "localhost or 127.0.0.1 (localhost IP for offline)" , scroll down and you will see "Your Projects" and under of this you will see your folder which you had create into wamp server > www folder. click on it and here you gooooo....
Now your client can do work with your script. Bookmark it and also create a shortcut into desktop for direct use.
Hope this may help you. thank you.
If you are getting any problem to do this work, then email me here - (krishnabiker#yahoo.com)
I think you should just convince your client not to use a .exe installer. It makes no sense.
You could have an installer that installs a local webserver and a local MySQL, and then opens a web browser and browses the local webserver. This would work, but it means your application runs on only one machine, and can't be used by two people.
On the other hand, you could install an application that talks to a central MySQL database, hosted on the LAN. But then why not install the entire application (webserver, MySQL etc) on the LAN, and have the clients access it across the LAN as a web application? Still no reason for a local install.
I would suggest:
See if you can persuade your client to move to an entirely web-hosted solution. Emphasize how easy updates are - from one central location, not from each machine; or
See if you client won't be happy with a .exe that installs a link to a URL (on the LAN).
VERY SHORT ANSWER: NOT POSSIBLE
Tell your client that it is a client-server application not a desktop app.
One idea is to have portable PHP/MYSQL/APACHE that can be stored in a CD or used and create an autorun fro it..
Tell your client you can do better than that, you can create a batch file for his use!
Then create a program.bat file with one line that runs the php (should be something like "php ").
:)
We need to bundle your project files in MSI ( windows installer ) along with PHP frameworks, MySQL and Apache.
Everything can be included in a single MSI file or you can keep server part in one MSI (PHP framework+Apache framework+ MySQL) and your Project file along with Yiiframework in another MSI.
I already made server part MSI in order to create one of my previous web project. In that project i had to configure Mysql DB (my.ini) and Apache configuration file (.conf). It worked fine.
For a desktop application I recommend that you change your database settings (if you can) and switch to SQLite3 DB. They are portable files and does not need a database server to run.
Use http://www.usbwebserver.com/ and from a stick or an CD/DVD you will be able to run your application. It is a portable version similar to W
Related
I created a PHP script that takes an input of a CSV file through the web browser and outputs a bunch of directories and files according to the CSV file. Now I want to give this to my client as a standalone application without the need to host their own LAMP stack as my client is not technical at all. He just wants it to live natively on their desktop where he can easily click to open it.
I think you can use Docker.
You can make the php script run from docker by creating a folder structure like this:
docker-compose.yml # This file should contain the docker configurations
run-application.bat # This file should run the docker application
app/ # Insert the script and map it inside the docker configuration
once run-application.bat is clicked the script should run docker and create a LAMP server mapped to the client computer local port.
You can also decide to automaticaly open the browser.
Two steps only, 5 minutes. Put EasyPHP (https://www.easyphp.org) on a USB key and put your file in "www". Your client will able to run those file by launching EasyPHP. He can even copy the whole folder on his hard drive. EasyPHP is portable.
In my application i have to deploy my application on client system.
So is there any way to run my php application without installing xampp...
Because the client should access it as a readymade app without installing anything...
This is the description of my project...
We have to develop an application where the client will have our application he will connect to remote server
Then he will download the data from remote server...
Then he uses that downloaded data using that app
Here my requirement is the user may not have the knowledge of installing the xampp...
So is there any way to run the application in user system just by copying some files
U may suggest me a one click solution (like using installer which will include installation of xampp and copying my data into user system)
I really dont want to use any external software to render no database PHP pages so I did some digging and found that if you run php -S localhost:port in your working directory you basically start a server there.
S is a capital S and not s
I'm a big fan of server2go. I've used it to deploy PHP applications on CD/DVD. It comes with MySQL and is relatively easy to configure. I've even replaced their splash screen with my own so no one knows I'm using it. It's donationware, but I was impressed enough to donate:
server2go-web
With this application, you don't have to install all that other stuff. It's self-contained in this executable and directory.
EDIT: To clarify, server2go does not install anything on the client machine. It runs as an exe only when you specifically want it to. When you click on the .exe file, it launches your PHP application in a browser window, then you can right-click on the server2go icon in the system tray and close it when you're done.
EDIT2: One gotcha: if you want to save data to the MySQL db on the client machine, you'll need to copy serve2go to a directory on the client machine or run it on a writable USB stick. If you run this application off CD/DVD, it will be able to read data from the database, but not write.
The better way is to use PHP Desktop Application. It will allow you to run your PHP Script like a Desktop application and you don't need to install Xampp or any other web server to run.
PHP Desktop Application
After downloading the .Zip file unzips it to any folder that you like. After unzipping, Go to the folder, and there you can see a folder "www". Delete all the files contained in it and move all your php script to it.
Once you moved all your files into it. Run the .Exe file named "PHP desktop-chrome"
It will open your PHP Script really like a Desktop Application.
This script doesn't require any kind of server software like Xampp, Wamp, Etc installed in your PC.
You can either host the php application or install the application into one system as server and call in client system using the ip of the server system like the following
http://**ip address/php file name
If you don't want your client to install anything then you should create Client Server architecture, there is no another way.
PHP Application are not meant to be deployed on multiple clients. It's meant to be deployed on a webserver (your own server with sth. like IIS or XAMPP) so the clients can access it via their browser and doesn't have to install anything more.
If you want to deploy applications on the client pc's i recommened an other programming language like Java or C/C++.
I simply used xampp zip version so i copied my application into htdocs and the whole xampp is given to the customer so he simply running the application eazily without installation.
Make sure you have installed php from https://www.php.net/downloads.php. Once installed add it to path. Lastly type php -S localhost:8000
PHP needs to be installed on the machine it is running at in order to make sure it works. Since the app may grow and may require extension installing, PHP upgrading over time, hosting this on a client machine is not a very easy task in terms of management. You may want to host your project on a server and write a small bash script sending requests to the API.
If, for some reason you cannot host this on a server where your clients would send requests via the bash scripts, then you may want to install only PHP. If it does not need to listen to HTTP requests, then you do not need a server, you can just implement the PHP application and create a bash script so the user will be able to run it from the UI of their operating system.
No, you need some kind of server - Wamp, Xampp, etc.
You can host it online, and then he can just browse it from his PC.
I tried to delete an image in my website using CodeIgniter using this command:
delete_files("./".$versus->getConc1() -> getPicture_path());
I need to know how to recover my files, I use Windows 8 and EasyPHP.
If EasyPHP was installed to another drive then your system drive (C: is usually your system drive and D: is your storage drive), you just need to install a recovery software.
NOTE: It is very important not to write/delete/copy on that partition/drive. Otherwise your information might be lost!
I usually take the drive out, install it into another PC which has every software/windows service disabled that could write on that drive. Example: windows update, windows system restore, virtual memory, superfetch, antivirus, etc.
LE: Don't forget to always backup your files if you are working on something important. I do daily backups and store those backups on another PC. If the development PC crashes in some way, I always have the backup from yesterday.
Take a look at this link.
Have you checked your recycle bin? Or if you are using SVN take it from the previous check in.
.. and sorry for my english ..
I have something like IS written in PHP and I would like to make updating system for my customers. Here is my vision:
I upload new version to ftp server (or web server)
After click on update, system should compare version (done), backup old scripts (done) and make update like rsync. Delete deleted, change changed, add new files and folders.
For rsync I have to make ssh hole to my server and I don't want to do it. I found zsync, but it is designed for files, not for folder system.
Is there any easy way to do it? Some smart linux utility or some already done script in PHP?
Thanks for answers!
rsync can run on its own port, without any ssh involved at all: https://help.ubuntu.com/community/rsync#Rsync Daemon
But this assume you're comfortable allowing the world at large to access your program. Do you want to restrict it to just your customers?
You could also publish your source via git; git can also run as a daemon http://www.kernel.org/pub/software/scm/git/docs/git-daemon.html without requiring ssh. Again, it assume you're comfortable with the world at large getting your program.
Is there a way to distribute a PHP program like a desktop app, so that even if the user of the app doesn't have a local server environment setup on there PCs, the app will still work?
I was thinking, if there was some type of portable server environment program which includes PHP/Apache, then we could create a batch file which when clicked would start up apache in the portable program and launch the PHP app in the user's default browser. That way PHP apps could be distributed like desktop apps.
But the question is, is there such a portable server environment program that can be used for this?
Yes, if you google for XAMPP portable, you can find several versions of fully portable, fully functioning xampp servers for the go. You would have to make sure it contains all the security settings and extensions you need.
The file your user launches should be an .html file to be sure it opens in your browser. As you need to point the user to his own localhost to run your app (otherwise PHP won't be executed and he'd see a plain html file), you'd have to create a redirect, possibly using javascript or a simple "click here to start" link.
The XAMPP only provides half of the solution:
In addition to the XAMPP you can use Phar files that give you the ability to package your PHP applications as a unit for installation and/or deployment.
You can configure a separate php file which will handle any database creations and initial configuration which can be set to run on the first time.
For a helpful start guide consider the following link:
http://phpmaster.com/packaging-your-apps-with-phar/
Finally if you want to make it seamless (easier) to the user, consider writing a Batch script which will handle running some of the task required (Such as starting apache and mysql and running run.php). Take note of using relative rather than absolute directories to make script development easier.