Windows could not start the apache2.4 service on local computer. Error 2: The system cannot find the file specified - apache

This is my first time trying to use apache server. I was not formally tough how to use apache but i am curious and want to learn. I followed a youtube video on how to install apache. After downloading a few things, i extracted the apache folder to my C: drive. From there i opened my cmd line (Im using windows) and cd to the apache24 bin directory (C:\apache24\bin). I then installed apache server (httpd -k install). In the same directory, i typed httpd -k start to being running the apache software. I opened task manager to see if apache24 was running and it was not. Once i tried to start running apache24 from task manager manually, I got the popup message (windows could not start the apache24 service on local computer. Error 2: The system cannot find the file specified. I'm not sure what this means.

Related

XAMPP Can't Start Apache After Upgrading to PHP7.1.17 "Attempting to start Apache service..."

I have XAMPP installed on Windows 7 virtual machine. My old PHP version was 7.0.9 with Apache 2.4
I needed to upgrade the PHP version to 7.1.x and I set out reading about how to best to this. In end, I settled with the simple plan:
Stop Apache service
Downloaded new PHP version from official php website. For PHP 7 the 7.1.17 version was listed. I downloaded the thread safe version, as my Apache has thread safety enabled.
I extracted the contents of the downloaded archive to a folder.
I copied and replaced all files in the appropriate folders from C:/Server/php with the new php version files from the extracted archive.
I attempted to start Apache from the XAMPP control panel and the server will not start.
The message "Attempting to start Apache service..." just hangs and nothing happens.
The last entry in the error.log file in C:\Server\apache\logs shows the event when the server was stopped and that's it.
When I check the php version from CLI with the command php -v, the console returns installed php version 7.1.17
I tried different suggestions I read from similar questions, like changing ServerName localhost:80 to ServerName localhost:8080 and copying php7apache2.dll to apache/bin ( as suggested here: Upgrading PHP in XAMPP for Windows? ), alas the issue is not fixed and Apache does not start.
Of course, I also restarted the virtual machine, all the same.
At this point, I'm dumbfounded. Don't know what to do.
I need to get Apache running with php 7.1, as it is required by Magento 2.2.4. I do not want to reinstall XAMPP, as this will be a lenghty process with a lot of risk for more things to go wrong.
Any help is much appreciated!
Alright, so after checking Windows Logs > Application in Event Viewer I saw the error ".. the Apache service named is not a valid win32 application". I downloaded the x86 version of PHP from official website PHP for Windows
Then copied and replaced files as described above, and Apache started successfully.
To see if your Apache version is x64 or x86 open command prompt and cd to your Apache bin directory, in my case C:/Server/apache/bin , then run:
file httpd

installing and running Redis and Memcached on Xampp on Windows

I have a Win 10 (Creator edition) PC, running Xampp with Apache and MySQL.
I need to install and run Redis and Memcached (not memcache) on it.
I've looked it up and found out that all I need to do is to enable the existing extensions located in the /xampp/php/ext folder for these components.
So:
I don't have a DLL file for memcached (again, not memcache) there.
(everything I found for this matter is talking about enabling the existing extension, but again - I need memcached and not memcache)
I do have the php_redis.dll file under the /xampp/php/ext folder and I enable it in the php.ini file, but when I run "phpinfo()" in my code, I don't see "redis" in the list of running components there.
What am I missing here and how can I get these two "clowns" to run on my Win-based Xampp system??

apache 2.4 for windows install/run as a service, available for all users

I have downloaded Apache 2.4 for windows, as its zip file I extracted ansd started using. however I need to "install/run as a service, available for all users"
need help to do same.
Thanks in advance.
Extract the .zip file to somewhere like C:\Apache24. Next navigate to C:\Apache24\bin in command prompt.
Then type:
httpd -k install
You can then start Apache as a service by typing:
httpd -k start
You will also be able to control Apache via Services in Administrative tools after restart.
For all users you can install the service using the .msi file. You need to compile (see 'Command Line Build') the source in the .zip you downloaded to produce this file.
Alternatively if you obtain a pre-built .msi you can install from there as well.
Once it's compiled if you install Apache via the installer and select All Users when prompted for who to install for it will install the service for all users.

Unable to start service of Tomcat 7 on Windows 7

I have downloaded Apache tomcat 7 on my laptop.
I run the start up.bat file. Then I check on localhost:8080 and I get that Apache tomcat is successfully running.
Now, I want to start its service, but when I go to services.msc and run Tomcat, it does not run. Moreover, On the command prompt when I do " service.bat install", the result fails.
I actually want to start the service of tomcat.
What should I do ?? Can anyone please guide me, I checked many websites, but the steps are not much clear.
First, I tried with: http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
But unable to do it.
Download the installer .exe file for Tomcat7 in-order to install and run the Tomcat7(32-bit/64-bit Windows Service Installer (pgp, md5, sha1)).
Do not download the Zip file of Tomcat7

Apache Web Development on Cygwin

I'm trying to get an Apache server running on my Cygwin setup to follow the Java Ranch Cattle Drive tutorials online (basically, to learn Java EE web page development that uses a MySQL back end.)
I used the Cygwin Setup program to install httpd (which is how I installed most other dev tools I use on cygwin) and it says install complete, yet when I run 'httpd' it cannot find the command. It also appears the expected install directory (/usr/local/apache...) doesn't exist.
Does anyone have any experience using this setup, and if so, you could walk me through the initial steps of getting the server up and running and getting a browser to display the server's default page?
To keep answers focused, I didn't want to discus the drawbacks of running Apache on a Windows system - this is just for learning purposes. Thanks in advance.
Looking at the Cygwin Package Listing for httpd, you can see that the executable is installed under /usr/sbin.
So, if /usr/sbin is not on your PATH (it isn't on mine, not by default anyhow), you would actually run:
/usr/sbin/httpd
And btw, if you would like to list the files installed for a certain package, you can use cygcheck:
cygcheck -l httpd
cygrunsrv -I Apache -p /usr/sbin/httpd -a "-X"
This will solve the problem. This assumes you already have cyrunsrv set up. The reason httpd fails with cygrunsrv if you leave out the -X is that the process disconnects from the terminal and cygrunsrv considers that a failure. The -X option for httpd is the debug or terminal mode.
I couldn't find any detailed information on how to get Apache working on Cygwin, so here it is if someone's interested:
Install the httpd-* and httpd-mod_* packages you need. Note that the packages named "Apache" are deprecated. You need the ones named "httpd" (which are actually Apache).
Install cygrunsrv (normally this is a default Cygwin package)
Run /usr/bin/cygserver-config as admin. This is needed because Apache requires an IPC server running.
Open services.msc, then go to the CYGWIN Cygserver. Right-click on it and start it. If you don't do this, you'll probably get errors like "AH00023: Couldn't create the proxy mutex".
Finally, start Apache by running /usr/sbin/apachectl restart
Config is in /etc/httpd/.
Some information about running Apache on Cygwin:
http://httpd.apache.org/docs/1.3/cygwin.html
http://www.issociate.de/board/goto/895433/apache2_does_not_start_in_cygwin.html
http://www.cygwin.com/ml/cygwin-apps/2005-02/msg00085.html
Personally, I would recommend installing WAMPServer or other WAMP stack and do it that way. There is no difference, except that you'll need to control Apache through Windows commands [net start, net stop], not Cygwin's ones.