0

I use Ubuntu 18.04.

Command sudo service apache2 restart returns an error.

  kurusa kernel: apache2[17035]: segfault at 7f478cc64e00 ip 00007f4788e13fcf sp 00007ffdb66f0620 error 6 in libphp7.0.so[7f4788bc1000+390000]
  kurusa apachectl[17032]: Segmentation fault (core dumped)
  kurusa apachectl[17032]: Action 'start' failed.

These are some lines from journalctl -xe result:

   kurusa anacron[16951]: Anacron 2.3 started on 2018-12-19
   kurusa anacron[16951]: Normal exit (0 jobs run)
   kurusa wpa_supplicant[1022]: TDLS: Invalid frame - payloadtype=1 category=240 action=10
   kurusa wpa_supplicant[1022]: TDLS: Invalid frame - payloadtype=1 category=240 action=10
   kurusa sudo[17006]:   kurusa : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/ps -f -p 4489
   kurusa sudo[17006]: pam_unix(sudo:session): session opened for user root by (uid=0)
   kurusa sudo[17006]: pam_unix(sudo:session): session closed for user root
   kurusa sudo[17008]:   kurusa : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/ps -f -p 2197
   kurusa sudo[17008]: pam_unix(sudo:session): session opened for user root by (uid=0)
   kurusa sudo[17008]: pam_unix(sudo:session): session closed for user root
   kurusa sudo[17011]:   kurusa : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/kill 2197
   kurusa sudo[17011]: pam_unix(sudo:session): session opened for user root by (uid=0)
   kurusa sudo[17011]: pam_unix(sudo:session): session closed for user root
   kurusa sudo[17021]:   kurusa : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/bin/ps -f -p 4489
   kurusa sudo[17021]: pam_unix(sudo:session): session opened for user root by (uid=0)
   kurusa sudo[17021]: pam_unix(sudo:session): session closed for user root
   kurusa sudo[17026]:   kurusa : TTY=pts/0 ; PWD=/etc ; USER=root ; COMMAND=/usr/sbin/service apache2 restart
   kurusa sudo[17026]: pam_unix(sudo:session): session opened for user root by (uid=0)

Here is my apache2.conf:

DefaultRuntimeDir ${APACHE_RUN_DIR}
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
KeepAliveTimeout 5
MaxKeepAliveRequests 100
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride All
    Require all granted
</Directory>

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<Directory /home/kurusa/proj>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

AccessFileName .htaccess
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>

IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Include /etc/phpmyadmin/apache.conf

Also the command sudo a2dismod php7.0 returned:

ERROR: /etc/apache2/mods-enabled/php7.0.load is not a symbolic link, not deleting

How can I fix this problem?

10
  • 1
    A segmentation fault means a bug in an application, in this case libphp7.0.so. See bugs.php.net/bug.php?id=70380. The default php version for 18.04 is 7.2. Could you specify why and how you installed PHP 7.0? – Melebius Dec 19 '18 at 9:14
  • @Melebius so i just need to install php7.2, enable it and disable 7.0? – Bipa Dec 19 '18 at 9:15
  • I think this might be the same issue: stackoverflow.com/questions/49439812/… – pLumo Dec 19 '18 at 9:16
  • @Racoon I’d definitely try to upgrade to PHP 7.2 if it’s possible. – Melebius Dec 19 '18 at 9:18
  • 1
    Have you the package libapache2-mod-php installed correctly? I guess only one version should appear in mods-enabled at any time. If you want to switch versions, please check askubuntu.com/questions/50344/…. And please edit your question to reflect all the details you posted in comments. It helps to keep our Q&A style tidy and could also bring more attention since an edited question gets bounced on the homepage. – Melebius Dec 19 '18 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.