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

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

Related

How to run a cakephp app on an apache server? [UBUNTU]

On 16.04 Ubuntu, I want to run a cakephp app on the localhost to make some modifications. How can I do that?
Installed application has files in 3 different directories:
opt
etc
usr
I know apache files run on var/www/html but how can I move those installed files there to run the application? As far as I know, index.php is the start file of php projects but for cakephp, there is a default.ctp file for the main program page, of course there are other index.php files for other pages, and I am really stuck with that.
Thanks in advance.
Copy your CakePHP project to a subfolder in Apache document root, eg /var/www/html/myproject. Make sure you have mod_rewrite enabled. Then you should be able to access your project at http://localhost/myproject.
More info: CakePHP Installation
As for files located in etc, opt and usr, it depends what they are. If you can share what you have there, please do it, as it will help to decide what to do with them.
I suggest using virtual hosts to run your project.
https://support.rackspace.com/how-to/set-up-apache-virtual-hosts-on-ubuntu/
Enjoy...

MAMP moodle project

I am working on a moodle based project, which I inherited from someone else. Having copied the files into htdocs folder and started MAMP, the files still don't show in the browser. Instead, the browser automatically initiates a download. I might be required to change the config file, however, since I do not have much experience with php and SQL I am not sure what exactly. My part of the project is to develop html and css, but need to be able to run it locally first.
What do I need to do to get the files run locally? The route I use is localhost:8888/whatever/whatever/index.php
In case someone else runs into the same problem - Apache downloads php files instead of reading them - here is what helped me.
.htaccess file may need changes if the application has changed servers.
Delete (at least rename if you don't want to remove it) config.php and run the application through the browser. It should initiate install automatically.
To run php and SQL I used MAMP.

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

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.

How to make my php project distributable like .exe file

I want to make my php project distributable like .exe file.
is it possible to customize wamp or xampp to inclue my project folder in that so i can ask client to install that wamp/xampp and my project will be automaticall setup on their system
Check out phar for creating a php archive.
Using uWamp server we can bundle php project with mysql and distribute it easily. Check this

running php on windows azure, wrong php.ini file is referenced

Hi i have a small api done in php which i want hosted on windows azure, i have downloaded the php sdk, and created a project and put my php folder in it, which has the ext folder and my php-cgi.exe, and also a php.ini file. when i do phpinfo(); it shows that the php.ini file referenced is in C:/windows not in my project folder which is in E drive, also the ext folder reference is shown to be c:/php/ext, which is also wrong, how do i make it point to my ini files within the project. please help ?
Try changing the config to something like:
<application fullPath="%RoleRoot%\approot\Content\Php\php-cgi.exe" arguments="-c %RoleRoot%\approot\Content\Php\php.ini"/>
I recommend reading the articles available on the Azure PHP website. This is an official Microsoft website that is run by the Interoperability team at Microsoft. They have lots of good info around PHP on Windows Azure.
http://azurephp.interoperabilitybridges.com/articles/build-and-deploy-a-windows-azure-php-application
Also, after you have the development environment setup take a look at this tool which allows you to conveniently package any PHP application for Windows Azure:
https://github.com/blobaugh/paz

Categories