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.
Related
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 .
I just installed PHP version 5.5 on my server (Centos 6 / Plesk 12) and changed the php version for one of my sites. I can see via a php info file that the site IS using the new PHP version, but I don't know how to start that VERSION of php. I made some changes to PHP5 ini file but when I restart apache, it restarts the old version (php 5.4) and not php5.5 ..sorry I am not the best at shell commands but does anyone know how to restart the NEW php version if i have multiple versions installed on the server? Thanks!
additional info- the changes that i made to the php5.5 ini file is loading the zend_extension opcache.so ..which is why i installed php 5.5 in the first place!
BONUS QUESTION: will zend opcache be effective running php 5.5 as fastcgi? I've heard that object cache modules are not compatible with fastcgi because it lets users run the application as their own user so the cache can not create x number of caches for each user..if that makes sense..lol
Thanks
Not sure if anyone is still following this but I also got stuck with this too. The solution I found to work was this:
Depending on what PHP versions you have setup with Plesk you need to run the following command:
service plesk-php{version}-fpm restart
For example:
service plesk-php54.fpm restart
or
service plesk-php56.fpm restart
In centos 7 the "service" command actually just calls another function so you end up calling:
/bin/systemctl restart plesk-php54-fpm.service
You can call that directly if you want but it is a few extra characters to type in.
With the above in mind you are now free to edit your php.ini files for each specific version you have enabled via Plesk. For those who don't know the ini files are usually located here:
/opt/plesk/php/{version}/etc/php.ini
Where {version} is 5.4, 5.5, 5.6, etc...
Hope this helps someone else.
In regards to your bonus question - sorry I'm not sure as I've not worked with that specifically.
I've been incrementally setting up a web server for research and testing purposes. The "server" is running Windows XP and I initially installed Apache Server 2.2 and PHP 5.3. That's been working great for a while. I am now needing to setup MySQL which I downloaded and installed MySQL v5.5. I am able to interact with MySQL via the command-line interface. In the process of setting up phpMyAdmin, I have encountered difficulties getting PHP and Apache to play nice with MySQL. Here's what I've discovered and tried:
In the php.ini file, when I attempt to uncomment either the php_mysql.dll or the php_mysqli.dll extension and restart the Apache server, the server crashes when it starts. The Windows event viewer says Apache failed to start due to "faulting module php5ts.dll".
The extension_dir parameter is set to ".\ext" and the php_mysql.dll and php_mysqli.dll files are in that directory.
I have also tried copying the libmysql.dll file from the lib folder of the MySQL directory to the Windows\System32 directory (with no change in behavior).
I'm at a bit of a loss to figure out what the next step is. Any suggestions?
The extension it's looking for is an extension output by php at compile time based on your configured build options. It is not looking for the header files from mysql itself.
Also, ".\ext" is a relative path that may or may not be valid in your installation. You may need to re-compile php to include mysql and mysqli (you should also compile PDO support) into your php build (Or whatever the windows equivalent of re-compiling is).
Also, you should make extension_dir an absolute path not relative.
I need to install or use php on a windows 2003 server that already has php 5.2.0.0 installed due (I think) to setting up symantec backup exec. I don't want to interfere with backup exec's php.ini settings - and would rather be able to control my own configuration of php.
searching for php shows that php.exe and other php files are currently installed in
c:\program files\symantec\backup exec\
I'm almost certain that installing the current version of php 5.2.8 to c:\php would be disastrous or calamitous in some way.
There is no PHPRC entry in the server properties > environment variables and I'm pretty sure that the php.exe location is not included in the PATH variable. ...unless the actuall install location is different from the c:\program files\symantec\backup exec\ dir.
Any suggestions on how to proceed?
I'm almost certain that installing the current version of php 5.2.8 to c:\php would be disastrous or calamitous in some way.
What makes you say that :) I've run separate PHP versions on the same machine side by side and not run into bother.
AFAIK the Symantec install should not conflict with your own installation, nor should the separate php.ini files conflict with each other.
[Response to comment]
First thing to note is that I have no experience of Backup Exec or what it uses PHP for. I'm guessing it uses it for its own internal stuff and doesn't spread itself over the OS. Test this by searching for php.ini and php DLLs on the file system. I'm betting it's all quite self contained. PHP searches for the config file as noted here: PHP Site . As you note, BE hasn't set the PHPRC variable. Check it hasn't used those Registry entries either. On a different tack, has BE installed an admin site already on IIS? If so, check the IIS Web Service Extensions to make sure it hasn't already registered the PHP ISAPI dll or PHP CGI exe. IF not, I think you should be okay for your new install.
To be on the safe side, do a manual PHP install as illustrated here: PHP Site. That way, you know exactly what you have installed, and can easily remove the files again if they cause a problem. I can't imagine a problem here that would require you to reinstall BE.
I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP script from my localhost test directory that I created, I get a slew of missing DLL errors. I have seen posts out there which indicate that its possible and has been done. I dont see any bug reports for this MSI at PHP.NET support. Any ideas?
Not sure if you already have this but I use WAMP from http://www.wampserver.com/en
It's easy and simple to set up, it has an icon in the system tray to show that its active and you can make it go online or available to the outside by clicking the icon and setting it. I used this when I was first learning PHP since it has everything in one, no need to setup any other service like IIS.
Probably the installer didn't configure your server to use PHP properly. Check out Microsoft's page on enabling PHP on IIS or alternatively switch to Apache if that's a viable option.
I'll see if I can remember it correctly:
Unzip PHP zip file into c:\Program Files\php (or run the installer)
Copy php5ts.dll into c:\windows\system32
Copy php.ini.dist into c:\windows and rename it to php.ini
Edit c:\windows\php.ini and look for extension dir - make it point to c:\Program Files\php\extensions (or wherever you put it)
This is where my memory gets fuzzy: Edit your IIS application settings, add a script map for .php files, and set the executable to php5ts.dll
Profit!?!??!?!