installing PHP 5.5.15 on Windows Server 2008 r2 64bit - php

THe last time I installed PHP there was a great install program. Now I guess I have to do this version manually, So
I am trying to install PHP 5.5.15 on a Windows Server 2008 r2 64 bit and I am getting no where. I have followed the instruction multiple times and no dice.
If I try to check PHP by typing ...testphp.php into IE I get the following error:
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
Detailed Error Information
Module
FastCgiModule
Notification
ExecuteRequestHandler
Handler
PHPFast_CGI
Error Code
0xc0000135
IF I try to check using the Command Line I get error that says MSVCR110.dll is missing. I have installed MS Visual C++ 2010 x64 red... and also tried installing MS Visual C++ 2012 x64 red... and that did not fix the problem.
What am I doing wrong?
Steps used
Set up IIS
Download PHP (non thread safe), unzip to php folder
added Module Map...(FastCGIModule)
try to test php
also tried to modify the php.ini file before testing and no dice

Install the 32 bit version of VC11 or 9 from Microsoft. PHP is most likely 32 bit unless you selected the experimental version of PHP from their site - regardless of your OS type. I think that might solve your problem.
BUT...
I can't get php 5.5 to work on IIS 7.5 and Windows. I've tried for several days and I get 404.3 module handler or MIME type missing. No matter what the hell I do.

Related

SQLSRV works for CLI only but not from APACHE webserver

I am using sqlsrv to connect to an MS SQL database on my localhost without any problem. Recently, I have installed the 'sqlsrv' driver on a test server running Windows Server 2012 R2, that uses the same version of PHP as my localhost (php 5.5.19 - xampp).
Running database scripts from CLI of the test server works PERFECTLY fine.
eg: "D:\MYXAMPP\php\php.exe D:\MYXAMPP\htdocs\test\test.php" will connect to an mssql db, select some content and print it to screen without error.
However, same scripts complain driver not found when opened from Web interface. I tried checking php error logs, and i found a startup error
"PHP Warning: PHP Startup: Unable to load dynamic library 'D:\MYXAMPP\php\ext\php_sqlsrv_55_ts.dll' - The specified module could not be found.
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\MYXAMPP\php\ext\php_pdo_sqlsrv_55_ts.dll' - The specified module could not be found."
I tried restarting apache but same error keeps showing up. What could be the problem?
I found a solution this problem. It turns out the server environment Visual C++ Redistributable x86 version. As pointed out in this answer, the architecture of sqlsrv extension is x86, thus requires the x86 VC++ even on a x64 machine.
I noticed this when starting apache using a batch script distributed with xampp, instead of using the xampp control panel, a pop up would occur stating "Missing MSVCP110.dll", which I found was linked to VC++ 2012. I downloaded it from microsoft's website, and restarted apache without any errors. From there on SQLSRV has been working fine for both APACHE and CLI interfaces.
I still don't know why in the first place the CLI php API loaded the extension, while the apache php API couldn't in the same environment. I am researching that.

The FastCGI process exited unexpectedly

