Custom PHP/Apache2 Installer with web application - php

I want to make custom php/apache2 installer including my web application for distribution. So for example user downloads the one click installer and he will have installed php/apache2 and web application. And all he have to do is go to localhost. (The best thing would be double click then shortcut icon just to go to localhost in browser, but check that apache is running)
What is the proper way to do it? Any tips, easy tip of doing it?
p.s. for all popular os Mac OS, Win, and Linux/Ubuntu

I'd ship a Virtual Machine with the application, and supporting platform, installed and ready to go. Virtualbox is well supported and would be a good place to start.
Good luck,
Anthony.

Latest PHP version has a webserver included and with SQLite, all you need is to start PHP WebServer, maybe it could help to make a lightweight installation.

Related

how do you run a php file on a chromebook?

I've been looking on YouTube and other places, i'm not sure how, this place is filled with smart people so i thought i would ask you guys!
This blog post lists some options:
Termux lets you install a Linux environment and has a PHP distribution (but it is highly restricted and you will probably run into plenty of frustrating limits)
You can enable Developer Mode and then press Ctrl-Alt-T to open a crosh shell, from which you get type shell to get a regular shell and from there either:
Install Linux and dual-boot
Create a chroot environment to develop in
Meanwhile OS 69 introduces Linux for Chromebook which should be an easier way to get a Linux environment.
… but that said, Chromebooks are generally low-powered machines that aren't ideal hardware for doing development work. I'd look at setting up a remote server and doing my dev work over SSH.
You need to install MAMP or XAMPP on your Chromebook. MAMP or XAMPP will turn your Chromebook into a web server capable of reading PHP.
EDITED:
Since you can't run MAMP or XAMPP on your Chromebook, then you should look into using a Cloud solution such as AWS or Google Cloud.

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 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/

Best methodology for PHP+APACHE+MYSQL Development

I want to start learning PHP. I have had a look at the various options available to install the PHP+MySQL+Apache combination. But it all seems too cumbersome and a lot of editing to the CONF files always leads to one problem or the other. So I had a couple of questions to ask:
1) How will something like WAMP help me? If I install WAMP, will that be enough?
2) Isn't there some Eclipse like IDE ( coming from a Java Background ), that allows WAMP to be integrated with it? ( Or is typing on Notepad the only option available )?
Please help me out by explaining things a little elaborately. Thank you so much for your time and patience.
i personally use xampp and netbeans for my local web development. you can actually set up the netbeans project wherever you want, so you can just place all your files in the htdocs folder of xampp (at C:\xampp) and edit the files in the folder directly. This will allow you to immediately see any changes you have made by reloading the web page.
xampp allows you to run apache (with mod_php installed and configured) and mysql on your local machine and even includes a handy panel to let you start and stop them at any time.
netbeans has a lot of tools for easy development and support for frameworks like Zend. You can also use it for many other languages should you wish to expand.
I prefer WAMP because it doesn't try to do anything fancy with configurations... when you install it, you get PHP, Apache, MySQL, and phpMyAdmin with each of their default configurations and extensions loaded. It's the same as installing them separately, only they're all in one convenient directory, and you get the handy tray icon to restart services and enable/disable extensions.
As for an IDE, I use Eclipse PHP Development Tools (PDT), but I've heard good things about Netbeans too. Eclipse can do everything Scott described Netbeans being able to do as well. You also might want to look into Aptana which was branched from Eclipse PDT but is now maintained by a different team.
you can go ahead and install xampp from apachefriends, it comes with an apache web server, mysql database, phpmyadmin and a control panel for both servers, and installs fairly quick and with the default settings you will be pretty much set. Not sure what integration you'd want between the editor and the webserver though. if you mean code folding, autocomplete and all that stuff, eclipse has a php-friendly version, and so does netbeans (these 2 are the most popular choices as far as i've seen)

Help setting up php for Eclipse

I'm trying to set up Eclipse for php web development. What I would like to do is preview a php web page from within Eclipse, but I cannot figure out how to do this. Is there an integrated web server of some sort that allows this, or do I have to set up IIS/Apache to do it? If so, do I have to have my php files in the web servers path, or does Eclipse auto deploy the files to the local web server? Any information or links would be very much appreciated.
There is a plugin for Eclipse called PDT which makes PHP development a breeze.
For an overview on how to install it, you can refer to the Eclipse website:
http://wiki.eclipse.org/PDT/Installation#Eclipse_3.4_.2F_Ganymede_.2F_PDT_2.0
To actually view the PHP scripts running, I would imagine that you'd have to have some sort of server already installed and running. You could probably set the workspace location to be in the server path, and then view the files through localhost. But maybe the PDT package takes care of some of that for you.
I will make it Very Easy ;)
(1) Go to Eclipse home: http://www.eclipse.org/downloads/ and download Eclipse Classic (Current May/2013 version is 4.2.2)
(2)
One you have eclipse fired-up in you machine Do followings : Help > Install Software
Than, Click On Add
Finally, Add this link: http://download.eclipse.org/releases/indigo for all the list of Add-Ons
and pick PHP under Web Addon (Should be last in the list) and Install it.
Restart you eclipse + thumbs-up to my Ans. and Start Coding ;)
I setup apache/php/MySQL on my windows PC, so that testing environment is not totally unlike my servers (excepting the OS, but 90% of the time that's okay). I create alias's in the Apache configuration to the Eclipse workspace, and just hop between the browser and eclipse. The URL for testing is something like:
http://localhost/project_name/file.php
While this isn't ideal, it is a fairly consistent/smooth process that doesn't require a great deal of configuration within Eclipse. I keep thinking there should be a better way, but I honestly don't think I'm burning enough time to justify the research. Once the setup is done, I don't really loose more time after that, and I can control which version of PHP I'm running on my system.
I don't tend to like integrated browsers for testing of web applications anyway. Every time I've dealt with one, it was completely different from a "real" browser that I had to completely retest anyway. At least this way, I have my Firefox testing done when I'm through the first pass of the logic.
try easyeclipse, it the easiest Eclipse setup i've found
"EasyEclipse for LAMP:
For PHP, Python, Perl, and Ruby development with a web server and a database"
I would also recommend downloading and installing WAMP server which is a really easy all in one Windows equivalent (windows, Apache, MySQL, PHP) of what you are likely to have with a commercial web host. See http://www.wampserver.com for details and download.
As well as pdt which had already been mentioned other alternatives are phpeclipse and aptana studio which is based on eclipse.
Visit this website https://eclipse.org/pdt/. Go to where it says 'Update existing Eclipse'.
The procedure is this "In Eclipse, click Help -> Install New Software and work with *: http://download.eclipse.org/tools/pdt/updates/3.6"

Categories