I just upgraded my OS to Windows 10 and I have an atypical problem.
I use WAMP server and PHP doesn't work, although no error is displayed anywhere.
I tried to update vcredist or to change ports, but the problem persists.
Windows 10 does not come with all the older MSVC Runtimes installed.
You will also have to install any of these that are missing.
Microsoft Visual C/C++ Redistributable 2008 (VC9)
32bit /
64bit
Microsoft Visual C/C++ Redistributable 2010 (VC10)
32bit /
64bit
Microsoft Visual C/C++ Redistributable 2012 (VC11)
32bit & 64bit selectable on this page
Microsoft Visual C/C++ Redistributable 2013 (VC13)
32bit & 64bit selectable on this page
Microsoft Visual C/C++ Redistributable 2015 Update 1 (VC14)
32bit & 64bit selectable on this page
VC15 Redistribuable (Visual C++ 2017)
Visual C++ Redistributable Packages for Visual Studio 2017 x86
Visual C++ Redistributable Packages for Visual Studio 2017 x64
VC2017 (VC15) is backward compatible to VC2015 (VC14). That means, a VC14 module can be used inside a VC15 binary. Because this compatibility the version number of the Redistributable is 14.1x.xx and after you install the Redistributable VC2017, VC2015 is removed but you can still use VC14.
UPDATE April 2017
Most of the MSVC runtimes are now available from this microsoft page
Which versions of the above you actually need to run WAMPServer, or rather Aapche, will depend upon the version of WAMPServer you are running, but installing all of them can do no harm as they are used by any software that has been compiled with the Microsoft compilers.
If you are using WAMPServer 64bit on Windows 10 64bit, you will need to install BOTH the 32 and 64bit versions of these libraries.
After you have checked you have all the runtime libraries, you may also need to re-install the Apache and MYSQL services as the upgrade to Windows 10 unfortunately sometimes (pretty much always) misses the fact that you have 2 services running that should be replaced after the upgrade i.e. wampapache and wampmysqld
All you need to do is, using the wampmanager menus system do this :
left click wampmanager -> Apache -> Services -> Install Service
left click wampmanager -> MySQL -> Services -> Install Service
Then
left click wampmanager -> Start All Services
Additional info
Also remember that for PHP to be interpreted, the code must exist in a file with a .php extension. If you are using notepad as an editor, that will add a .txt to a filename, so if you save tst.php it will actually get saved as tst.php.txt and therefore will not run. Get a decent editor notepad++ will do a great job and is free.
Also files with the .html or .htm that contain php code will not execute the php code as these files are not passed to the PHP interpreter, because they dont have the .php extension.
Using Explorer
Dont double click on the script file name in Windows Explorer. This works to test pure HTML pages, or HTML + Javascript pages, but it does not work if the page has PHP code in it However doing this does not go via Apache, and it is Apache that see's the <?php tags and therefore know to pass this code to the PHP interpreter.
You must enter the script file name into the browser address bar, as if it were a real web site, because of course it is
For example localhost/project1/test.php
I faced the problem and solved it by installing
Microsoft Visual C/C++ Redistributable 2010 (VC10), both 32bit / 64bit as 2008 and 2012 were already installed.
My configuration: windows 10 64 bit, wampserver 64 bit.
One of the problem could be Skype running at the time you want to start your server, so you can
Stop SKYPE because SKYPE utilize port 80 and server wants to use same port.
Go to httpd.conf file and change the Port number from 80 to 8000/8080.
-Left click Apache icon,
-Go to Apache and open httpd.conf file,
-Search and replace port 80 to 8000 / 8080
-Save & close,
-Restart the server again.
Update: Wamp working with Windows 10 in 2020
You can try this, I done the following things.
Install msvcp140.dll
Install Microsoft Visual C/C++ Redistributable
Install wamp server
Close Skype (Chat App) if it is running
But wamp icon did not change its color to orange to green. (turning wamp icon orange to green means it start working). I installed wamp multiple time to make it color orange to green but it still show orange color. But actually, behind the scene it was working I checked it in browser by URL: http://localhost/phpmyadmin/
Related
[EVERYTHING WORKS NOW!]
MY SOLUTION:
The first mistake i made, was simply, that i had some random 32bit version of PHP installed, and some random 64bit version of Apache! After that, i just downloaded the latest version of PHP, and put it in my c:\php folder, THEN downloaded the LATEST version of the VC14 version of Apache, from the apachelounge website (VC14 category on the left side on the website). And the last mistake was, that i had the W3SVC from IIS still running, so i stopped that one under services (search in windows for services.msc)! And yeah, thats it, all solved now!
So, i have a problem, i installed Apache recently, and set up a working webserver!
This all worked fine, my whole website works flawlessly, and its fully usable!
BUT, all of my php scripts did NOT work, when loading one on the website, apache just show the entire source code of the .php file, instead of displaying it like an html page!
So, i noticed, i do not have PHP configured with my apache server!
What i then did, was download php, put it in c:\php, configure the php.ini, and all of that works, i know because in IIS 10, my website worked perfectly fine with PHP!
so i installed php, for apache 2.4, the VS11 version, the same goes for apache, (i did that because the latest versions of both did not work for me, i had the same problem)!
and as soon as i do the last step,
add these lines to my httpd.conf (inside my apache folder):
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir " C:/php"
, when i want to start the apache server, it just tells me this:
"The requested operation has failed."
(this happens when i select the service of my server in the Apache-Monitor, and click on "start)
(NO error log is beeing created from apache, nothing inside the error nor log folder (both configure in the httpd.conf))
only CMD gives me the following erro:
httpd: Syntax error on line 533 of C:/Apache24/conf/httpd.conf: Cannot
load c:/php/php5apache2_4.dll into server: %1 is not a valid Win32
application.
Now, as soon as i remove these 3 lines from my httpd.conf, the server works perfectly fine again, can be started, and the website is usable, except, all php pages do not work(of course).
i heard something about a "libphp5.so", i do not know if it has anything to do with neither my apache server, nor my whole problem, but i don't know, atleast i have no such thing in my "C:\Apache24" folder!
SOME INFORMATION THAT MIGHT BE IMPORTANT:
All this is hosted from a normal PC (Windows 10) (64 Bit), 32GB RAM, 8x4GHz processor etc..!
yes, i have added c:\php to my Path environment variable! (as said before, all is working if i do not add these lines, which according to google results, are necessary to get php to work with apache)!
If anyone knows what to do, id be so glad, because i do not want to keep using IIS (its good but..), as i could do definitely more with Apache!
Read the manual carefully. Reinstall apache and use PHP 5.6. unless you are ready to fix issues that come with PHP 7.1. Notice Do NOT use VC11+ versions of PHP with the apache.org binaries. This is taken from PHP.net
Apache:
Please use the Apache builds provided by Apache Lounge. They
provide VC11, VC14 and VC15 builds of Apache for x86 and x64. We use
their binaries to build the Apache SAPIs.
If you are using PHP as module with Apache builds from apache.org (not
recommended) you need to use the older VC6 versions of PHP compiled
with the legacy Visual Studio 6 compiler. Do NOT use VC11+ versions of
PHP with the apache.org binaries.
With Apache you have to use the Thread Safe (TS) versions of PHP.
VC11, VC14 & VC15 More recent versions of PHP are built with VC11,
VC14 or VC15 (Visual Studio 2012, 2015 or 2017 compiler respectively)
and include improvements in performance and stability.
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed
The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
TS and NTS TS refers to multithread capable builds. NTS refers to
single thread only builds. Use case for TS binaries involves
interaction with a multithreaded SAPI and PHP loaded as a module into
a web server. For NTS binaries the widespread use case is interaction
with a web server through the FastCGI protocol, utilizing no
multithreading (but also for example CLI).
Source: PHP.NET Manual
Make sure Apache2 and PHP binaries have the same:
Visual Studio C++ binary compatibility version
(Visual Studio C++ 2015 = VC14, Visual Studio C++ 2017 = VC15)
system architecture: 32bit(win32) / 64bit(win64)
for example:
php-7.3.15RC1-Win32-VC15-x86
be sure u have:
httpd-2.4.41-win32-VC15
best place to download Apache 2 binaries for Windows is Apache Lounge
(on Top Left corner you control the VC version):
https://www.apachelounge.com/download/VC15/
and to download PHP binaries also mind that with Apache you have to use the Thread Safe (TS) versions of PHP. go here:
https://windows.php.net/qa/
do not forget to add (System Variables) PATH for php,
open cmd As Administrator and type:
setx path "%PATH%, C:\php73" /M
Apache won't start in WAMP3 (Windows 10), and I couldn't find any answer here or elsewhere that fixed the problem. So far I've tried the following:
check if port 80 was in use (see image 1)
check if world wide web services were turned on in windows (see image 2)
check "httpd.exe -t" - result "syntax OK"
I have restarted my computer and wamp several times with no success
Any other suggestions?
Image of the problem:
Image 1:
Image 2:
Here is the Dialog that you are supposed to read and act upon when installing WAMPServer 3
--- Installation of Wampserver ---
BEFORE proceeding with the installation of Wampserver, you must ensure that certain elements are installed on your system, otherwise Wampserver will absolutely not run, and in addition, the installation will be faulty and you need to remove Wampserver BEFORE installing the elements that were missing.
Make sure you are "up to date" in the redistributable packages VC9, VC10, VC11, VC13 and VC14
See --- Visual C++ Packages below.
Do not install Wampserver OVER an existing version, follow the advice:
-- Installing a new version of Wampserver: http://forum.wampserver.com/read.php?2,123606
If you install Wampserver over an existing version, not only it will not work, but you risk losing your existing databases.
Install Wampserver in a folder at the root of a disk, for example C:\wamp or D:\wamp. Use an installation path that does not include spaces or diacritics; Therefore, no installation in c:\Program Files\ or C:\ Program Files (x86)\
You must BEFORE installing, disable or close some applications:
Close Skype or force not to use port 80
--Item No. 04 of the Wampserver TROUBLESHOOTING TIPS:
Disable IIS
Item No. 08 of the Wampserver TROUBLESHOOTING TIPS:
If these prerequisites are not in place, Press the Cancel button to cancel the installation, then apply the prerequisites and restart the installation.
--- Visual C++ Packages ---
The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11.
Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17
VC9 Packages (Visual C++ 2008 SP1)
http://www.microsoft.com/en-us/download/details.aspx?id=5582
http://www.microsoft.com/en-us/download/details.aspx?id=2092
VC10 Packages (Visual C++ 2010 SP1)
http://www.microsoft.com/en-us/download/details.aspx?id=8328
http://www.microsoft.com/en-us/download/details.aspx?id=13523
VC11 Packages (Visual C++ 2012 Update 4)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=30679
VC13 Packages] (Visual C++ 2013[)
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: https://www.microsoft.com/en-us/download/details.aspx?id=40784
VC14 Packages (Visual C++ 2015)
The two files vcredist_x86.exe and vcredist_x64.exe to be download are on the same page:
http://www.microsoft.com/fr-fr/download/details.aspx?id=48145
If you have a 64-bit Windows, you must install both 32 and 64bit versions, even if you do not use Wampserver 64 bit.
This is item number 20 of TROUBLESHOOTING TIPS of Wampserver: http://forum.wampserver.com/read.php?2,134915
You should also remember that WAMPServer must be installed As an Administrator and should also be run As an Administrator
I am trying to connect php in apache(xampp v5.6.8) to ms sql server 2012..it keeps giving me the error
'The program can't start because MSVCP110.dll is missing from the
computer. Try reinstalling the program to fix this problem'.
l downloaded and installed the visual c++ re-distributable for visual studio and located the MSVCP110.dll in my xampp php folder. It still gives the same error. Please can someone help.
Let me start by saying that non-PHP DLLs should not reside in PHP directory. They belong in either program's or system's directory.
Make sure you installed the right version of Visual C++ Redistributable for Visual Studio 2012 Update 4, be it 32bit or 64bit. You can try copying that DLL to either System32 or SysWoW64 (depends on your system version) directory of windows on your own risk.
UPDATE:
From your comment I learned that your system is 64bit. The fact that you found that DLL in System32 tells us that you installed 64bit Visual C++ Redistributables.
If your XAMPP is 32bit you should install additionally the same Visual C++ Redistributable for Visual Studio 2012 Update 4 but 32bit so your system has both of them, for 32bit and 64bit apps.
32bit applications don't use 64bit libraries. That should solve your problem.
I have installed WampServer 2.2 on Windows 8.1.
When I try to start WampServer, it shows the following error:
The program can't start because MVSCR110.dll is missing from your computer.
How can I fix this?
MVSCR110.dll references to the Visual C++ 2012 Redistributable, of which you do not have.
The Visual C++ 2012 Redistributable is required for Apache to run. The reason why your Wamp installation is not going online is because Apache is unable to start.
A forum post on the WAMP Server forums deals with this problem with an earlier version of Wamp, to quote:
For Windows 32 : Be sure that you have installed the Visual C++ 2012
SP1 Redistributable Package x86 : VC12 SP1 vcredist_x86.exe
For Windows 64 : Be sure that you have installed the Visual C++ 2012
SP1 Redistributable Package x64 : VC12 SP1 vcredist_x64.exe
Apache will not run without this component
In fact if you are running the 64bit Windows it is a good idea to
install all the 32bit libraries as well as the 64bit ones. After all
64bit windows runs 64 and 32 bit code. You will probably find you need
at least one of the 32bit runtimes for some app/utility you will
install at some point.
Some users have also said that installing the Redistributable for their processor type isn't enough, so it may be a good idea to install both x64 and x86 versions.
WampServer versions b and later require the VC++ 2012 version, which can be downloaded here.
As far as I remember Windows 8.1 comes (out of the box, so to speak) with only one of Microsofts Visual C++ runtimes installed.
It seems a little odd that you are getting the message you claim if you are in fact using WAMPServer 2.2(a,c,d,or e)
The program can't start because MVSCR110.dll is missing from your
computer.
As as far as I am aware nothing delivered by any of the WAMPServer 2.2 releases i.e. 2.2a, 2.2c, 2.2d, 2.2e were compiled with MSVC 2012. In fact as stated on the download pages on SourceForge
Attention : All the components of the v2.2 WampServer stack have been compiled with VC9 version of Microsoft compiler. Earlier versions of Wampserver have been made with VC6 version of Microsoft compiler. So, You can't mix components of 2.2 stack with previous version of Wampserver Stack components. If you do it you will get an instable Wampserver.
However, if that is in fact the error you are getting after installing WAMPServer 2.2, then that message is saying that you need to install the MSVC 2012 runtime library.
Which can be downloaded from here.
You will also need to make sure that you have the MSVC 2008 runtime library installed as well, as wampmanager.exe is an old program as has not needed to be recompiled for a while now which can be downloaded from here
This runtime will also be required to run Apache and MySQL executables if you did in fact install WAMPServer 2.2.something
Oh and if you are using a 64bit WAMPServer, you will need to download and install the 32bit AND the 64bit version of the MSVC 2008 runtime library, as wampmanager.exe is a 32bit program even if you have installed the 64bit version of WAMPServer and of course the Apache and MySQL will need the 64bit libraries.
If this does not fix your issue, then have a look at the Windows Event Log
Windows Key + R to launch the run dialog then enter eventvwr.exe and press the OK button
- On the left side of the windows click 'Windows Logs -> Applications'
- Look for the names 'Apache' or 'MySQL' in the 'Source' column which have a error symbol in the first column.
The error messages sent here are normally very descriptive and should at least point you in the right direction to solving your problem.
when you migrate to windows 8.1, MVSCR110.dll is outdated. then, it should be updated and installed into your PC again.
I am trying to install PHP 5 on a Windows Server 2003 environment with IIS 6
After installing PHP, and making the necessary changes in IIS, I get the following error
%1 is not a valid Win32 application.
The server is not 64bit, it is 32bit. I have added the FastCGI
handler in Web Service Extensions,
I have added the PHP handler in
Web Service Extensions, I have also gone to "Web Sites Properties"
and clicked on Configuration: and set the appropriate mappings,
I've installed the reditrubition files as required by Microsoft...
I cannot for the life of me work out why it is not working.
Can someone please help?!
Finally got my installation working by installing the correct corresponding versions and dependencies. I hope this helps.
On IIS 6
PHP 5.4
VC9 x86 or x64
WinCache 1.3 for PHP 5.4
On IIS 7
PHP 5.5
VC11 x86 or x64
WinCache 1.3 for PHP 5.5
Try running PHP directly from command line to see if you receive the same error. If it is, the issue may be that a dependency cannot be found. PHP has a dependency on the Visual C++ Redistributable - from http://windows.php.net/download/ :
The VC9 builds require you to have the Visual C++ Redistributable for Visual Studio 2008 SP1 x86 or x64 installed.
The VC11 builds require to have the Visual C++ Redistributable for Visual Studio 2012 x86 or x64 installed.
if this doesn't help, run the Microsoft utility Depends.exe from http://www.dependencywalker.com/ to find out what might be the issue.
in System Properties > Environment Variables click on new in variable name = path and variable value = C:\wamp\bin\php\php5.3.13; and click on ok > ok > ok
click on run type cmd
in cmd type php
if you get up error in cmd type cd c:\ and enter now type php
I have faced the same issue on standalone Apache+PHP setup on Windows 10. Definitely the problem was in two different PHPs in the environment variable PATH (IIS distro and standalone distro). Removing the PHP for IIS from the PATH resolved the problem.
Unfortunately PHP only goes as far as 5.4 on Windows 2003. They officially dropped support for Windows XP and 2003 starting PHP 5.5.0.
http://windows.php.net
Here you can find PHP for older Windows systems: PHP 5.5.7, 5.4.23, 5.3.28 (x86/x64) available
Following binaries are available:
php-5.5.7-nts-Win32-VC11-x86.zip
php-5.5.7-Win32-VC11-x86.zip
php-5.5.7-nts-Win32-VC11-x64.zip
php-5.5.7-Win32-VC11-x64.zip
php-5.4.23-nts-Win32-VC9-x86.zip
php-5.4.23-Win32-VC9-x86.zip
php-5.4.23-nts-Win32-VC9-x64.zip
php-5.4.23-Win32-VC9-x64.zip
php-5.3.28-nts-Win32-VC9-x86.zip
php-5.3.28-Win32-VC9-x86.zip
php-5.3.28-nts-Win32-VC9-x64.zip
php-5.3.28-Win32-VC9-x64.zip
For "FastCGI" on Windows Server 2003, you should choose php-5.4.23-nts-Win32-VC9-x86.zip.