I am trying to run PHP via FastCGI on a Windows 2008 server.
I followed this installation doc http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis7/ and have checked I completed the steps correclty numerous times.
However when I try to execute a php page i am presented with the following error:
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
maybe you should try installing VC++ runtime as explained here.
There's a fairly good chance you're missing the correct VC++ runtime for the version of PHP you're running.
If you're running PHP 5.5.x you need to ensure the VC++11 runtime is installed:
http://www.microsoft.com/en-us/download/details.aspx?id=30679
Make sure you download and install the x86 version (vcredist_x86.exe), PHP on Windows isn't 64 bit yet.
If you're running PHP 5.4.x then you need to install the VC++9 runtime:
http://www.microsoft.com/en-us/download/details.aspx?id=5582
When you run php-cgi.exe from the dos command line, you will get the missing MSVCR110.dll pop up message.
Like Ben said, Get the x86 download for the dll here: http://www.microsoft.com/en-us/download/details.aspx?id=30679
After much pain and suffering, turns out I needed to install the "Visual C++ Redistributable for Visual Studio 2012 Update 4 32-bit version", even on my 64-bit server.
If you are installing PHP 7.1.14 on windows server 2008 rc2 Enterprise, only thing worked for me is to install microsoft Visual C++ 2015 Redistributable Update 3 from https://www.microsoft.com/en-us/download/details.aspx?id=53587
You might be using C:/[your-php-directory]/php.exe in Handler mapping of IIS just change it C:/[your-php-directory]/php-cgi.exe.
I tried opening php-cgi.exe directly and it gave me a more clear error message.
As the answer of 'sepehr' this issues are because of VC++ Redistributable suitable version for PHP are not installed or need to be reinstalled again.
I faced it before so i'll explain my steps to fix it.
1- Each PHP version is built by a specific Visual C++ Redistributable version like (10, 11,12,14,..) what ever.
((How you know!! look.. ))
Check back enter link description here The PHP Site then at the left side of this page, look at "Which version do I choose?" then see what version of VC++ is fits your PHP version installed.
Now YOU HAVE TO Download both of VC++ 32 and 64. and if your PC has it already then Unistall them first. and then install what you downloaded recently bu
(first 32 then 64).
- VC download links are exists on the mentioned PHP Site on the left side also.
I hope it helps you.
if you have two application like (your app, phpmyadmin) just disable APC extension
Hope that fix that issue
it's worked with me
For user using PHP 5.6.x follow this link and install the x86 version.
I have installed the latest version of Visual C++ Redistributable from this link for php 8.0.0 x86:
and my problem was solved.
In my case the problem was coming through the application pool. Try to change your application pool ASP.NET v4.0.
In my case I had wrong constellation of configurations:
error reporting disabled
typo error in the configuration
After enabling the error_reporting it was clear the session_path was pointed to a wrong folder.
"Sad but true"
I was getting this same error installing PHP 7 on Windows Server 2008 R2. I resolved this by installing the Visual C++ Redistributable for Visual Studio 2015.
For Issue C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly.
I resolved this by installing the Visual C++ Redistributable for Visual Studio 2015.(Microsoft Visual C++ 2015 Redistributable Update 3) and Visual C++ Redistributable for Visual Studio 2012 Update 4 in 32 and 64bit versions. and also make sure in php.info file cgi.fix_pathinfo=0 enabled.
I got this error too after I changing PHP version in windows.
I have PHP Manager plug in of IIS installed, it show the PHP is not enabled, then I fix this issue after doing "Register new PHP version"
I struggled for hours with that problem, and no solution worked for me. May seems obvious or very foolish, but my error was in PHP 5.6 version. I was using PHP 5.6 from XAMPP, but if you download PHP on IIS with Web PI (Microsoft Web Platform Installer) it's more suitable for IIS instead XAMPP version.
More Info:
https://stackify.com/how-to-host-php-on-windows-with-iis/
Running php-cgi.exe from the command line gave a message like the vcrt dll is a lower version than what is linked in php.
Using Visual C++ redistributable package 64 bit 14.29 solved the above problem for me.

How to get ImageMagick running with XAMPP on Win7?

I am trying for the whole day but I cannot get my ImageMagick flying with XAMPP on a Win7 machine. I downloaded ImageMagick (for specs see below), downloaded the php_imagick.dll from the PECL website and added it to my php.ini.
ImageMagick runs smoothly in the command line. But as soon as I start my Apache (by the way, I tried with Windows reboot as well, for sure), I get one of the following error messages (I tried with different DDLs):
The procedure entry point "php_checkuid_ex" could not be located in the dynamic link library "php5ts.dll"
or
The procedure entry point "MagickGetImageGravity" could not be located in the dynamic link library "CORE_RL_wand_.dll",
(there has been a third error message where entry point was something with Draw...Alpha in CORE_RL_wand_.dll.)
Some specs:
Win7 (x64)
XAMPP, win32, v1.8.3-2, VC11
PHP v5.5.6, Compiler: MSVC11 (Visual C++ 2012)
ImageMagick-6.8.8-5-Q8-x86-dll
(I used to have the ImageMagick Q16/x64, but due to my exhausting research today I read that I should use the x86 variant as XAMPP/Apache are also running on 32bit - so I deinstalled the Q16 and installed the Q8. Unfortunately with no success.)
Anyone can help me figuring out which php_imagick.dll I need or any other idea what I have to modify so that this works?
I found the answer to basically the same question (and same tech spec). I simply had to download an older version of ImageMagick (ImageMagick-6.7.7-5-Q16-windows-dll).
(By following the linked answer above you can find a link to that version of ImageMagick and a working php_imagick.dll.)
I solve with these: https://github.com/WPN-XM/WPN-XM/issues/222
So I work with:
Win7 (x64)
XAMPP, win32, v3.2.1, VC11 with php 5.6.12
php_imagick-3.1.2-5.6-ts-vc11-x86
ImageMagick-6.9.2-0-Q16-x64-dll

