Installing localhost and having errors - php

Alright, when I go to install Apache 24 by command prompt with this code going into it's bin.
httpd.exe -k install
then I run httpd.exe
I get this error.
AH00558: httpd.exe: Could not reliably determine the server's fully qualified do
main name, using fe80::d939:4e4:4915:276. Set the 'ServerName' directive globall
y to suppress this message
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
and then I pinged my port that is using 80. I get the PID of 4 which is my system with a description of NT Kernel & System.
Anyway I can fix this?

you could try to run command prompt as administrator

The port 80 is already used and when you try to modify it in the file conf/httpd.conf nothing changes. My mistake was that I assumed that the install folder is the one I have chosen to use via installation. If you go to services and find the Apache service and check the path to executable, you will see that it is not pointing to the folder that you thought you have installed it on. However, if you change the line "Listen 80" to "Listen 8080' in the httpd.conf file from the folder taken from the service path, it will most likely allow you to start the service.

Related

Apache in Ampps doen's start after installing Laravel (Mac)

I've been using Ampps with no problem until I installed Laravel.
Once I did, Apache in Ampps doesn't start. I suppose it's a conflict on port 80 but I don't know how to solve it.
When I execute:
sudo /Applications/AMPPS/apache/bin/httpd
I get:
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Any ideas?
This was exactly what happened to me and #anexo answer solved the issue.
For some reasons though, the Terminal requires a root access.
Incase anyone have issue with that, just use:
sudo apachectl stop
This would prompt for your password, after which it would complete the operation.
NB: I couldn't add this as comment to #anexo answer due to low rep.
I got it!
When you serve apache through laravel:
php artisan serve
Ctrl + C doesn't kill. You need to kill it through:
apachectl stop
or
/etc/init.d/http stop
Hope someone finds this useful

WAMP in Windows 8 (64 bit) doesn't work

I've installed wampserver. Yet it is always as a red tray icon.
Icon tooltip msg: local server - None of 2 services running.
Port 80 is not occupied; checked with Apache ► Service ► Test port 80:
Warning: chmod(): Permission denied in C:\wamp\scripts\config.inc.php on line 68
Impossible to modify the file C:\WINDOWS\system32\drivers\etc\hosts to be writab
le
The file C:\WINDOWS\system32\drivers\etc\hosts is not writable
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Port 80 is not found associated with TCP protocol
Test for TCPv6
Port 80 is not found associated with TCP protocol
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is not actually used.
Apache ► Service administration ► Install Service issues in a cmd window:
pressing Enter shuts the window down, nothing happens. Waiting gives no profit either.
What's wrong?
Update
Had attempts to change port number for Apache (both to 81 and to 8080) in httpd.conf:
Listen 0.0.0.0:8080
Listen [::0]:8080
ServerName localhost:8080
Checked whether IIS is runnig => No!
.
Doesn't help.
I had the same problem, and the solution was too simple:
"Run it as Administrator."
Without changing port or other additional configuration ...
You can do it by right clicking on the program icon and in the menu that appears, select the option "Run as administrator".
It is also possible to automate this process, by right clicking on the program icon and selecting "Properties".
Once the properties window is open, we go to the "Compatibility" tab. In the "Configuration" area we mark the option "Run this program as administrator".
Then we will click on "Apply" and then on "OK".
Ready! From now on, every time we run the program it will do so in administrator mode.
(Today, May 8, 2019, I see that #riggsfolly has responded in a comment much earlier than me. My recognition.)
I had same problem, tried change port and so on, but finally I installed older version (2.5 I think) and it works without any change of setting.
I think that IIS in install your windows
Change your port on httpd.conf
for example 81
Listen 0.0.0.0:80
Listen [::0]:80
ServerName localhost:80
to
Listen 0.0.0.0:81
Listen [::0]:81
ServerName localhost:81
and restart apache service
Open the httpd.exe in administration manually. The file is in wamp64\bin\apache\apache2.4.23\bin\. Then it works.
You can try this
Uninstall the wamp server
Click on the downloaded wamp file , and select Run as Administrator
Read and follow the Information Window that will pop up after one or two steps
Complete the installation
Still ? Check out http://forum.wampserver.com/read.php?2,134915
It can happen because of one of the three reasons:-
1) Missing VC++ installation: Install All versions of VC++ redistribution packages VC9, VC10, VC11, VC13, VC14 and VC15.. If you have a 64-bit Windows, you must install both 32 and 64bit versions of each VisualC++ package, even if you do not use Wampserver 64 bit.
2) You forgot to provide Admin Privileges to WAMP Server : Launch and Install with the "Run as administrator" option, very important.
3) WAMP, IIS and Skype fighting over same port :
Close Skype or force not to use port 80: http://forum.wampserver.com/read.php?2,134915
Disable IIS: http://forum.wampserver.com/read.php?2,134915

Apache 2 error and phpmyadmin not working after installation on Ubuntu 14.04

I installed PHPMyAdmin via apt-get on my Ubuntu and I set the directory in apache2.conf, but when starting the server, nothing happens when http://127.0.0.1/phpmyadmin access and the following message appears I my console:
juninho-desktop:~$ /etc/init.d/apache2 restart
* Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
[fail]
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
This is my /etc/apache2/apache2.conf file:
http://pastebin.com/yafW00S6
you could type:
netstat -lnptu
in your terminal. Then look for a programm that is blocking the Port 80.
This programm needs to be closed or must use another port :)
Permission problems, try to restart apache2 using root priviliges:
sudo /etc/init.d/apache2 restart

Welcome to Nginx In Danginx

I have a VPS with CentOS and DirectAdmin installed.
This VPS only have one site with WordPress CMS but Apache have very usage of 1 GB Ram.
for this i buy license and install Danginx plugin.after installing dangnix, my site and IP only show "Welcome to Nginx" text and every other files show 404 error page.
after many Google searchs, everyone says install new ioncube loader but i installed this before Dangnix installation and more than 2 time reinstall.
php -v command also show ioncube loader has installed but my site still show Welcome text.
when i restart apache with service httpd restart command show this error :
NameVirtualHost 79.127.127.143:8888 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
after many edits now this command show only "NameVirtualHost 79.127.127.143:8888 has no VirtualHosts" error.
Sorry for my bad english.
Thanks.
I think your problem is that it is port 8888. If you go to your website, default port is 80. Nginx only shows the message "Welcome to Nginx" if the port is not getting anywhere, so this is a configuration problem in Nginx.

Could not run socket server

First thing, I could see out there has already solved questions around the problem.
PHP web socket unable to bind socket
Issue in setting the socket server
socket_bind(): unable to bind address [99] (Ubuntu on Amazon EC2)
and many other resources, all of them said that problem is in-used port or external IP,
etc.
But I could not get over it.
My server is running on CentOS 6.3 and using CPanel (it is the HP server https://www.hpcloud.com/).
The web socket demo source code what I get is on https://code.google.com/p/phpwebsocket/
My setting is
$master = WebSocket("127.0.0.1",4444); // even I tried with localhost, they worked same
Here is the step what I tried and the corresponding errors:
1/. I tried following commands to ensure a port which I was using is available to use
$ lsof|grep 4444
$ netstat -a -p -n
But I always got the error although this port 4444 is free
Warning: socket_bind(): unable to bind
address [98]: Address already in use in
/home/myapp/public_html/websocket/server.php on line 60
2/. The strange thing is when I checked the port 835 which was using by
crond 1621 root DEL REG 252,1 39835 /lib64/libpam.so.0.82.2.#prelink#.B1eyGx
atd 1633 root DEL REG 252,1 39835 /lib64/libpam.so.0.82.2.#prelink#.B1eyGx
The funny thing happened:
Then I ran the server.php on my terminal command shell
php /home/myapp/public_html/websocket/server.php
the error has gone, instead of it is
Server Started : 2013-08-16 03:19:54
Master socket : Resource id #4
Listening on : 127.0.0.1 port 835
I thought that it started working, but actually it did not, because when I open server.php by the browser with URL
http://mysite/server.php
The error is "permission denined"
Warning: socket_bind() [function.socket-bind]: unable to bind address
[13]: Permission denied in
/home/myapp/public_html/websocket/server.php on line 60
socket_bind() failed
Edited: About permission, I could open the client.html in same level directory with server.php without problem.
The folder code permission is 755 and user is not root.
All of my commands was implemented under root privilege
Any help is greatly appreciated :(
I would assume that the problem is that you are attempting to load the Websocket server in your webbrowser. Most likely, there are security settings for the apache user that does not allow your server to listen on uncommon ports.
CentOS usually ships with SELinux enabled by default. Part of CentOS Linux's security policies for Apache are that by default, Apache will only allow services access to recognized ports associated with HTTP (ie, port 80, 8080 etc).
With SELinux enabled, you could allow Apache to listen on tcp port 4444 by adding a rule to allow that inside SELinux using the 'semanage' command:
~$ semanage port -a -t http_port_t -p tcp 4444

Categories