Serving php through IIS instead of Plesk - php

I have IIS 7 and Plesk 10.4.4 on my Cloud Server. I need to update php version. Right now php is being served by Plesk, and I don't know how to update it with Plesk.
I've managed to install the latest version with IIS 7 and Php Manager, so I was wondering, how can I force php serving through IIS instead of Plesk? Is it possible?
Thanks.

PHP it's just binary file you can take necessary complied files and just replace it where it installed in plesk %plesk_dir%\Additional\pleskphp5, but you have to create backup of replaced files and preserve all current permissions.
There possible issues with future upgrade to next plesk version, because files replacement can make Windows Installer crazy.
Btw Plesk 11.5 has feature which allows to add your own PHP handlers.

Related

Multiple PHP / Apache Versions on MacOs

At the moment I'm using two machines for Web (Win10) & iOS development (MacOS) and looking to combine them into a one computer that I would use on a daily basis.
My current challenge is to ensure that I can develop and run two or more environments on the same machine (not necessary at the same time, a simple switch would do the job).
I've tried MAMP and AMPPS and they both do the job, with an exception to the PHP-CLI version.
Every time I run php from the console it opens up the latest version completely ignoring the one that is specified by the MAMP or AMPPS.
What is the best way to ensure that php-cli always points to a currently active version of the PHP as stipulated by MAMP or AMPPS?
On Windows I was using https://ospanel.io/ that had it's own internal terminal window that would automatically load the current version of php-cli.
I am fully aware of docker/vagrant but they would be an overkill in this case.
Thanks
Unfortunately there is no simple answer to my question. As a solution:
Get multiple version installed
Design a script that changes the PATH environment to the right version as required.
alternatively a script that rewrites a symlink to a required version of the PHP.
For MAMP user, you must edit the file /usr/local/etc/httpd/httpd.conf and set the PHP version you prefer to use in your stack. I only installed one version of Apache HTTPD with multiple PHP versions - you have to specify the version.
If you don't, the default is the Mac's pre-installed PHP version.

Upgrade PHP on XAMPP 1.8.3 windows 7 installation

I have XAMPP 1.8.3 installed on my windows 7 machine. Which include PHP 5.5.6. I want to upgrade the PHP to 5.6 version. Is it possible to do the upgrade while keeping the XAMPP bundle other module as it is (Apache, MySQL). Can any one suggest a way to do upgrade on windows 7.
Download the package from following url:
http://windows.php.net/download/. Make sure the “Thread Safe” zip
file with around 20MB was downloaded.
Extract and rename the folder to “php”.
Rename the existing “php” folder to something and place the new
bundle with folder name “php”.
Then restart the apache server. It will simply load the new PHP
version.
Try like this:
How to upgrade php in xampp:-
Lots of time you need to use multiple version of php for your
different project. In this case either you want to install xampp on
different port or you can install one xampp and upgrade php. In this
article I will demonstrate how you can upgrade php in your xampp
server. I will demonstrate the complete process by adding PHP 5.4
with XAMPP. Following is the step by step process of upgrading php
in your xampp server. Before trying these steps please take complete
backup of your code and database alognwith xampp because any small
mistake can lead to the corruption of your regular XAMPP.
Upgrade PHP in XAMPP server
Download PHP : If you are using xampp ofcourse you are using windows operating system. So first download your desired version of php binary from http://windows.php.net/download/ website. Be careful while choosing binary. If you are using XAMPP then your webserver is apache. So always download Thread Safe binary. Also read the compiler suggestion carefully on the windows.php.net site. I will recommend to download zip version.
Configure New PHP Version with your xampp: Unzip the downloaded version of the PHP in a separate folder. Please make sure that your new php folder name is not “PHP”. May be you can use folder name as the version name. For example for php 5.4 you can use php54. Copy the new php folder into your xampp folder. Now go to yourxampp/apache/conf/extra folder. Open file httpd-xampp.conf from the folder extra. Change the following variables:
Variable PHPINIDir to be your xampp folder new version of PHP
Varaible LoadModule to be your xampp folder/new version of PHP/php5apache2_2.dll
Save the file httpd-xampp.conf. Restart your XAMPP apache server. If your server get restarted successfully then your server php version is upgraded. You can check the status of your php version by URL http://localhost/xampp/phpinfo.php .

