Apache2 zend 2未在我的计算机上加载apache
正在尝试在运行linux mint 16的latop上使用apache设置zend。我不确定我在设置中会错过什么,但当我导航到localhost时,我只会看到一个空白页面 安装Apache,php,启用mod_重写:Apache2 zend 2未在我的计算机上加载apache,apache2,zend-framework2,Apache2,Zend Framework2,正在尝试在运行linux mint 16的latop上使用apache设置zend。我不确定我在设置中会错过什么,但当我导航到localhost时,我只会看到一个空白页面 安装Apache,php,启用mod_重写: apt-get install apache2 apt-get install php5 apt-get install libapache2-mod-php5 a2enmod rewrite 将我的zend应用程序(使用骨架构建)复制到/var/www/t1(t1是应用程序的文
apt-get install apache2
apt-get install php5
apt-get install libapache2-mod-php5
a2enmod rewrite
将我的zend应用程序(使用骨架构建)复制到/var/www/t1(t1是应用程序的文件夹)
已编辑:/etc/apache2/sites enabled/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
DocumentRoot /var/www/t1/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/t1/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
RewriteEngine off
<Location />
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]
</Location>
LogLevel warn
</VirtualHost>
当我浏览到http://localhost
我只得到一张空白页
编辑:打开错误报告后,我发现错误为:
Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in /var/www/t1/config/autoload/global.php on line 19
这是因为我忘记安装mysql模块,所以在安装之后,它解决了问题
sudo apt-get install php5-mysql
您可能需要在
public/index.php
的顶部添加ini\u集('display\u errors',1')
和ini\u集('error\u reporting',E\u ALL)
,或者在php.ini
中添加。您可能在ZF2捕获之前发生了异常(与安装相关)
首先,这将允许您查看错误是什么,然后修复它并继续操作通常很简单。您可能需要在
public/index.php
顶部添加ini\u集('display\u errors',1')
和ini\u集('error\u reporting',E\u ALL)
,或者在php.ini
中添加。您可能在ZF2捕获之前发生了异常(与安装相关)
首先,这将允许您查看错误是什么,然后修复它并继续操作通常很简单。您可能需要在
public/index.php
顶部添加ini\u集('display\u errors',1')
和ini\u集('error\u reporting',E\u ALL)
,或者在php.ini
中添加。您可能在ZF2捕获之前发生了异常(与安装相关)
首先,这将允许您查看错误是什么,然后修复它并继续操作通常很简单。您可能需要在
public/index.php
顶部添加ini\u集('display\u errors',1')
和ini\u集('error\u reporting',E\u ALL)
,或者在php.ini
中添加。您可能在ZF2捕获之前发生了异常(与安装相关)
这将首先让您看到错误是什么,然后修复它并继续前进通常是微不足道的。您是100%正确的。用错误和解决方案更新我的帖子。你是100%正确的。用错误和解决方案更新我的帖子。你是100%正确的。用错误和解决方案更新我的帖子。你是100%正确的。用错误和解决方案更新我的帖子。
sudo apt-get install php5-mysql