Create an Installer package for Installation on WAMP - php

I have developed a PHP web application, now I am thinking about deploying it on Windows.
To ease my deployment, I plan to create an installer for it. This installer should do the following:
Check for Pre-requisites such as Apache, MySQL etc, install them if they are not available
Put the PHP application on Application folder, and in this process set the port number, create a conf file for the application, update the httpd.conf to make sure that it refers to the application-specific conf file.
Run database setup script and database population script that I prepared.
Set the database setting in the application config files so that they are pointing at the correct database.
I am looking for a installer to help me on this regard, something like Advanced Installer. Of course, I still have to write a lot of custom actions code for it, which is something I really hate.My question now is that is there anyone who has done all these stuffs and are willing to share his code, so that I don't have to do everything from scratch?

I think you are looking for this http://installbuilder.bitrock.com/. Bitrock is used by a few big projects like SugarCRM, etc to get their LAMP stack on other computers. Give it a try!

You could try movAmp. This will pack your application to one working executable, including apache/php/mysql.
Your application therefore should be aware if it is installed or not, say redirect to an install-script on first hit.
Movamp is an environment of
development to be taken.
MovAMP was conceived to hold on a key
USB or any other support of weak
capacity. Connect it up in a computer
equipped with Microsoft Windows and
you have access to a server web,a
database and INTERPRETER PHP. If
MovAMP succeeds in contenting himself
of not much of space, he can offer
also installed on a workstation.
Comparable in EasyPhp or WAMP5, MovAMP
inserts APACHE 2.0.54, MYSQL 4.1.12,
PHP 5.0.4 and phpMyAdmin 2.6.2-pl1.
Exits of the development of free
software, these technologies proved
their fastness and their stability.
Once thrown, he adds an icon to the
zone of notification allowing to stop
the server Apache and MySQL or to
achieve the reception of the site or
in phpMyAdmin.
Link

Related

Configuring php desktop chrome for allowing it to connect to sql server

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.

Should I use wampserver on Windows Server 2012 R2 or install apache, mysql etc. on the server

I am setting up a server for the first time ever (no prior experience) and got the static IP setup for it no problem. The next step is to setup the server to have a mysql database so other local machines can connect to it. Is it best to achieve this by installing PHP, MySQL, Apache etc. separately or to use something like wampserver?
I figured wampserver would be the straightforward approach but doesn't using a virtual server on a server defeat the purpose of it? Basically looking for some direction or a link here as I am completely clueless
WAMP server basically packages those different programs together and gives you things like a program icon, a system tray icon to control servers, readymade links to say phpMyAdmin. The underlying servers are the same as the 'original' ones. As such you may find WAMP server easier to install AND easier to administer.
Downside - the WAMP server does NOT includes latest 'originals'. They latest originals make it to WAMP server distribution with some lag. If you need latest say PHP, then better off installing them on your own.
WAMP server is a collection of Apache, Mysql and PHP modules.
WAMP server is same as having each component installed separately, however WAMP server gives you a package that is very user friendly in terms of quick shortcuts like (starting/stopping server, activating modules ans so on) which you would have to do manually (by editing config files if installed separately)
Pros of WAMP
Userfriendly
Easy to activate/ desactivate modules
Additional features (phpmyadmin,sqlbuddy etc..)
Cons
Difficult to upgrade
Securitiy issues
Performance issues

How Can I make portable xampp project

Let I have developed a dictionary application in mysql using php in xampp. That is i can access it using localhost from my browser. But i do not want it to be online. I want to release an offline version of it. So that I can distribute the project using cd or pendrive and user just take it and run it. That is I want to make it portable in offline.
How can I do that. That is should I install xampp in all the cd and import my database ? Or is there any smart solution?
By it's very nature, XAMPP is portable. You can just extract it and run it. When you run it it will run Apache, mySQL and you can access it by http://localhost or by a different address according to your host file configuration if it has been changed from the default.
So put it on a laptop or onto a pen drive and you can run your code and database from it.
Here's the description of XAMPP:
XAMPP is an integrated server package of Apache, mySQL, PHP and Perl (the AMPP in XAMPP) that all run from a removable drive. Everything is pre-configured and ready to go just by unzipping or installing it.
Why not to search first? )
There is similar question: https://stackoverflow.com/a/12272455/2792335
I think you should first migrate database from MySQL to something like SQLite to avoid need of db server installation.
Then use something like http://www.nusphere.com/products/phpdock.htm or one of applications referenced in the above mentioned answer.
PHP and mysql is not a good platform for such task. PHP to operate need running sever(i.e apache) with support for right version of php. an mySQL is commercial product, you can use it for free, but if you want to include it with your product as you described you need commercial license. I would suggest to rewrite product to another platform. In example you can use JavaScript and HTML5 storage instead for data. or pick different database.

How to bundle a php application with 1 click run/install

I create php application for small businesses. Some of the clients may prefer running the app on a local server, therefore my requirement is to create/bundle an app with apache/mysql/php with all the necessary confirguration and one click executable (be it a batch file) such that when the user opens it, it runs the apache server on some port say localhost:1234 and mysql as well.
and opens up the application in the default web browser.
To be more exact, Im looking for something like http://www.simpleinvoices.org/go, check their Simple Invoices for Windows which come budled with apache/php/mysql.
P.S - Im not sure if this question should be at SO or Superuser.
If you actually want to install a web server and a SQL server then Lars' solution would be a way to go. On windows you can generate a .msi installer containing the dependencies you need (like WAMP). An installer executable would be a cleaner solution than a batch file in my opinion, as it will also provide the user with an option to uninstall your software if they wish.
If you want to distribute your application in a standalone version, then you might also want to check a solution like NuSphere's PHPDock - http://www.nusphere.com/products/phpdock.htm
I had the same challenge and came across Uniform Server:
http://www.uniformserver.com/
You download it, add your application to it, start it and everything runs. Lovely.
Superuser would have been better. But depending on your requirements, you should just create a package to install. On windows, package it with WAMP, on linux, package it with either one-click-install or creating packages for the two biggest systems, namely APT and RPM. With the dependency-system on all of them you can make sure, that your application runs right off the bat.
PHP Desktop is the best option I found when researching this.
https://github.com/cztomczak/phpdesktop
PHP Nightrain is also an option:
https://download.cnet.com/PHP-Nightrain/3000-10248_4-76169308.html
Bitnami WAMP stack looks good as well:
https://docs.bitnami.com/installer/infrastructure/wamp/

Installing Zend Server on Production Server/Machine

Hello i was wondering if anyone had to install/or is working with Zend Server.
My Question is: If i install Zend Server on a production server will it mess up my existing PHP configuration? Will i have to bring my application offline first or will Zend Server install without problems?
The application must run 24/7 and i need a reliable PHP Stack that will boost performance. Any comments on the performance part of Zend Server? Does it worth the installation?
Thanks,
That's no way to think about handling a production server.
I'm not experienced with the Zend Server product, but I wouldn't just install anything on top of a running production system.
Instead, get yourself a new server that will eventually replace your production server.
Then:
Start with a clean install of your distro of choice.
Install ZS (take notes on exactly what you do)
Install your application and data (take notes on exactly what you do)
Test it thoroughly.
If it works, nuke the server, and repeat 1-4, using your notes.
Once you're satisfied that you can get everything working "from scratch" using your notes, create a plan to migrate from the old server to the new one.
Doing it this way ensures that
You have minimal downtime.
You don't have some mess with ZS installed over the top of some other set up.
You can re-build your server when necessary (you created documentation)
2016 Edit: These days, there are various tools such as chef, ansible, or salt that replace obsessive note-taking with automation. I highly recommend anyone managing production systems learn one or more and use them liberally.
When Zend Server is installed on Linux boxes, it will replace the PHP packages supplied by the distribution, and some other packages which supply some PHP functionality. As tim said, it is better for you not to replace the production server environment on the first round, as not always things will work as expected, even to the advanced users.
Take another machine with similar environment and make it your staging/development environment. This will allow you to play with Zend Server features without actually taking down your production server and sites. At the moment you are sure everything works as expected, and only than, start thinking about changing your production site.
To run multiple LAMP servers on Ubuntu, I use XAMPP for Linux and Bitnami LAMP Stack .
By default, the first works on port 80, the second on 8080. Hence they don't conflict. If you know a little about Apache configuration, and if can write a few simple scripts, you can do many things.
However, doing anything on a production server is dangerous.
Both XAMPP and Bitnami stacks are meant to be development environments.
See timdev's answer, +1 to that.

Categories