How and What to edit in httpd.conf?

I am a newbie in PHP and the Apache server things. All I want is to run and test my PHP scripts on my computer i.e a single computer environment.
I installed the Apache HTTP Server 2.2.25 on my Windows 8 OS (64 bit). I installed PHP 5 through IIS Web Platform Installer.
During the server installation I set the network and server to localhost.
I created this file txt.php and tried localhost/txt.php but the browser shows nothing.
What's missing?
I heard we have to edit the httpd.conf file, if yes then what and how to edit?
You are installing Apache HTTP Server (wich is a http server) and PHP5 on a IIS (Wich is an http server for windows)
One of the easiest way to have a server up and running in windows is through http://www.wampserver.com/en/
So, uninstall all you installed on your question and use Wamp to manage the server with PHP and Mysql runing without more problems.
Of course, you can install all by your own, but since you want just a server runing, this one will help you to start fast.
Wamp lets you control the software versions, so you can try different php versions, apache versions, etc.

Change PHP version in IIS 6

Trying to upgrade from PHP 5.2.5 to 5.2.17 (and then to 5.3.6 once that works) on IIS 6.0, installing the language itself runs just fine and I changed the PHP.ini/ect locations that IIS uses for PHP, everything still works but when I run PHP info on my site it still says it's running PHP 5.2.5. Restarted IIS, restarted the server even, no difference. What do I do to change which version/what location of PHP IIS is using?
When I install PHP 5.3.6 the site no longer works, so I know installing different versions is doing SOMETHING, but I think it might only be changing the PHP.ini my server is using, not the version of PHP.
In addition to installing the windows binary release of PHP I've also tried installing PHP from Microsoft's Web Platform Installer (both 5.3.6 and 5.2.17), after installing neither showed up as the current version in phpinfo either.
If you want to use php 5.3, you must install IIS FastCGI extension and run PHP as cgi script. From php 5.3 isapi is not supported. But everything works fine if you configure it, and as benefit you can use more php version simultaneously. IIS 6 is not a problem. Download PHP non thread safe.
For details see this, for example: http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/
Download the latest VC11 x86 Non Thread Safe version of PHP from http://windows.php.net/download/
Once the zip is downloaded, right click on the zip file and select properties. Make sure you unblock the file.
Rename your current PHP folder to PHPold.
Find your php.ini file and rename it to phpold.ini
Extract the zip file to c:\temp\php.
Copy the php folder from c:\temp to wherever your old PHP folder was.
Go to your new php folder and copy php.ini-production and paste it to where your old php.ini file was
Rename php.ini-production to php.ini
On the server, make sure you have Notepad++ along with the Compare plugin. If you need the compare plugin, use these steps. http://www.davidtan.org/how-to-compare-two-text-files-using-notepad-plus/
In the location that stores your phpold.ini and php.ini, right click on each of those files and open them with Notepad++. On the php.ini, only make changes to the lines with the >> next to them.
Once the changes have been made, make sure you save php.ini.
Go to Services and restart IIS.
Solution has been to move to Apache in my case. IIS 7 has better tools but IIS has proven to be a poor environment for development in this case.

PHP on an IIS server

I have designed a PHP based website which needs to run on a local server. Unfortunately I have developed this on a WAMP server using Apache. The machine on which this website will be placed on only supports the IIS server and I am not allowed to install Apache on this this machine.
How do I run PHP code on an IIS server?
See this link: http://php.iis.net/
99% of stuff is compatible. There can be some problems though (for example if you use mod_rewrite, or some file operation functions behave a little differently).
You can get it installed and include the right infrastructure (IIS, WinCache, and FastCGI, and URL Rewrite) with a single click using Web Platform Installer:
To install PHP 5.2 use:
http://www.microsoft.com/web/gallery/install.aspx?appid=PHP52
To install PHP 5.3 use:
http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53
http://php.iis.net/
With IIS 7, a lot of the apache/iis gaps have been closed. Like mod_rewrite is available in IIS 7 (http://www.iis.net/download/urlrewrite)
Here's how I got PHP 5.3 running on IIS 6:
http://www.howtoadvice.com/PHPIIS

Categories