当我尝试访问我网站上的网页时,我有这个错误日志:
in LdapManager.php (line 86)
at LdapManager->__construct(object(Configuration))
in appDevDebugProjectContainer.php (line 2051)
at appDevDebugProjectContainer->getLdapTools_LdapManagerService()
in classes.php (line 5406)
at Container->get('ldap_tools.ldap_manager')
in appDevDebugProjectContainer.php (line 2494)
at appDevDebugProjectContainer->getProfilerService()
in classes.php (line 5406)
at Container->get('profiler')
in appDevDebugProjectContainer.php (line 2507)
at appDevDebugProjectContainer->getProfilerListenerService()
in classes.php (line 5406)
at Container->get('profiler_listener')
in appDevDebugProjectContainer.php (line 733)
at appDevDebugProjectContainer->{closure}()
in classes.php (line 5644)
at EventDispatcher->sortListeners('kernel.exception')
in classes.php (line 5528)
at EventDispatcher->getListeners('kernel.exception')
in classes.php (line 5719)
at ContainerAwareEventDispatcher->getListeners('kernel.exception')
in TraceableEventDispatcher.php (line 250)
at TraceableEventDispatcher->preProcess('kernel.exception')
in TraceableEventDispatcher.php (line 139)
at TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent))
in classes.php (line 7121)
at HttpKernel->handleException(object(FileLoaderLoadException), object(Request), 1)
in classes.php (line 7053)
at HttpKernel->handle(object(Request), 1, true)
in Kernel.php (line 169)
at Kernel->handle(object(Request))
in app_dev.php (line 29)
这是app_dev.php文件:
<?php
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read https://symfony.com/doc/current/setup.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['1xx.0.0.1','1xx.0.16.163','1xx.0.0.250','1xx.0.0.226','1xx.0.0.233','::1'], true) || PHP_SAPI === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
require __DIR__.'/../vendor/autoload.php';
Debug::enable();
$kernel = new AppKernel('dev', true);
if (PHP_VERSION_ID < 70000) {
$kernel->loadClassCache();
}
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
这是这个项目的第一个捆绑,我还检查了路径是否正确,并且没问题。配置文件看起来很棒,ISPConfig也是如此。 我不知道在哪里看。
谢谢!
答案 0 :(得分:0)
首先删除if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['1xx.0.0.1','1xx.0.16.163','1xx.0.0.250','1xx.0.0.226','1xx.0.0.233','::1'], true) || PHP_SAPI === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
第二 你使用的是合格的域名吗?公共可访问如domain.com ... domain.tld ...什么?
您是如何设置网站的? (我问这里因为我无法发表评论)
您是否在本地计算机上设置了ISPconfig?还是VPS?
答案 1 :(得分:0)
您似乎正在使用https://github.com/ldaptools/ldaptools https://github.com/ldaptools/ldaptools-bundle,因此您需要在 app / config / config.yml
中提供正确的配置 的使用入门