Why is this error showing up in command prompt? - php

So I was following a tutorial on Youtube on getting starting coding php(https://www.youtube.com/watch?v=OK_JCtrrv-c)And I was told to put "php -v" in the command prompt to ensure php was working. When I typed that in, an error message saying "PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0" Thanks

One of your php packages is outdated. You can try updating your packages however I think it is unlikely that you will run into any problems. Personally I would ignore this warning. Notice that it is only a "warning" rather than an error. This is quite common.

I found the solution to this error on https://www.edopedia.com/
Basically, PHP version 7.4.x requires Microsoft Visual C++ Redistributable for Visual Studio 2019. You can download it from here and then simply install it. After that, try to start Apache. Hopefully, this time it will work without any issues.
If you need a step-by-step guide you can use this article on https://studyopedia.com/
I hope you find this helpful.

Related

Eclipse Juno PHP Tools (PTI) Error

I just found out about PTI (see http://www.phpsrc.org/) but I can't seem to get it to work in Eclipse Juno.
I also have PDT installed, with my PHP Executables, PHP Interpreter, and Execution Environments all set up under my workspace preferences. Each PHP Tools feature I want to use is configured to use the PHP Executable and PEAR library I have set up.
When I try to run any of the tools (PHP CodeSniffer, PHP Copy/Paste Detector, PHP Depend, PHPUnit, or PHPMD), I get an alert that say the following:
'PHP Depend' has encountered a problem.
An internal error occurred during: "PHP Depend".
Details >>
An internal error occurred during: "PHP Depend".
org.eclipse.php.internal.debug.core.launching.PHPLaunchUtilities.getCommandLine(
Lorg/eclipse/debug/core/ILaunchConfiguration;
Ljava/lang/String;
Ljava/lang/String;
Ljava/lang/String;
[Ljava/lang/String;
)[Ljava/lang/String;
Has anyone been able to get this awesome tool to work on Juno? If so, how?
I had the same problem.
Downgrading PDT from version 3.2.1 to 3.0.0 (installed from General Tools of 'Indigo') sorted out the problem for me. It works now fine.
I checked many possible workarounds (begin of path here: internal error occurred during: "PHP CodeSniffer". in zend studio 10.0 ) but just above solution gave results.

Win32Service Extension for PHP 5.4.12

I am currently running PHP 5.4.12 and cannot find a compatible php_win32service.dll to download. All the ones that I have seen seem to be for PHP 5.2/5.3?
When trying to use the dll made for these versions, I get the following error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_win32service.dll' - The specified module could not be found.
It is worth pointing out that I have put the dll in the correct place along with the other extensions!
Please can somebody give me any advice on where to go from here?
Thanks in advance.
Joe
Versions for PHP 5.3, 5.4 and 5.5 can be found at
http://windows.php.net/downloads/pecl/releases/win32service/0.1.0/
This is also a good source for many other Windows PHP extensions:
http://windows.php.net/downloads/pecl/releases/
Complete builds of PHP for Windows with other extensions are regularly published at
http://www.apachelounge.com/viewforum.php?f=6

Getting pspell or any spell checker to work in wamp

I've been trying to install a php spell checker in my version of wamp and it's just not happening.
I've uncommented lines of the php ini, reinstalled wamp with an updated version of php and basically no luck.
At present I get the line.
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'php_pspell.dll' in Unknown on line 0
So looks like I've got the wrong version of pspell in my extensions.
Can someone give me a really easy to follow way to add this in.
I've been trying to get Enchant to work as well.
All to no avail - can someone help.
Thanks
Richard
Seems there haven't been much movement around, right?
Anyway, not sure if you're still looking for a solution here, but I have more or less the same problem. There doesn't seems to be a solution for pspell for PHP 5.3+, but enchant does seem to work.
I have a system that uses pspell for spell checking, and there doesn't seem to be any available version of that file that runs with any version of PHP running in wamp above 5.3 (I think it has to do with the VC version used to compile the system).
Now, regarding the problem you have with enchant, I managed to make it work in wamp just by un commenting the line in php.ini
As there are no indications from your input of what could be wrong, here you have a couple of things you could do to troubleshoot:
After enabling the enchant extension and restarting wamp, create a php file that has only the instruction phpinfo(); on it, and access it through a browser. Search for the string 'enchant' there. that will give you an indication if the extension was loaded or not
If the extension was not loaded, try to run, from a command box, the following line: <%path_to_your_php_exe%>/php.exe -c <%path_to_your_php_ini%>/php.ini -v
When there's a problem with any of the extension you'll get that either as a message in the command line or in a pop up, something that does not happen in wamp (It does happen if you start apache from the command line).
I hope this helps. Good luck.

IIS 7.5 PHP failure "The FastCGI process exited unexpectedly"

I've been attempting to get PHP working with IIS 7.5 and have hit a bit of a roadblock. Whenever I try to load the page I get the following error:
"HTTP Error 500.0 - Internal Server Error
C:\Program Files\PHP\php.exe - The FastCGI process exited unexpectedly"
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP_via_FastCGI
Error Code 0x00000000
Requested URL *http://localhost:80/index.php
Physical Path C:\inetpub\wwwroot\index.php
Logon Method Anonymous
Logon User Anonymous
Failed Request Tracing Log Directory C:\inetpub\logs\FailedReqLogFiles
I've modified the PHP.ini file as required for use with IIS, and have also switched it to verbose mode. There isn't any log fiel in C:\inetpub\logs\FailedReqLogs, and none related to this error in the other log files generated.
I've tried the other fixes I've found here and elsewhere but nothing's been successful so far.
In some detail these were:
re-checking PHP.ini
Setting up fastCGI to work with PHP in IIS (configuring it to load the php.exe)
Trying WinCache as the execution method.
I had this problem when I upgraded PHP 5.4.14 to 5.5.3 (32-bit).
To fix it I had to install the Visual C++ Redistributable for Visual Studio 2012 Update 3
I found out that I needed this DLL by running php --version from the console when my web pages no longer loaded after the upgrade. Which then revealed that I needed the MSVCR110.dll, that comes with the 32-bit VS redistributable update from MS. Since I have optional updates turned off in Window Update, I did not get it automatically.
They also come in different flavors (32-bit, 64-bit, and ARM) 32-bit is what worked for me.
Install the 32 bit of Visual C++ Redistributable for Visual Studio 2012 Update 4
NOT the 64 bit
It seems that there are some dll extension in your php which are not work properly and force the CGI closed. Try to comment every extensions in php.ini file and see whether the error will exist or not.
[EDIT 1]
After some struggles I found out that the IIS is non thread safe web server and all the extension which you want to use in php for IIS should used nts lib for compiling. If the extension compile with thread safe library and add to IIS the IIS would not start. In this case your extension in thread safe(used in apache I guess) and should not add as an extension in IIS
Is this page you're trying to hit doing anything intensive?
I've had this problem before, and the error message was misleading.
You might want to try increasing your memory limit for that particular page. First find out the peak memory usage for that page:
echo memory_get_peak_usage(true);
Then set your memory limit appropriately:
ini_set("memory_limit","1024M");
Hope that helps!
I know its an old thread, but someone might save some headbashing.
In php.ini, changing
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; http://php.net/enable-dl
enable_dl = Off
to
; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; http://php.net/enable-dl
;enable_dl = Off
Having enable_dl = Off doesn't work, commenting out the entire line does.
I had this problem when I was configuring PHP 5.4.17(32-bit).
To fix it I had to install the Visual C++ Redistributable for Visual Studio 2012 Update 4 and it worked fine after installing this update.
As mentioned correctly in above answers it's related to "Visual C++ Redistributable" that's not installed or not installed correctly.
Depending on my expertise on this issue.
1- First take care, each PHP version depends on specific Visual C++ Redistributable version (11,12,14,..)
so first is to check back your PHP version with the notes on the left side of php site:
PHP Download page
search for "Which version do I choose?" then see what version of VC++ is required to you.
2- YOU HAVE TO Download VC 32 and 64 BOTH. and check if your PC has it already so Unistall both of them (for the same version only).
and then install 32 first and 64 after. (no need for any restarts unless it asks).
3- Complete the php installation other steps for iis, apache or ....
I hope it helps you.
if you have two application like (your app, phpmyadmin) just disable APC extension
Hope that fix the issue
it's worked with me
if not just install Microsoft visual C ++ 86 and 64
I have the same problem, which I fixed by installing the 32 bit of Visual C++, redistributable for Visual Studio 2012. 64 bit doesn't work for me.
This may be because required libraries are not available. Run the php-cgi.exe from a command prompt and see if it executes successfully. It should output some HTML if it is working. I was getting a general 0xFFFFFFFF error code - which is not very helpful.
If it instead returns an error, resolve this before continuing.
I had installed the Visual C++ runtimes as indicated, but the minor version was older than the one used to compile the executable and it failed on starting.
After applying a later version of the same runtime, the program ran normally.
Many of the other suggestions talk about this, but fail to provide a simple test. See The FastCGI process exited unexpectedly for a similar question.

Compling PHP from source on Windows 7, fatal error C1900

I am attempting to compile PHP from source on Windows 7 using windows sdk 6.1. I am receiving the following error when running nmake:
fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'
LINK : fatal error LNK1257: code generation failed
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\cl.exe"' : return code '0x2'
Stop.
I have already run repair on Visual Studio 2010 to no avail. How can I fix this?
EDIT: I am compiling the C source not actual PHP code.
Do yo really need to build from source PHP?
I mean, there's no need to build php from source, you can use a package such as XAMPP or WAMP. For practical reason I use XAMPP for PHP projects, because XAMPP runs on both Windows and Linux, so the only thing I need to do is a simple folder installation, then a simple LigHTTPD/Apache configuration and that's it.
But if you really want to compile PHP on Windows, you need to install the distributable version of Visual C++ 2008, I don't know why the 2010 version is not working and not only for PHP but for many other libraries of python and many other things.
Visual Studio 2010 does not natively support PHP code. Are you using Phalanger?

Categories