我编写了一个网站,不需要了解它的更多细节,但它有效并且不需要任何数据库或类似的东西。但在我的新Ubuntu 10.04.4 LTS服务器上,所有PHP页面都显示为空白。我使用以下命令安装了Apache2,PHP5以及我不知道它的用途:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
我试图在没有运气的情况下卸载并重新安装所有这些组件。我的浏览器中没有显示任何PHP页面,它们显示为空白且显示空白,而所有纯.html页面都可正常工作。
有没有办法让它发挥作用,我很乐意发布更多信息,但我不知道应该从哪里获得。
错误日志:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/curl.so' - /usr/lib/php5/20090626/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/gd.so' - /usr/lib/php5/20090626/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mcrypt.so' - /usr/lib/php5/20090626/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mysql.so' - /usr/lib/php5/20090626/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mysqli.so' - /usr/lib/php5/20090626/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/pdo_mysql.so' - /usr/lib/php5/20090626/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Jul 23 00:36:05 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.15 with Suhosin-Patch configured -- resuming normal operations
[Mon Jul 23 00:36:16 2012] [error] [client 217.227.25.35] PHP Parse error: syntax error, unexpected ')' in /var/www/vtest5532/Header.php on line 19
[Mon Jul 23 00:36:17 2012] [error] [client 217.227.25.35] PHP Parse error: syntax error, unexpected ')' in /var/www/vtest5532/Header.php on line 19
[Mon Jul 23 00:38:09 2012] [notice] caught SIGTERM, shutting down
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/curl.so' - /usr/lib/php5/20090626/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/gd.so' - /usr/lib/php5/20090626/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mcrypt.so' - /usr/lib/php5/20090626/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mysql.so' - /usr/lib/php5/20090626/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mysqli.so' - /usr/lib/php5/20090626/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/pdo_mysql.so' - /usr/lib/php5/20090626/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[Mon Jul 23 00:38:10 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.15 with Suhosin-Patch configured -- resuming normal operations
[Mon Jul 23 00:38:59 2012] [error] [client 180.76.5.62] File does not exist: /var/www/Forum
[Mon Jul 23 01:10:36 2012] [error] [client 66.249.68.165] File does not exist: /var/www/Forum
[Mon Jul 23 01:10:36 2012] [error] [client 66.249.68.165] File does not exist: /var/www/Forum
答案 0 :(得分:0)
PHP配置为默认不显示错误。如果您在/var/log/apache2/error.log
检查Apache错误日志,您应该看到问题的原因。如果这是一台开发机器,您还应该将php.ini
文件更改为更友好的设置(显示错误,最多error_reporting
)。如果它是生产服务器,那么将php.ini保持原样。