PHP 5.4.16 and FreeTDS (php_dblib.dll): Unable to load extension

Goal
Connect to a MSSQL 2008 R2 server using the FreeTDS (php_dblib.dll 0.82 + 20110906 patches) Drivers for PHP 5.4.16 (VC9).
I am unable to use any alternative to FreeTDS unless the client also decides to use an alternative. This is unlikely unless they also run into this issue when upgrading their current version of PHP (currently 5.3.x) tomorrow.
Issue
PHP is unable to load the FreeTDS extension.
The Apache error log displays this on server start:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_dblib.dll' - The specified module could not be found.\r\n in Unknown on line 0
As far as I understand it, the extension is either unable to be found or is the wrong version?
The extension directory location in the php.ini has been checked and triple checked and is:
c:/wamp/bin/php/php5.4.16/ext/
That leads me to believe it is the wrong version of php_dblib.dll. I've also checked that multiple times and made sure to use the version for PHP 5.4.X Thread Safe.
Steps Taken
Clean install of WAMP 2.4 with PHP 5.4.16 and Apache 2.4.4
Thread Safe php_dblib.dll placed in PHP extension directory
extension=php_dblib.dll added to the correct php.ini
extension=php_mssql.dll and extension=php_pdo_mssql.dll disabled in php.ini
msvcr71.dll (DotNet framework 1.1) added to PHP root directory
freetds.conf added to server root directory (c:)
System Details
WAMP Server 2.4
Apache 2.4.4
PHP 5.4.16 (VC9)
Thread Safety: enabled
FreeTDS Thread Safe (php_dblib.dll) 0.82 + 20110906 patches
Microsoft SQL Server 2008 R2
msvcr71.dll (DotNet framework 1.1) only included in the PHP root directory
EDIT:
WAMP 2.4 32-bit
OS: Windows 7 Pro 64-bit
EDIT 3
Last update only applied to the 64-bit version of WAMP. I've installed the 32-bit version, again, and --without-dblib is no longer in the configure command section of the phpinfo().
Questions
With the information given, is there anything else you'd need to know about to give an accurate assessment of the situation?
I am unable to find any, but are there any known issues with FreeTDS 0.82 and PHP 5.4.16?
Temporary Defeat
I've rolled back to PHP 5.3.x for now, FreeTDS works fine on that version. I'm not sure that it will make a difference with the little bit of code I am actually delivering to the client. This was intended to be a "double" check to make sure it all works perfectly, but since I'll be on site during the install I can fix any issues if they come up.
I would like to find a solution eventually since more and more of the systems I work with every day are going to be upgraded to php 5.4 and beyond.

Apache 2.4.4 issue with PHP 5.5.1

I am having a problem setting up PHP 5.5.1 on Windows 8 Pro under Apache 2.4.4. I have Apache 2.4.4 x86 and I downloaded PHP 5.5.1 x86 VC11 Thread Safe. When I try to load Apache It returns the error:
httpd.exe: Syntax error on line 531 of C:/Apache24/conf/httpd.conf: Cannot load
C:/php/php5apache2_4.dll into server: The specified module could not be found.
I am staring at the file C:\php\php5apache2_4.dll, so I am 100% positive it exists. Now here is the part I don't understand....
When I download PHP 5.4.17 VC9 Thread Safe and unzip, Apache loads and finds the .dll just fine.
Why does PHP 5.4 install perfectly fine, but PHP 5.5 throws the above error. I have tried to install several times and now I am here because I cannot figure it out on my own.
Thanks!
P.S. I originally asked this question on Server Fault, assuming this was a Server Setup related question, but was directed here, even though I've had questions closed over here that were of this nature. Original Server Fault Question: https://serverfault.com/questions/525029/apache-2-4-4-issue-with-php-5-5-1
Any chance you have a x64 version of Apache and a x86 version on PHP ? Or maybe the other way around ?
I think there's some compatibility issue with that dll file.. try some other version of php

Categories