How to make an installer EXE/MSI file (for php files) - php

Well I have two php files
db_config.php
index.php
with certain code.
To do
I want to make an installer file, which should zip these two php files in an exe or msi file.
and whenever user execute my installer file, it should extract my files to the specified folder on the pc.
also it should look like user is installing an software solution, i.e it should have some instruction, next button, back button, cancel button and a browse button to specify the installation location. (as you have experienced during a normal software installation )
Regards
Qadir Hussain

NSIS is a great Open Source tool for installing software. From the website:
NSIS (Nullsoft Scriptable Install System) is a professional open
source system to create Windows installers. It is designed to be as
small and flexible as possible and is therefore very suitable for
internet distribution.
...
NSIS is script-based and allows you to create the logic to handle even
the most complex installation tasks. Many plug-ins and scripts are
already available: you can create web installers, communicate with
Windows and other software components, install or update shared
components and more.

Related

How would I create a dynamic Chocolatey install file?

I am currently working on a project that would automate the installation of various environments we have within the company. I have several packages created using Chocolatey.
The problem that I am having is creating a dynamic custom installation file. The current internal website allows for users to checkmark the software they wish to install. The idea would be to then allow them to click an install button which would generate an .exe file. The .exe would run the command line scripts to install the Chocolatey packages.
An example of the command line after marking the Google Chrome and Notepad++ boxes would be:
> choco install googlechrome
> choco install notepadplusplus.install
I am wondering what would be the best way to go about creating an .exe file dynamically.
Two examples I am getting inspiration from would be:
https://ninite.com/
http://getbootstrap.com/customize/
There is a chrome extension that does something similar. You may want to explore what it is doing and change it for your needs. It's called Chocolate Factory.

How to deploy PHP web site as a package on IIS?

If my question has already taken place in other post, please excuse me.
I am coding a PHP - MySQL website and publishing it on IIS.
The way that enables me to do this is enabling CGI extension of IIS and copying the source PHP files to a folder under the "inetpub" folder.
Here is the question. If i DON'T want to copy my PHP files (which are including my codes obviously) into "inetpub" folder, is there a way to make a package file of my PHP files? For example a Tomcat server executes ".war" package files. Is there a package file type that i can put my PHP pages in it and deploy it on IIS and publish it on IIS?
If there is no way to achieve this, what can i do to prevent copyng and pasting the PHP files into "inetpub" folders?
Thank you all.
You can take a look at Web Deploy. It doesn't package the files as compactly as WAR but it's the "official way":
http://www.iis.net/download/WebDeploy

Custom installer to install a PHP web site?

Just a quick one about installing a PHP website, are there any tools out there that would allow me to create an install package to fully install this website on a Windows platform? If possible maybe even take details like company name and database connections which then maybe updates the necessary PHP files?
If the later cannot be done its fine, but a free tool for installation would be great!
Thank you!
Ash.
It's possible with a tool like innosetup.
It let you build setup , in which you can put what ever you want (webpage , other setup ...).
If you want to do something a little bit advanced (installing apache , configuring file ...) you will need to do some code (delphi) , but the documentation is pretty clear about all the possibility.
Don't be fooled by the simplicity of the tool , it's very powerfull. For example you can check if a specific service is running to lauch (or not) a specific part of your setup. (if httpd is running just copy the webpage a skip the apache installation for example).
You can combine innosetup with server2go
Download the package you want as a .ZIP file, extract it, put your website in "htdocs" folder and then create an installer with innosetup.
Edit: You can edit pms_config.ini too with your needs.

Dealing with SVN and FTP and dynamic files created/changing on the server?

