Xampp Checking for service (name="Apache2.4"): Service not installed - php

I have winwos 10 64. I have xampp installed with php 7. I tried to update to php 8 following these instructions: https://www.learnphponline.in/how-to-upgrade-php-version-7-to-8-in-xampp-php-8-latest-version/
When I check php version on terminal I get
PHP 8.2.1 (cli) (built: Jan 3 2023 23:31:58) (ZTS Visual C++ 2019 x64)
However when I run xampp I get Service not installed and when I try to install I get this window error message: This app cant run on this pc
I guess something got corrupted. I wont to avoid reinstalling xampp completely.
edit:
When I right clik on httpd.exe and run as administator I get the same error "This app cant run on this pc"

Related

Why is website using a different version of PHP to localhost?

I am using Windows 10 and IIS 10 with Visual Studio Community 2017.
When I check the version of PHP running on localhost using http://localhost/phpinfo.php, PHP Version 7.2.7 is displayed.
However, when I use Visual Studio to run phpinfo.php from the root of a site in C:\Users\username\My Documents\My Web Sites\Website1, i.e. http://localhost:4782/phpinfo.php, PHP Version 5.3.28 is displayed.
Can anyone please tell me why Visual Studio is not using PHP version 7.2.7 like the root of localhost is and what I need to do for the website to run on PHP version 7.2.7?
I prefer IIS Manager, to cmd prompt.

PHP (cli) version doesn't match XAMPP version I installed

Recently I installed XAMPP for doing local development on my Windows 7 machine. I honestly didn't think PHP was installed at all before hand. I installed the latest version of XAMPP and configured for php 5.6.24. I created some virtual hosts and everything seemed to work.
I was having an issue and I needed to confirm which version of PHP I was using so I opened up my command line and typed php -v. For some reason it is reporting I'm using PHP 5.4.25. The exact line is PHP 5.4.25 (cli) (built: Feb 5 2014 21:19:58)
I don't recall using this version (I had Visual Studio Community installed recently, is that related?). I don't understand either why my CLI is reporting one version, when XAMPP supposedly installed another version. Am I missing something? I need to run some gpm commands for the latest version of Grav CMS but when I do it says it required at least 5.5.9.
It is possible to have multiple versions of php installed.
You will want to ensure that you are executing the php-cli that came with XAMPP.
It sounds like you have another version of php installed and is in your PATH so that when you run php that version is loaded.
You can use the where command to find out what file is being loaded.
From the terminal type: where php
I am not a windows guy but there is a which command on linux. Apparently this is the command for windows. Here is a SO post about it:
Is there an equivalent of 'which' on the Windows command line?
Anyways, you may want to remove that php file and possibly create a symbolic link in its place for the XAMPP version of php-cli
If you remove/rename the file and the new php-cli is not in your path, you will probably get an error as the system will not know what php is.
The solution to this is to uninstall all the xampp's that are installed and then fresh install xampp with php version > 7.
Everything should work fine then.
What happened to me was that I had installed xampp two times. One
xampp on my C:// (version 5.6) and one xampp on my D:// (version 7.2)
When I did the command on my D:// xampp
php --version
It took the xampp php version from the C:// instead of the D://.

Codeigniter - Setting up cron job, not working

I'm trying to follow the cron job setup as seen in the documentation but I keep running into an issue. In the command line it output all of the markup in the header.php with the following statements at the end:
<h1>An Error Was Encountered</h1>
<p>The MongoDB PECL extension has not been installed or enabled</p>
What I'm typing into the command line:
php index.php tools message
Is there something I need to install on the server? Here are my specs from pecl version.
PEAR Version: 1.9.4
PHP Version: 5.3.10-1ubuntu3.15
Zend Engine Version: 2.3.0
Running on: Linux lucrum 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64
I don't have the rep to add this as a comment so i have to post as an answer. But judging from what you posted the error message is telling you that the MongoDB PECL extension hasn't been installed on your server. Have you checked to see if it actualy is installed? If it is then you need to look into your configuration.

php fails parsing on one machine but not the other

I would ask in Chat, but I don't have enough points yet.
I am trying to migrate a server from a deployed setting to a virtual machine running in virtualbox. All networking works fine in the virtual machine. I have no problem posting the code, but I think it is too large and too many files.
I am completely lost. I have
Installed Ubuntu Server (updated etc)
Installed php, apache, mysql, phpmyadmin, etc
ssh'd into the current server
copied the files using tar -zcvf ./html_files_copy.tar.gz ./html/*
copied mysql stuff using mysqldump -uroot -p --all-databases > db_copy.sql
deployed both the html / php files and the mysql database
No matter what I do though, the server generates a blank page. I have looked into this as much as I can figure out and it seems that php is failing on parsing the php code.
How can I fix this and have the php not fail, and why would it work on one machine and not the other? I can copy the stuff back to the old server and it WORKS!? Mysql tables look EXACTLY the same too.
Does it make sense that the completely blank page (debug info is turned on, not sure why it doesn't say anything) is a parsing error caused by the newer PHP not knowing one version older functions anymore?
Is there a list somewhere I can use to search the code for suspect functions?
To get the following info I used phpinfo() in a php file, lsb_release -a and uname -a from terminal using ssh
- New Server
PHP Version 5.5.9-1ubuntu4.5 with Apache/2.4.7
Ubuntu 14.04.01
mysql Client API version 5.5.40
Linux ubuntu 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
- Old Server
PHP Version
5.5.9-1ubuntu4.4, with Apache/2.4.7
on Ubuntu 14.04
mysql Client API version 5.5.40
Linux linuxdesk 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Check the PHP log-file or enable error display using the display_errors flag. Also enable logging of all errors: error_reporting(E_ALL); and verify these settings with phpinfo().

installing PHP 5.5.15 on Windows Server 2008 r2 64bit

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.

Categories