我刚刚花了4个小时试图在我的本地开发wamp服务器上运行SSL(Windows 7).
一切似乎现在都设置好了,服务器重启没有任何错误至少!!
当我尝试通过HTTPS(SSL 443)访问我的网站时,我似乎无法解决的唯一问题是403被禁止.它在端口80上工作正常,而不是在443上.错误日志显示以下内容
[error] [client 127.0.0.1] client denied by server configuration: F:/My Webs/freedate/public_html/
Run Code Online (Sandbox Code Playgroud)
我的http.conf文件添加了以下vhost
<VirtualHost *:80>
ServerName www.freedate.local
ServerAlias freedate.local *.freedate.local
DocumentRoot "F:\My Webs\freedate\public_html"
<Directory "F:\My Webs\freedate\public_html">
allow from all
order allow,deny
# Enables .htaccess files for this site
AllowOverride All
</Directory>
DirectoryIndex index.html index.php
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
我的httpd-ssl.conf添加了以下vhost
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "C:/wamp/bin/apache/Apache2.2.21/conf/ssl/server.crt"
SSLCertificateKeyFile "C:/wamp/bin/apache/Apache2.2.21/conf/ssl/server.key"
ServerName www.freedate.local
ServerAlias freedate.local *.freedate.local
DocumentRoot "F:\My Webs\freedate\public_html"
<Directory "F:\My Webs\freedate\public_html">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all …Run Code Online (Sandbox Code Playgroud) 我有一个Zend Form,其中包含一个文件元素。
$this->addElement('file', 'image', array(
'label' => 'Upload Image:',
'destination' => APPLICATION_PATH . '/tmp/',
'validators' => array(
array('count', true, array(
'min' => 1,
'max' => 1,
'messages' => array(
Zend_Validate_File_Count::TOO_FEW =>
'You must upload an image file',
Zend_Validate_File_Count::TOO_MANY =>
'You can only upload one image file'))),
array('extension', true, array(
'extention' => 'jpg,png,gif',
'messages' => array(
Zend_Validate_File_Extension::NOT_FOUND =>
'The file has an invalid extention (jpg,png,gif only)',
Zend_Validate_File_Extension::FALSE_EXTENSION =>
'The file has an invalid extention (jpg,png,gif only)'))),
array('imageSize', true, array(
'minheight' => …Run Code Online (Sandbox Code Playgroud) 我遇到了DQL查询的问题,无法从MySql数据库中检索用户和角色.我正在使用Zend Framework 2和Doctrine 2.
查询如下.
public function getUsers()
{
$builder = $this->getEntityManager()->createQueryBuilder();
$builder->select('u, r')
->from('Application\Entity\Users', 'u')
->leftJoin('Application\Entity\UserRoles', 'r')
->orderBy("u.emailAddress", "ASC");
InfoLogger::vardump($builder->getDQL());
return $builder->getQuery()->getResult(Query::HYDRATE_OBJECT);
}
Run Code Online (Sandbox Code Playgroud)
上面的查询产生错误,[语法错误]第0行,第91行:错误:预期文字,得到'BY'
生成的DQL是
SELECT u, r FROM Application\Entity\Users u LEFT JOIN Application\Entity\UserRoles r ORDER BY u.emailAddress ASC
Run Code Online (Sandbox Code Playgroud)
有人可以发现这个查询有什么问题,非常感谢.