Basically I've got various projects all version controlled using subversion. This is for many reasons: backup of files in case of bugs/issues in the future; backup of files in case of local system failure etc; collaboration from others in the company; etc..
One of the systems we work with is Wordpress which does updates and installs plugins through its administration panel and such, plus on installing it the system creates various files (including a wp-config.php file and a .htaccess file). This means that on install there are files on the server integral to the running of the system which aren't on the local systems and aren't in svn. Plus any installed plugins and updates aren't mirrored in version control or the local copy.
Plus it feels wrong (specifically when you compare with data normalisation in databases and such) to be working with two copies of the same code - one in version control and one on the server.
So my question is am I using the tools in the right way? Is there any way that the public_html folder from the server can "point" to the latest version in the repo? Or can SVN be configured to read from the public_html folder and automatically add+commit any files created/edited on the server?
Or do people just literally download anything that gets changed/created and add them to SVN manually? Or do people not care? Maybe I've misinterpreted what SVN is for? I'm using it for backup effectively.
Thanks
Tom
I only have versioned my own wordpress theme. All the other stuff including the data is live on the server and solely backuped from there.
The code of wordpress and the plugins used are developed elsewhere, they have their own repositories, and i do not mess mine with code I never will touch.
The question is how to deal with configurations. I am currently running a wiki where I document all the plugins installed live and what configuration properties I have set up.
A sync of live to local then goes like this:
Update wordpress version and plugins to the versions written in the wiki
Setting all configuration options as written in the wiki.
Importing the data base (except wp_options). Converting the static URL of wp_content files to the local scheme.
Syncronisation of the wp_content directory
In many cases your hosting provides regular backup. But is you use VPS you have more freedom to do whatever you want. I have made my public_html folder under version control and created a small script to commit every night. So I can have a complete version history of my site with changes traced. You can also create a script just to copy this folder elsewhere. There may be other better solutions for enterprises, but this may be enough for small project.

Why are my 3rd-party HTML to PDF tools not recognized in Drupal 6 using Print module?

I have installed Drupal 6 and have the "Printer, e-mail and PDF versions" aka "Print" module installed.
I then realized in order to generate PDF's from my html nodes that I need a third-party tool, which is fine but the Print module is not recognizing the third-party tools I have installed in the /modules/print/lib/ directory. I get the following error in the "Home › Administer › Site configuration › Printer, e-mail and PDF versions" page:
"No PDF generation tool found! Please dowload a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details."
I have set 755 permissions on the folders and files for the third-party tools, as most of my other settings are set to that as well.
I have installed two of the three recommended third-party PHP PDF generating tools:
1) http://dompdf.googlecode.com/files/dompdf-0.5.1.zip
2) http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.8.3.tar.bz2
Why am I seeing the "No PDF generation tool found! Please dowload a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details." error message? And why is the Print module not recognizing my third-party tools?
Hm, just tried locally and it works for me, so you should double check your setup:
The module tries to find the installed libraries via the _print_pdf_tools() function in print_pdf.admin.inc. The function searches for a specific 'key' file per possible library in two places (assuming that if that file is ther, the whole library will be there as well):
in 'sites/all/libraries'
in the directory of the print module (should be 'modules/print' in your case)
It searches those directories recursively, so it should find them in arbitrary subdirectories as well, and the actual naming of the library directories should not matter.
Taking dompdf as an example here - it will be identified by its dompdf_config.inc.php file.
So you should check:
that this file is really present in the directory where you extracted dompdf to (from your comments, this should be modules/print/lib/dompdf-0.5.1)
that it is readable for your webserver process (you said you changed the permissions - did you do this recursively, and did you adjust the owner and/or group as well?)
The 'key' files used for identifying the other two libraries would be:
tcpdf.php for TCPDF
wkhtmltopdf or wkhtmltopdf.exe for wkhtmltopdf
Just checking - did you extract the libraries from the archives?
The folder would look like /sites/all/modules/print/lib/dompdf for example
wkhtmltopdf:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
I am 85% sure that Dreamhost doesn't have X11 client libs on their shared hosting; you should have got errors while trying to compile wkhtmltopdf on dreamhost. By the way, try running uname -a in SSH session to dreamhost to find out their OS.
If you did manage to make wkhtmltopdf work on your local test server (which involves compiling the source tarball you linked to), you may have some luck using a pre-compiled static binary version from http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.8.3-static.tar.bz2
dompdf
The only thing dompdf requires is fonts. Have you followed the INSTALL instructions? If yes - try running some conversion with command-line, to see which errors prevent it from functioning. You haven't provided enough information to diagnose this one.

Categories