Ubuntu 14.04 服务器:phpMyAdmin 的 Apache2 问题
Posted
技术标签:
【中文标题】Ubuntu 14.04 服务器:phpMyAdmin 的 Apache2 问题【英文标题】:Ubuntu 14.04 Server: Apache2 issue with phpMyAdmin 【发布时间】:2016-11-21 03:51:44 【问题描述】:我已经安装了 Apache 2,它运行良好。我已经安装了 php 7,一切正常,但是当我安装 phpMyAdmin 时,Apache 2 停止工作。在检查 Apache 2 时,它甚至不加载默认页面。
当我重新启动 Apache 2 时,出现以下错误:
root@ip-172-31-30-202:~# service apache2 restart
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
Segmentation fault (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.
错误日志有:
[Mon Jul 18 12:54:10.668017 2016] [mpm_event:notice] [pid 13665:tid 140077033654144] AH00489: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 12:54:10.668089 2016] [core:notice] [pid 13665:tid 140077033654144] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 12:54:23.642421 2016] [mpm_event:notice] [pid 13665:tid 140077033654144] AH00491: caught SIGTERM, shutting down
[Mon Jul 18 12:54:24.689367 2016] [mpm_prefork:notice] [pid 14802] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 12:54:24.689425 2016] [core:notice] [pid 14802] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 12:54:25.869852 2016] [mpm_prefork:notice] [pid 14802] AH00169: caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xml.so' - /usr/lib/php/20151012/xml.so: cannot open shared object file: No such file o$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/dom.so' - /usr/lib/php/20151012/dom.so: cannot open shared object file: No such file o$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/simplexml.so' - /usr/lib/php/20151012/simplexml.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/wddx.so' - /usr/lib/php/20151012/wddx.so: cannot open shared object file: No such file$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xmlreader.so' - /usr/lib/php/20151012/xmlreader.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xmlwriter.so' - /usr/lib/php/20151012/xmlwriter.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xsl.so' - /usr/lib/php/20151012/xsl.so: cannot open shared object file: No such file o$
[Mon Jul 18 12:54:26.942086 2016] [mpm_prefork:notice] [pid 14888] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 12:54:26.942120 2016] [core:notice] [pid 14888] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 12:55:36.014664 2016] [:error] [pid 14891] [client 103.255.6.72:60140] script '/var/www/html/info1.php' not found or unable to stat
[Mon Jul 18 12:56:38.672883 2016] [mpm_prefork:notice] [pid 14888] AH00169: caught SIGTERM, shutting down
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xml.so' - /usr/lib/php/20151012/xml.so: cannot open shared object file: No such file o$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/dom.so' - /usr/lib/php/20151012/dom.so: cannot open shared object file: No such file o$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/simplexml.so' - /usr/lib/php/20151012/simplexml.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/wddx.so' - /usr/lib/php/20151012/wddx.so: cannot open shared object file: No such file$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xmlreader.so' - /usr/lib/php/20151012/xmlreader.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xmlwriter.so' - /usr/lib/php/20151012/xmlwriter.so: cannot open shared object file: No$
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/xsl.so' - /usr/lib/php/20151012/xsl.so: cannot open shared object file: No such file o$
[Mon Jul 18 12:56:39.724500 2016] [mpm_prefork:notice] [pid 14954] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 12:56:39.724533 2016] [core:notice] [pid 14954] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 12:57:41.945362 2016] [mpm_prefork:notice] [pid 14954] AH00171: Graceful restart requested, doing restart
[Mon Jul 18 12:57:42.017483 2016] [mpm_prefork:notice] [pid 14954] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 12:57:42.017497 2016] [core:notice] [pid 14954] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 12:57:42.610599 2016] [mpm_prefork:notice] [pid 14954] AH00169: caught SIGTERM, shutting down
[Mon Jul 18 13:02:11.030749 2016] [mpm_prefork:notice] [pid 20227] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 13:02:11.030808 2016] [core:notice] [pid 20227] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 13:05:14.256971 2016] [mpm_prefork:notice] [pid 20227] AH00169: caught SIGTERM, shutting down
[Mon Jul 18 13:05:34.584056 2016] [mpm_prefork:notice] [pid 21762] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 13:05:34.584096 2016] [core:notice] [pid 21762] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 13:08:45.103877 2016] [mpm_prefork:notice] [pid 21762] AH00171: Graceful restart requested, doing restart
[Mon Jul 18 13:08:45.197300 2016] [mpm_prefork:notice] [pid 21762] AH00163: Apache/2.4.7 (Ubuntu) configured -- resuming normal operations
[Mon Jul 18 13:08:45.197313 2016] [core:notice] [pid 21762] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 18 13:08:45.779038 2016] [mpm_prefork:notice] [pid 21762] AH00169: caught SIGTERM, shutting down
我正在使用Ubuntu 14.04 (Trusty Tahr)。
【问题讨论】:
您应该检查错误日志。转到 /var/log/apache2/error.log 【参考方案1】:这对我有用:
cd /etc/apache2/mods-enabled
rm php5.conf
rm php5.load
sudo service apache2 start;
成功了:))))))
另请参阅apache2 segfault after update。
【讨论】:
我不知道如何或为什么,但你的解决方案也对我有用。 我尝试在已经安装 PHP 7.1 的情况下安装 phpmyadmin,然后它尝试用 php5 做一些奇怪的事情 :( 这个解决方案对我有用。 为我工作,你拯救了我的一天 :) :) 像魅力一样工作。感谢您让我不必再重新配置整个服务器的麻烦:D 我也不知道为什么,但这个解决方案也对我有用,哇,你的救命稻草!【参考方案2】:Apache 默认不转储内核。看看http://www.omh.cc/blog/2008/mar/6/fixing-apache-segmentation-faults-caused-php/。
【讨论】:
【参考方案3】:在终端中运行这些命令:
vim /etc/apache2/apache2.conf
将以下内容添加到文件底部:
# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf
然后重启Apache:
sudo service apache2 restart
【讨论】:
【参考方案4】:通过卸载 Apache 2 解决了这个问题:
sudo apt-get purge apache2
我安装了phpMyAdmin:
sudo apt-get -y install phpmyadmin
然后我安装了apache2
:
sudo apt-get install apache2
【讨论】:
以上是关于Ubuntu 14.04 服务器:phpMyAdmin 的 Apache2 问题的主要内容,如果未能解决你的问题,请参考以下文章
在 ubuntu 服务器 14.04 上链接的 libevent 问题