Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

395
Visualizações
apache restart error Segmentation fault: 11 $HTTPD "$@"

I'm new to web development and wanted to create my own local server on mac os Sierra in order to do some development. I've followed a (few) tutorials on getting apache , php and mysql up and running, and have only made it to the php part ,which is where I am failing at the moment.

I managed to access localhost via http://localhost/~username and found my directory there, however once I uncomment the php LoadModule in the httpd.conf my ability to access localhost fails and I am thrown with the error ERR_CONNECTION_REFUSED. This is after I tried to restart apache using

sudo apachectl -k restart

Which threw this error:

httpd not running, trying to start /usr/sbin/apachectl: line 92: 11399 Segmentation fault: 11 $HTTPD "$@"

The error logs from tail -f /var/log/apache2/error_log, had the following to say:

AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist [Mon May 01 19:33:52.138346 2017] [mpm_prefork:notice] [pid 3454] AH00163: Apache/2.4.23 (Unix) PHP/7.1.1 configured -- resuming normal operations [Mon May 01 19:33:52.138434 2017] [core:notice] [pid 3454] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Mon May 01 19:37:22.694456 2017] [mpm_prefork:notice] [pid 3454] AH00169: caught SIGTERM, shutting down AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist [Mon May 01 19:53:54.632167 2017] [mpm_prefork:notice] [pid 4059] AH00163: Apache/2.4.23 (Unix) PHP/7.1.1 configured -- resuming normal operations [Mon May 01 19:53:54.632251 2017] [core:notice] [pid 4059] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' [Mon May 01 20:04:26.379765 2017] [mpm_prefork:notice] [pid 4059] AH00169: caught SIGTERM, shutting down

I've spent several hours looking at similar topics on stackoverflow as well as other sources but to no avail. I am fairly new to all of this as well and thus I'm not overly clued up on a lot of the terminology. From my understanding (whatever little it may be), it may be something to do with a bad module or php7 not linking up properly ?

I am using apache version:

Server version: Apache/2.4.23 (Unix)
Server built:   Aug  8 2016 16:31:34
php version 7.1.1

and configtest gives me the following:

AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist Syntax OK

Any advice would greatly be appreciated. Completely gassed out on what to do next :(

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

The "Segmentation fault" error when starting Apache occurs because Apache tries to load both the old and the new version of php at the same time. Looking at these instructions: https://coolestguidesontheplanet.com/upgrade-php-on-osx/ , the installation script creates a file that loads the new php 7 version in

/etc/apache2/other/+php-osx.conf

The script is also supposed to disable the loading of the old php version by, in the apache configuration file,

/etc/apache2/httpd.conf

commenting out this line:

#LoadModule php5_module libexec/apache2/libphp5.so

but it didn't do that for me. As soon as I commented it out manually, Apache started again using

sudo apachectl -k restart
about 4 years ago · Santiago Trujillo Relatório

0

if you want to create the virtual host on your localhost you should be change the httpd-vhosts.conf , hosts file and httpd.conf for Enable Virtual Host ....

BUT

if only you want to install XAMPP or WAMP , you don't need to change the files , create new folder in htdocs folder(XAMPP) or www folder(WAMP) and type in the addressbar like this : localhost/newfolder

reinstall XAMPP and create new folder project in htdocs folder.

  • Directory htdocs folder : /Applications/XAMPP/xamppfiles/htdocs/(create project folder)

  • Enable Apache and Mysql

  • and type in addressbar firefox or chrome :localhost/projectfoldername

please read this post : https://donatstudios.com/PHP-in-OS-X-Yosemite

Download Xampp : https://www.apachefriends.org/download.html

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda