KERNEL_SECURITY_CHECK_FAILURE

隔几天就出现这样的情况
下面是错误日志

1: kd> !analyze -v
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

KERNEL_SECURITY_CHECK_FAILURE (139)
A kernel component has corrupted a critical data structure.  The corruption
could potentially allow a malicious user to gain control of this machine.
Arguments:
Arg1: 0000000000000003, A LIST_ENTRY has been corrupted (i.e. double remove).
Arg2: ffff8185890170a0, Address of the trap frame for the exception that caused the bugcheck
Arg3: ffff818589016ff8, Address of the exception record for the exception that caused the bugcheck
Arg4: 0000000000000000, Reserved

Debugging Details:
------------------


KEY_VALUES_STRING: 1


STACKHASH_ANALYSIS: 1

TIMELINE_ANALYSIS: 1


DUMP_CLASS: 1

DUMP_QUALIFIER: 401

BUILD_VERSION_STRING:  17134.1.amd64fre.rs4_release.180410-1804

SYSTEM_MANUFACTURER:  Timi

SYSTEM_PRODUCT_NAME:  TM1701

BIOS_VENDOR:  INSYDE Corp.

BIOS_VERSION:  XMAKB5R0P0603

BIOS_DATE:  02/02/2018

BASEBOARD_MANUFACTURER:  Timi

BASEBOARD_PRODUCT:  TM1701

BASEBOARD_VERSION:  MP

DUMP_TYPE:  1

BUGCHECK_P1: 3

BUGCHECK_P2: ffff8185890170a0

BUGCHECK_P3: ffff818589016ff8

BUGCHECK_P4: 0

TRAP_FRAME:  ffff8185890170a0 -- (.trap 0xffff8185890170a0)
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=0000000000000001 rbx=0000000000000000 rcx=0000000000000003
rdx=ffffa587dfc4b501 rsi=0000000000000000 rdi=0000000000000000
rip=fffff801254aa39f rsp=ffff818589017230 rbp=fffff802fbb47348
 r8=fffff802fbb47348  r9=ffffd381c0700180 r10=0000000000000001
r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up di ng nz na po cy
nt!ExInterlockedInsertTailList+0xe583f:
fffff801`254aa39f cd29            int     29h
Resetting default scope

EXCEPTION_RECORD:  ffff818589016ff8 -- (.exr 0xffff818589016ff8)
ExceptionAddress: fffff801254aa39f (nt!ExInterlockedInsertTailList+0x00000000000e583f)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 1
   Parameter[0]: 0000000000000003
Subcode: 0x3 FAST_FAIL_CORRUPT_LIST_ENTRY

CPU_COUNT: 8

CPU_MHZ: 7c8

CPU_VENDOR:  GenuineIntel

CPU_FAMILY: 6

CPU_MODEL: 8e

CPU_STEPPING: a

CPU_MICROCODE: 6,8e,a,0 (F,M,S,R)  SIG: 84'00000000 (cache) 84'00000000 (init)

BLACKBOXBSD: 1 (!blackboxbsd)


BLACKBOXPNP: 1 (!blackboxpnp)


BUGCHECK_STR:  0x139

PROCESS_NAME:  System

CURRENT_IRQL:  0

DEFAULT_BUCKET_ID:  FAIL_FAST_CORRUPT_LIST_ENTRY

ERROR_CODE: (NTSTATUS) 0xc0000409 - <Unable to get error code text>

EXCEPTION_CODE: (NTSTATUS) 0xc0000409 - <Unable to get error code text>

EXCEPTION_CODE_STR:  c0000409

EXCEPTION_PARAMETER1:  0000000000000003

ANALYSIS_SESSION_HOST:  HAIYANG

ANALYSIS_SESSION_TIME:  03-21-2019 11:11:59.0924

ANALYSIS_VERSION: 10.0.17763.132 amd64fre

LAST_CONTROL_TRANSFER:  from fffff80125464c69 to fffff801254540a0

STACK_TEXT:  
ffff8185`89016d78 fffff801`25464c69 : 00000000`00000139 00000000`00000003 ffff8185`890170a0 ffff8185`89016ff8 : nt!KeBugCheckEx
ffff8185`89016d80 fffff801`25465010 : 00000000`00000000 fffff802`fbdf1010 ffffa587`d8663030 fffff801`2536917a : nt!KiBugCheckDispatch+0x69
ffff8185`89016ec0 fffff801`2546361f : ffffa587`d5947620 ffffa587`cf318200 00000000`00000000 00000000`00000001 : nt!KiFastFailDispatch+0xd0
ffff8185`890170a0 fffff801`254aa39f : ffffa587`e03de010 00000000`00000000 ffffa587`dfc4b510 fffff802`fbb47370 : nt!KiRaiseSecurityCheckFailure+0x2df
ffff8185`89017230 fffff802`fbb42f6a : ffffa587`e03de010 ffff8185`89017349 ffffa587`d1b941b0 00000000`00000000 : nt!ExInterlockedInsertTailList+0xe583f
ffff8185`89017260 fffff801`2534572f : ffffa587`e03de010 ffffa587`d1b94060 00000000`00000000 00000000`00000000 : topsecpf+0x2f6a
ffff8185`89017290 fffff801`253455f7 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!IopfCompleteRequest+0x11f
ffff8185`890173b0 fffff802`fbaf58f9 : ffffa587`df8682e0 00000000`00000000 00000000`00000000 00000000`00000000 : nt!IofCompleteRequest+0x17
ffff8185`890173e0 fffff801`25342e69 : ffffa587`e03de0e0 00000000`00000000 ffffa587`d1b941b0 fffff802`fd2e8856 : tdx!TdxTdiDispatchCleanup+0x359
ffff8185`89017460 fffff802`fbb43064 : ffffa587`00000000 ffffa587`e03de0e0 ffffa587`d1b941b0 00000000`00000000 : nt!IofCallDriver+0x59
ffff8185`890174a0 fffff802`fbb414c4 : ffffa587`d1b94060 ffffa587`d1b941b0 ffffa587`e03de010 ffffa587`cf2f3440 : topsecpf+0x3064
ffff8185`890174d0 fffff802`fbb416f6 : ffffa587`d1b94060 ffffa587`e03de128 ffffa587`e03de010 fffff802`fd2e8804 : topsecpf+0x14c4
ffff8185`89017500 fffff801`25342e69 : ffffa587`e063f7d0 00000000`00000000 ffffa587`e03de010 ffffa587`cf2f3440 : topsecpf+0x16f6
ffff8185`89017530 fffff801`257717fe : ffffa587`e063f7d0 00000000`00000000 00000000`00000000 fffff802`fbb42c2a : nt!IofCallDriver+0x59
ffff8185`89017570 fffff801`2579e552 : ffffa587`e063f7a0 00000000`00000001 ffffbc02`00000000 00000000`00007fff : nt!IopCloseFile+0x15e
ffff8185`89017600 fffff801`257a5edd : ffffa587`e03de010 00000000`00000000 ffffa587`df8682e0 fffff801`2545ad46 : nt!ObCloseHandleTableEntry+0x212
ffff8185`89017740 fffff801`25464743 : ffffa587`d1b9a850 fffff801`25342e69 ffffa587`d0082040 ffff8185`89017820 : nt!NtClose+0xcd
ffff8185`890177a0 fffff801`25457aa0 : fffff802`fbc36e32 ffffa587`d98c3a70 00000000`0000000d ffffa587`d98c3a70 : nt!KiSystemServiceCopyEnd+0x13
ffff8185`89017938 fffff802`fbc36e32 : ffffa587`d98c3a70 00000000`0000000d ffffa587`d98c3a70 ffffd381`c0a80180 : nt!KiServiceLinkage
ffff8185`89017940 fffff802`fbbd407a : 00000000`00000000 ffffa587`e0645a60 fffff802`fbbf95e0 00000000`0000000d : afd!AfdFreeConnectionResources+0xf652
ffff8185`89017980 fffff802`fbc0e417 : ffffa587`d98c3b20 fffff802`fbc0e400 ffffa353`50bf6502 00000000`00000000 : afd!AfdFreeConnectionEx+0x2a
ffff8185`890179b0 fffff802`fbbd3f92 : 00000000`00000000 00000000`00000000 fffff802`fbbd3f10 ffffa587`cf2bcaa0 : afd!AfdFreeConnection+0x17
ffff8185`890179e0 fffff801`253c8d7c : ffffa587`cf2e71c0 ffffa587`d1b8be40 ffffa587`df3d2080 fffff802`fbbd3f10 : afd!AfdDoWork+0x82
ffff8185`89017a10 fffff801`2535fb05 : 00000000`00000000 ffffa587`d0082040 fffff801`253c8c50 00000000`00000000 : nt!IopProcessWorkItem+0x12c
ffff8185`89017a80 fffff801`253da2d7 : ffffa587`d0082040 00000000`00000080 ffffa587`cf2f3440 ffffa587`d0082040 : nt!ExpWorkerThread+0xf5
ffff8185`89017b10 fffff801`2545b516 : ffffd381`c09b9180 ffffa587`d0082040 fffff801`253da290 8b480000`04449f89 : nt!PspSystemThreadStartup+0x47
ffff8185`89017b60 00000000`00000000 : ffff8185`89018000 ffff8185`89011000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x16


THREAD_SHA1_HASH_MOD_FUNC:  2d8344b651739320fad5945d2588d57ac1b7461c

THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  bc5c3903816cb5021fe0e87cc0b0ec4c4d03caa1

THREAD_SHA1_HASH_MOD:  38e53ac0126e1719b5dcbb6c7225fe02fc0f7f41

FOLLOWUP_IP: 
topsecpf+2f6a
fffff802`fbb42f6a 488d4e48        lea     rcx,[rsi+48h]

FAULT_INSTR_CODE:  484e8d48

SYMBOL_STACK_INDEX:  5

SYMBOL_NAME:  topsecpf+2f6a

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: topsecpf

IMAGE_NAME:  topsecpf.sys

DEBUG_FLR_IMAGE_TIMESTAMP:  4d6da0f2

STACK_COMMAND:  .thread ; .cxr ; kb

BUCKET_ID_FUNC_OFFSET:  2f6a

FAILURE_BUCKET_ID:  0x139_3_CORRUPT_LIST_ENTRY_topsecpf!unknown_function

BUCKET_ID:  0x139_3_CORRUPT_LIST_ENTRY_topsecpf!unknown_function

PRIMARY_PROBLEM_CLASS:  0x139_3_CORRUPT_LIST_ENTRY_topsecpf!unknown_function

TARGET_TIME:  2019-03-21T02:48:54.000Z

OSBUILD:  17134

OSSERVICEPACK:  0

SERVICEPACK_NUMBER: 0

OS_REVISION: 0

SUITE_MASK:  784

PRODUCT_TYPE:  1

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

OSEDITION:  Windows 10 WinNt TerminalServer SingleUserTS Personal

OS_LOCALE:  

USER_LCID:  0

OSBUILD_TIMESTAMP:  2019-03-06 16:32:15

BUILDDATESTAMP_STR:  180410-1804

BUILDLAB_STR:  rs4_release

BUILDOSVER_STR:  10.0.17134.1.amd64fre.rs4_release.180410-1804

ANALYSIS_SESSION_ELAPSED_TIME:  1382

ANALYSIS_SOURCE:  KM

FAILURE_ID_HASH_STRING:  km:0x139_3_corrupt_list_entry_topsecpf!unknown_function

FAILURE_ID_HASH:  {7d6915eb-8c8b-b32e-d4d4-a1676df73917}

Followup:     MachineOwner
---------

1: kd> !blackboxbsd
Stream size mismatch (expected = 168, read = 136)
1: kd> .trap 0xffff8185890170a0
NOTE: The trap frame does not contain all registers.
Some register values may be zeroed or incorrect.
rax=0000000000000001 rbx=0000000000000000 rcx=0000000000000003
rdx=ffffa587dfc4b501 rsi=0000000000000000 rdi=0000000000000000
rip=fffff801254aa39f rsp=ffff818589017230 rbp=fffff802fbb47348
 r8=fffff802fbb47348  r9=ffffd381c0700180 r10=0000000000000001
r11=0000000000000000 r12=0000000000000000 r13=0000000000000000
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up di ng nz na po cy
nt!ExInterlockedInsertTailList+0xe583f:
fffff801`254aa39f cd29            int     29h
1: kd> .exr 0xffff818589016ff8
ExceptionAddress: fffff801254aa39f (nt!ExInterlockedInsertTailList+0x00000000000e583f)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 1
   Parameter[0]: 0000000000000003
Subcode: 0x3 FAST_FAIL_CORRUPT_LIST_ENTRY
1: kd> !blackboxbsd
Stream size mismatch (expected = 168, read = 136)
1: kd> !blackboxpnp
    PnpActivityId      : {00000000-0000-0000-0000-000000000000}
    PnpActivityTime    : 131976053916827554
    PnpEventInformation: 3
    PnpEventInProgress : 0
    PnpProblemCode     : 24
    PnpVetoType        : 0
    DeviceId           : SW\{96E080C7-143C-11D1-B40F-00A0C9223196}\{3C0D501A-140B-11D1-B40F-00A0C9223196}
    VetoString         : 

1: kd> lmvm topsecpf
Browse full module list
start             end                 module name
fffff802`fbb40000 fffff802`fbb4e000   topsecpf   (no symbols)           
    Loaded symbol image file: topsecpf.sys
    Image path: \??\C:\Windows\sysWOW64\drivers\topsecpf.sys
    Image name: topsecpf.sys
    Browse all global symbols  functions  data
    Timestamp:        Tue Mar  1 18:44:18 2011 (4D6DA0F2)
    CheckSum:         000192FE
    ImageSize:        0000E000
    Translations:     0000.04b0 0000.04e4 0409.04b0 0409.04e4
    Information from resource tables:

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
从用户提供商处获取错误

<div class="post-text" itemprop="text"> <p>I am using symfony framework. I have created two login forms and want to authenticate based on the form they access. The two forms interact with two different database. But, I am getting error "Unknown Entity namespace alias 'ESSUserBundle'". When I add ESSUserBundle to default entity manager, it works. But, This bundle should not be in default entity manager. How to solve this issue ?</p> <p><strong>Security.yml</strong></p> <pre><code>security: encoders: ESS\UserBundle\Entity\User: algorithm: sha512 encode-as-base64: true iterations: 1 ESS\AdminBundle\Entity\AdminUser: algorithm: sha512 encode-as-base64: true iterations: 1 role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] providers: admin_area: name: admin_security entity: {class: ESSAdminBundle:AdminUser, property: username } company_area: name: company_security entity: { class: ESSUserBundle:User, property: username } firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false admin_area: pattern: ^/admin provider: admin_security anonymous: ~ form_login: login_path: /admin check_path: /admin/login_check default_target_path: /admin/home failure_path: /admin logout: path: /admin/logout target: /admin company_area: pattern: ^/login anonymous: ~ provider: company_security form_login: login_path: /login check_path: login_check default_target_path: /main/home failure_path: /login logout: path: /main/logout target: /login </code></pre> <p><strong>Config.yml</strong></p> <pre><code>doctrine: dbal: default_connection: default connections: default: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: UTF8 customer: driver: "%database_driver2%" host: "%database_host2%" port: "%database_port2%" dbname: "%database_name2%" user: "%database_user2%" password: "%database_password2%" charset: UTF8 orm: auto_generate_proxy_classes: %kernel.debug% default_entity_manager: default entity_managers: default: connection: default mappings: ESSAdminBundle: ~ #ESSRoleBundle: ~ customer: connection: customer mappings: ESSUserBundle: ~ </code></pre> <p><strong>Updated</strong></p> <p><strong>UserRepository.php</strong></p> <pre><code>public function loadUserByUsername($username) { $q = $this -&gt;createQueryBuilder('u') -&gt;where('u.username = :username OR u.email = :email') -&gt;setParameter('username', $username) -&gt;setParameter('email', $username) -&gt;getQuery(); try { // The Query::getSingleResult() method throws an exception // if there is no record matching the criteria. $user = $q-&gt;getSingleResult(); } catch (NoResultException $e) { $message = sprintf( 'Unable to find an active admin AcmeUserBundle:User object identified by "%s".', $username ); throw new UsernameNotFoundException($message, 0, $e); } return $user; } </code></pre> </div>

服务“sonata.user.serializer.handler.user”依赖于不存在的服务“sonata.user.manager.user”

<div class="post-text" itemprop="text"> <p>I want to install SonataUserBundle with MongoDb database , this is my configuration files :</p> <p>My config.yml</p> <pre><code>fos_user: db_driver: mongodb firewall_name: main user_class: Sonata\UserBundle\Document\BaseUser group: group_class: Sonata\UserBundle\Document\BaseGroup group_manager: sonata.user.mongodb.user_manager service: user_manager: sonata.user.mongodb.group_manager sonata_user: security_acl: true manager_type: mongodb # can be orm or mongodb sonata_admin: title: Admin #title_logo: bundles/acmedemo/img/fancy_acme_logo.png </code></pre> <p>My AppKernel.php</p> <pre><code> //knp new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(), new Knp\Bundle\MenuBundle\KnpMenuBundle(), //fos new FOS\ElasticaBundle\FOSElasticaBundle(), new FOS\UserBundle\FOSUserBundle(), //mongo new Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle(), //sonata new Sonata\FormatterBundle\SonataFormatterBundle(), new Sonata\DoctrineMongoDBAdminBundle\SonataDoctrineMongoDBAdminBundle(), new Sonata\AdminBundle\SonataAdminBundle(), new Sonata\CoreBundle\SonataCoreBundle(), new Sonata\BlockBundle\SonataBlockBundle(), new Sonata\UserBundle\SonataUserBundle(), new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(), </code></pre> <p>My composer.json</p> <pre><code>"sonata-project/doctrine-mongodb-admin-bundle": "2.3.0", "doctrine/mongodb-odm-bundle": "3.0.*@dev", "doctrine/mongodb-odm": "1.0.*@dev", "doctrine/doctrine-fixtures-bundle": "~2.2.0@dev", "sonata-project/user-bundle": "2.3.*@dev", "sonata-project/datagrid-bundle": "2.2.*@dev", "sonata-project/formatter-bundle": "~2.3", "friendsofsymfony/elastica-bundle": "~3.0", "sonata-project/doctrine-orm-admin-bundle": "2.4.*@dev" </code></pre> <p>My Security.yml</p> <pre><code>security: acl: connection: default role_hierarchy: ROLE_ADMIN: [ROLE_USER, ROLE_SONATA_ADMIN] ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] SONATA: - ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT # if you are using acl then this line must be commented providers: fos_userbundle: id: fos_user.user_manager firewalls: # Disabling the security for the web debug toolbar, the profiler and Assetic. dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false # -&gt; custom firewall for the admin area of the URL admin: pattern: /admin(.*) context: user form_login: provider: fos_userbundle login_path: /admin/login use_forward: false check_path: /admin/login_check failure_path: null logout: path: /admin/logout anonymous: true # -&gt; end custom configuration # default login area for standard users # This firewall is used to handle the public login area # This part is handled by the FOS User Bundle main: pattern: .* context: user form_login: provider: fos_userbundle login_path: /login use_forward: false check_path: /login_check failure_path: null logout: true anonymous: true </code></pre> <p>I have always this exception</p> <blockquote> <p>The service "sonata.user.serializer.handler.user" has a dependency on a non-existent service "sonata.user.manager.user".</p> </blockquote> <p>Help Please.</p> </div>

Symfony2 - FOSFacebook Bundle - 子域名

<div class="post-text" itemprop="text"> <p>So I've mangaged to get the FOSFacebook bundle integrated into my app alongside the FOSUser bundle. Now it's working properly on my dev server minus a few bugs but it works.</p> <p><strong>UPDATE:</strong> So for some reason facebook is setting the cookie to mysite.com.au instead of subdomain.mysite.com which means that it fails to pick up on the cookie and goes to the default failure page which is /facebook/login. </p> <p>Now for some reason when I deployed it to my live server, which has the same address(I'm changing my hosts file to simulate the domain) when I try to login I get "No route found for "GET /facebook/login" If I try to access this page on the dev, I get the same message, but normally it logs me in and then redirects me to the index. On the live it gets stuck on /facebook/login</p> <p>Here's my security.yml</p> <pre><code>security: encoders: "FOS\UserBundle\Model\UserInterface": sha512 role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] providers: fos_userbundle: id: fos_user.user_manager my_fos_facebook_provider: id: my.facebook.user factories: - "%kernel.root_dir%/../vendor/bundles/FOS/FacebookBundle/Resources/config/security_factories.xml" firewalls: public: pattern: ^/ fos_facebook: app_url: "(set to the apps.facebook link I have)" server_url: "http://testbed.mysite.com/app_dev.php/" check_path: /facebook/check login_path: /facebook/login default_target_path: / provider: my_fos_facebook_provider form_login: success_handler: authentication_handler failure_handler: authentication_handler provider: fos_userbundle anonymous: true logout: true access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/testing/secure/, role: IS_AUTHENTICATED_FULLY } - { path: ^/admin/secure/, role: ROLE_ADMIN } - { path: ^/account, role: IS_AUTHENTICATED_FULLY } role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN </code></pre> <p>If you need a look at any other files, let me know</p> <p>Obviously there is no route for /facebook/login but I believe it's supposed to be that way. Any ideas people?</p> </div>

Symfony2 - 安装了FOS用户软件包的自定义身份验证提供程序

<div class="post-text" itemprop="text"> <p>I need help with building custom authentication in Symfony2 project. I've read the symfony cookbook <a href="http://symfony.com/doc/2.3/cookbook/security/custom_authentication_provider.html" rel="nofollow">http://symfony.com/doc/2.3/cookbook/security/custom_authentication_provider.html</a> and found many questions about the custom authentication but they didn't answer to my question in situation when I trying to do this with FOS User Bundle. I spent many ours of investigation of symfony authentication process but can't understand where am I wrong.</p> <p><strong>So what I have now:</strong></p> <ol> <li>FOS User Bundle successfully installed and configured following by the official documentation.</li> <li>Sonata User Bundle installed.</li> <li>Custom authentication listener, token, provider, factory added and configured. After that I normally log in but as I see my new authentication provider is not used and the user is logged in with FOS's "form_login".</li> </ol> <p>Here is my code:</p> <p>User entity class:</p> <pre><code>&lt;?php namespace Acme\UserBundle\Entity; use Sonata\UserBundle\Entity\BaseUser as BaseUser; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use \Acme\BoardBundle\Entity\Card; /** * @ORM\Entity * @ORM\HasLifecycleCallbacks * @ORM\Table(name="fos_user") */ class User extends BaseUser { ... protected $card; /** * Set card * * @param \Acme\BoardBundle\Entity\Card $card * @return Card */ public function setCard(\Acme\BoardBundle\Entity\Card $card) { $this-&gt;card = $card; return $this; } /** * Get card * * @return \Acme\BoardBundle\Entity\Card */ public function getCard() { return $this-&gt;card; } } </code></pre> <p>User.orm.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"&gt; &lt;entity name="Acme\UserBundle\Entity\User" table="fos_user"&gt; ... &lt;many-to-one field="card" target-entity="Acme\BoardBundle\Entity\Card" inversed-by="users"&gt; &lt;join-column name="card" referenced-column-name="id" /&gt; &lt;/many-to-one&gt; &lt;/entity&gt; &lt;/doctrine-mapping&gt; </code></pre> <p>The User entity has a relation with Card entity which has two properties: card number and PIN code. And the properties I actually need to check after login. My login form has not only username and password fields but also the card number and PIN fields.</p> <p>security.yml (where I feel I have some errors in firewall configuration but I can't understand what's wrong):</p> <pre><code>providers: fos_userbundle: id: fos_user.user_manager firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false admin: pattern: /admin(.*) context: user form_login: provider: fos_userbundle login_path: /admin/login use_forward: false check_path: /admin/login_check failure_path: null logout: path: /admin/logout anonymous: true main: pattern: .* context: user acme: true form_login: provider: fos_userbundle login_path: /user/login use_forward: false check_path: /user/login_check failure_path: null always_use_default_target_path: true default_target_path: ad_category logout: path: /user/logout anonymous: true </code></pre> <p>User Token:</p> <pre><code>&lt;?php namespace Acme\UserBundle\Security\Authentication\Token; use Symfony\Component\Security\Core\Authentication\Token\AbstractToken; class AcmeUserToken extends AbstractToken { public $userFIO; public $cardNumber; public $cardPIN; public function __construct(array $roles = array()) { parent::__construct($roles); // If the user has roles, consider it authenticated $this-&gt;setAuthenticated(count($roles) &gt; 0); } public function getCredentials() { return ''; } // поскольку токены проверяются при обработке каждом новом запросе клиента, // нам необходимо сохранять нужные нам данные. В связи с этим “обертываем” // унаследованные методы сериализации и десериализации. public function serialize() { $pser = parent::serialize(); //return serialize(array($this-&gt;social, $this-&gt;hash, $this-&gt;add, $pser)); return serialize(array($pser)); } public function unserialize($serialized) { //list($this-&gt;social, $this-&gt;hash, $this-&gt;add, $pser) = unserialize($serialized); list($pser) = unserialize($serialized); parent::unserialize($pser); } } </code></pre> <p>AcmeProvider.php (my custom authentication provider):</p> <pre><code>&lt;?php namespace Acme\UserBundle\Security\Authentication\Provider; use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface; use Symfony\Component\Security\Core\User\UserProviderInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Exception\NonceExpiredException; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Acme\UserBundle\Security\Authentication\Token\AcmeUserToken; class AcmeProvider implements AuthenticationProviderInterface { private $userProvider; public function __construct(UserProviderInterface $userProvider) { $this-&gt;userProvider = $userProvider; } public function authenticate(TokenInterface $token) { $user = $this-&gt;userProvider-&gt;loadUserByUsername($token-&gt;getUsername()); if ($user) { $authenticatedToken = new AcmeUserToken($user-&gt;getRoles()); $authenticatedToken-&gt;setUser($user); return $authenticatedToken; } throw new AuthenticationException('The Acme authentication failed.'); } public function supports(TokenInterface $token) { return $token instanceof AcmeUserToken; } } </code></pre> <p>Factory class AcmeFactory.php:</p> <pre><code>&lt;?php namespace Acme\UserBundle\DependencyInjection\Security\Factory; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface; class AcmeFactory implements SecurityFactoryInterface { public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint) { $providerId = 'security.authentication.provider.acme.'.$id; $container -&gt;setDefinition($providerId, new DefinitionDecorator('acme.security.authentication.provider')) -&gt;replaceArgument(0, new Reference($userProvider)) ; $listenerId = 'security.authentication.listener.acme.'.$id; $listener = $container-&gt;setDefinition($listenerId, new DefinitionDecorator('acme.security.authentication.listener')); return array($providerId, $listenerId, $defaultEntryPoint); } public function getPosition() { //return 'pre_auth'; return 'form'; } public function getKey() { return 'acme'; } public function addConfiguration(NodeDefinition $node) { } } </code></pre> <p>Configuration of the user provider and listner in config.yml:</p> <pre><code>services: acme.security.authentication.provider: class: Acme\UserBundle\Security\Authentication\Provider\AcmeProvider abstract: true arguments: [''] public: false security.authentication.listener.abstract: tags: - { name: 'monolog.logger', channel: 'security' } arguments: [@security.context, @security.authentication.manager, @security.authentication.session_strategy, @security.http_utils, "knetik",@security.authentication.success_handler, @security.authentication.failure_handler, {}, @logger, @event_dispatcher] class: Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener # override application level success handler and re-route back security.authentication.success_handler: class: Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler arguments: ["@security.http_utils", {}] tags: - { name: 'monolog.logger', channel: 'security' } # override application level failure handler and re-route back security.authentication.failure_handler: class: Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler arguments: ["@http_kernel", "@security.http_utils", {}, "@logger"] tags: - { name: 'monolog.logger', channel: 'security' } yamogu.security.authentication.listener: class: Acme\UserBundle\Security\Authentication\Firewall\AcmeListener parent: security.authentication.listener.abstract abstract: true arguments: ["@security.context", "@security.authentication.manager"] public: false </code></pre> <p>If you need an additinal code I'll add it to the question. Any help will be appreciated!</p> <p>Link on the dev.log after authorization: <a href="https://www.dropbox.com/s/5uot2qofmqjwvmk/dev.log?dl=0" rel="nofollow">https://www.dropbox.com/s/5uot2qofmqjwvmk/dev.log?dl=0</a></p> </div>

如何更改Google帐户(Symfony4,HWIOauthBundle,FOSUserBundle)

<div class="post-text" itemprop="text"> <p>I configured HWIOAuthBundle to make it possible sign in with Google on my website (see configs below). What is the right way to allow to change Google account? The problem is at the first time when I tried to sign in with Google, it allows me to choose Google account, but then google remember my choice and now always login me with the first chosen account by default. For example, in <a href="https://www.flaticon.com/profile/me" rel="nofollow noreferrer">https://www.flaticon.com/profile/me</a> you can see a button "Disconnect Google" with that necessary functionality - it opens a window with Google accounts selection</p> <p>I've been searching through <a href="https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/index.md" rel="nofollow noreferrer">https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/index.md</a> docs but there is no desicion</p> <pre><code># composer.json { "type": "project", "license": "proprietary", "require": { "php": "^7.1.3", "ext-ctype": "*", "ext-iconv": "*", "friendsofsymfony/ckeditor-bundle": "^2.1", "friendsofsymfony/user-bundle": "^2.1", "hwi/oauth-bundle": "^0.6.3", "php-http/guzzle6-adapter": "^1.1", "php-http/httplug-bundle": "^1.16", "sensio/framework-extra-bundle": "^5.3", "symfony/apache-pack": "^1.0", "symfony/asset": "4.2.*", "symfony/console": "4.2.*", "symfony/dotenv": "4.2.*", "symfony/flex": "^1.1", "symfony/form": "4.2.*", "symfony/framework-bundle": "4.2.*", "symfony/monolog-bundle": "^3.3", "symfony/orm-pack": "^1.0", "symfony/security-bundle": "4.2.*", "symfony/swiftmailer-bundle": "^3.2", "symfony/translation": "4.2.*", "symfony/twig-bundle": "4.2.*", "symfony/validator": "4.2.*", "symfony/webpack-encore-bundle": "^1.5", "symfony/yaml": "4.2.*" }, "config": { "preferred-install": { "*": "dist" }, "sort-packages": true }, "autoload": { "psr-4": { "App\\": "src/" }, "classmap": [ "config/bundles.php" ] }, "autoload-dev": { "psr-4": { "App\\Tests\\": "tests/" } }, "replace": { "paragonie/random_compat": "2.*", "symfony/polyfill-ctype": "*", "symfony/polyfill-iconv": "*", "symfony/polyfill-php71": "*", "symfony/polyfill-php70": "*", "symfony/polyfill-php56": "*" }, "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" ], "post-update-cmd": [ "@auto-scripts" ] }, "conflict": { "symfony/symfony": "*" }, "extra": { "symfony": { "allow-contrib": "true", "require": "4.2.*" } }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "^3.1", "symfony/browser-kit": "4.2.*", "symfony/css-selector": "4.2.*", "symfony/maker-bundle": "^1.11", "symfony/phpunit-bridge": "4.2.*", "symfony/profiler-pack": "^1.0", "symfony/web-server-bundle": "4.2.*" } } </code></pre> <pre><code># config/packages/hwi_oauth.yaml hwi_oauth: http: client: httplug.client.hwi_special connect: account_connector: my_user_provider firewall_name: main fosub: username_iterations: 30 properties: google: google_id resource_owners: google: type: google client_id: '%env(GOOGLE_ID)%' client_secret: '%env(GOOGLE_SECRET)%' scope: "email profile" options: display: popup csrf: true access_type: offline </code></pre> <pre><code># config/packages/security.yaml security: encoders: App\Entity\User: algorithm: bcrypt providers: fos_userbundle: id: fos_user.user_provider.username_email role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ^/ form_login: provider: fos_userbundle csrf_token_generator: security.csrf.token_manager anonymous: true logout: true guard: authenticators: - App\Security\LoginFormAuthenticator remember_me: secret: '%kernel.secret%' lifetime: 2592000 # 30 days path: / oauth: resource_owners: google: "/login/check-google" login_path: fos_user_security_login failure_path: fos_user_security_login oauth_user_provider: service: my_user_provider - { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY} - { path: ^/register, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin, roles: ROLE_SUPER_ADMIN } - { path: ^/profile, roles: ROLE_USER } </code></pre> <pre><code># config/routes.yaml fos_user: resource: "@FOSUserBundle/Resources/config/routing/all.xml" google_login: path: /login/check-google </code></pre> </div>

Symfony Fr3dLdapBundle的凭据错误

<div class="post-text" itemprop="text"> <p>Hy ,</p> <p>I m trying o install Fr3dLdapBundle on a Symfony application. here , are my configurations files :</p> <p>Security.yml </p> <pre><code>security: erase_credentials: false encoders: FOS\UserBundle\Model\UserInterface: bcrypt ModuleBundle\Entity\User: plaintext role_hierarchy: ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: ROLE_ADMIN providers: #fos_userbundle: # id: fos_user.user_provider.username chain_provider: chain: providers: [fr3d_ldapbundle,fos_userbundle] fr3d_ldapbundle: id: fr3d_ldap.security.user.provider fos_userbundle: id: fos_user.user_provider.username firewalls: main: pattern: ^/ fr3d_ldap: ~ form_login: #provider: fr3d_ldapbundle #csrf_provider: security.csrf.token_manager # Use form.csrf_provider instead for Symfony &lt;2.4 always_use_default_target_path: true default_target_path: /mon-profil logout: true anonymous: true access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/login$, role: ROLE_USER } #- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } #- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } #- { path: ^/admin/, role: ROLE_ADMIN } </code></pre> <p>Config.yml </p> <pre><code>fr3d_ldap: driver: host: 192.168.8.20 username: boff@tritech.local password: *************** accountDomainName: tritech.local accountDomainNameShort: LOCAL user: #baseDn: dc=USERS,dc=tritech,dc=local #baseDn: CN=boffuser,OU=Users,DC=tritech,DC=local baseDn: OU=Ecare,DC=tritech,DC=local filter: (&amp;(ObjectClass=Person)) attributes: - { ldap_attr: uid, user_method: setUsername } - { ldap_attr: mail, user_method: setEmail } </code></pre> <p>But when i try to login using a form i got an error "invalid credentials" in log files , but , the username and password are corrects , could any one could help me to solve it please ?</p> <p>Logfile:</p> <pre><code> [2017-11-13 15:53:33] request.INFO: Matched route "fos_user_security_check". {"route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::checkAction","_route":"fos_user_security_check"},"request_uri":"http://localhost/monusco/Monusco_old1/web/app_dev.php/login_check"} [] [2017-11-13 15:53:33] ldap_driver.DEBUG: ldap_search(OU=monusco,DC=tritech,DC=local, (&amp;(&amp;(ObjectClass=Person))(uid=boff)), [array]) {"action":"ldap_search","base_dn":"OU=monusco,DC=tritech,DC=local","filter":"(&amp;(&amp;(ObjectClass=Person))(uid=boff))","attributes":[]} [] [2017-11-13 15:53:33] ldap_driver.DEBUG: exception 'Zend\Ldap\Exception\LdapException' with message '0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v23f0): LOCAL\boff' in C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php:851 Stack trace: #0 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(104): Zend\Ldap\Ldap-&gt;bind() #1 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(929): Zend\Ldap\Ldap-&gt;getResource() #2 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(1082): Zend\Ldap\Ldap-&gt;search('(&amp;(&amp;(ObjectClas...', 'OU=monusco,DC=t...', 1, Array, NULL, NULL, 0, 0) #3 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Driver\ZendLdapDriver.php(53): Zend\Ldap\Ldap-&gt;searchEntries('(&amp;(&amp;(ObjectClas...', 'OU=monusco,DC=t...', 1, Array) #4 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Ldap\LdapManager.php(40): FR3D\LdapBundle\Driver\ZendLdapDriver-&gt;search('OU=monusco,DC=t...', '(&amp;(&amp;(ObjectClas...') #5 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Ldap\LdapManager.php(31): FR3D\LdapBundle\Ldap\LdapManager-&gt;findUserBy(Array) #6 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Security\User\LdapUserProvider.php(34): FR3D\LdapBundle\Ldap\LdapManager-&gt;findUserByUsername('boff') #7 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Core\User\ChainUserProvider.php(49): FR3D\LdapBundle\Security\User\LdapUserProvider-&gt;loadUserByUsername('boff') #8 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Security\Authentication\LdapAuthenticationProvider.php(55): Symfony\Component\Security\Core\User\ChainUserProvider-&gt;loadUserByUsername('boff') #9 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php(68): FR3D\LdapBundle\Security\Authentication\LdapAuthenticationProvider-&gt;retrieveUser('boff', Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #10 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(2729): Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider-&gt;authenticate(Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #11 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener.php(112): Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager-&gt;authenticate(Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #12 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener.php(144): Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener-&gt;attemptAuthentication(Object(Symfony\Component\HttpFoundation\Request)) #13 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(2644): Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener-&gt;handle(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #14 [internal function]: Symfony\Component\Security\Http\Firewall-&gt;onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher)) #15 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\WrappedListener.php(61): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher)) #16 [internal function]: Symfony\Component\EventDispatcher\Debug\WrappedListener-&gt;__invoke(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) #17 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(1873): call_user_func(Object(Symfony\Component\EventDispatcher\Debug\WrappedListener), Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) #18 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(1788): Symfony\Component\EventDispatcher\EventDispatcher-&gt;doDispatch(Array, 'kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #19 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher.php(138): Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #20 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(123): Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher-&gt;dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #21 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #22 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel.php(67): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(183): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 C:\wamp\www\Monusco\Monusco_old1\web\app_dev.php(27): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main} {"exception":"[object] (Zend\\Ldap\\Exception\\LdapException(code: 49): 0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v23f0): LOCAL\\boff at C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\zendframework\\zend-ldap\\src\\Ldap.php:851)"} [] [2017-11-13 15:53:33] ldap_driver.DEBUG: ldap_search(OU=monusco,DC=tritech,DC=local, (&amp;(&amp;(ObjectClass=Person))(uid=boff)), [array]) {"action":"ldap_search","base_dn":"OU=monusco,DC=tritech,DC=local","filter":"(&amp;(&amp;(ObjectClass=Person))(uid=boff))","attributes":[]} [] [2017-11-13 15:53:33] ldap_driver.DEBUG: exception 'Zend\Ldap\Exception\LdapException' with message '0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v23f0): LOCAL\boff' in C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php:851 Stack trace: #0 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(104): Zend\Ldap\Ldap-&gt;bind() #1 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(929): Zend\Ldap\Ldap-&gt;getResource() #2 C:\wamp\www\Monusco\Monusco_old1\vendor\zendframework\zend-ldap\src\Ldap.php(1082): Zend\Ldap\Ldap-&gt;search('(&amp;(&amp;(ObjectClas...', 'OU=monusco,DC=t...', 1, Array, NULL, NULL, 0, 0) #3 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Driver\ZendLdapDriver.php(53): Zend\Ldap\Ldap-&gt;searchEntries('(&amp;(&amp;(ObjectClas...', 'OU=monusco,DC=t...', 1, Array) #4 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Ldap\LdapManager.php(40): FR3D\LdapBundle\Driver\ZendLdapDriver-&gt;search('OU=monusco,DC=t...', '(&amp;(&amp;(ObjectClas...') #5 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Ldap\LdapManager.php(31): FR3D\LdapBundle\Ldap\LdapManager-&gt;findUserBy(Array) #6 C:\wamp\www\Monusco\Monusco_old1\vendor\fr3d\ldap-bundle\Security\User\LdapUserProvider.php(34): FR3D\LdapBundle\Ldap\LdapManager-&gt;findUserByUsername('boff') #7 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Core\User\ChainUserProvider.php(49): FR3D\LdapBundle\Security\User\LdapUserProvider-&gt;loadUserByUsername('boff') #8 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider.php(81): Symfony\Component\Security\Core\User\ChainUserProvider-&gt;loadUserByUsername('boff') #9 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php(68): Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider-&gt;retrieveUser('boff', Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #10 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(2729): Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider-&gt;authenticate(Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #11 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener.php(112): Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager-&gt;authenticate(Object(Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken)) #12 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener.php(144): Symfony\Component\Security\Http\Firewall\UsernamePasswordFormAuthenticationListener-&gt;attemptAuthentication(Object(Symfony\Component\HttpFoundation\Request)) #13 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(2644): Symfony\Component\Security\Http\Firewall\AbstractAuthenticationListener-&gt;handle(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #14 [internal function]: Symfony\Component\Security\Http\Firewall-&gt;onKernelRequest(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher)) #15 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\WrappedListener.php(61): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher)) #16 [internal function]: Symfony\Component\EventDispatcher\Debug\WrappedListener-&gt;__invoke(Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) #17 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(1873): call_user_func(Object(Symfony\Component\EventDispatcher\Debug\WrappedListener), Object(Symfony\Component\HttpKernel\Event\GetResponseEvent), 'kernel.request', Object(Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher)) #18 C:\wamp\www\Monusco\Monusco_old1\app\cache\dev\classes.php(1788): Symfony\Component\EventDispatcher\EventDispatcher-&gt;doDispatch(Array, 'kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #19 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher.php(138): Symfony\Component\EventDispatcher\EventDispatcher-&gt;dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #20 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(123): Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher-&gt;dispatch('kernel.request', Object(Symfony\Component\HttpKernel\Event\GetResponseEvent)) #21 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #22 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel.php(67): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 C:\wamp\www\Monusco\Monusco_old1\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php(183): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 C:\wamp\www\Monusco\Monusco_old1\web\app_dev.php(27): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main} {"exception":"[object] (Zend\\Ldap\\Exception\\LdapException(code: 49): 0x31 (Invalid credentials; 80090308: LdapErr: DSID-0C0903C5, comment: AcceptSecurityContext error, data 52e, v23f0): LOCAL\\boff at C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\zendframework\\zend-ldap\\src\\Ldap.php:851)"} [] [2017-11-13 15:53:33] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException(code: 0): An error occur with the search operation. at C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Security\\Core\\Authentication\\Provider\\DaoAuthenticationProvider.php:92, FR3D\\LdapBundle\\Driver\\LdapDriverException(code: 0): An error occur with the search operation. at C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\fr3d\\ldap-bundle\\Driver\\ZendLdapDriver.php:60)"} [] [2017-11-13 15:53:33] security.DEBUG: Authentication failure, redirect triggered. {"failure_path":"/login"} [] [2017-11-13 15:53:34] request.INFO: Matched route "fos_user_security_login". {"route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::loginAction","_route":"fos_user_security_login"},"request_uri":"http://localhost/monusco/Monusco_old1/web/app_dev.php/login"} [] [2017-11-13 15:53:34] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] [2017-11-13 15:53:34] php.INFO: The FOS\UserBundle\Controller\SecurityController class extends Symfony\Component\DependencyInjection\ContainerAware that is deprecated since version 2.8, to be removed in 3.0. Use the ContainerAwareTrait instead. {"type":16384,"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Debug\\DebugClassLoader.php","line":223,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Debug\\DebugClassLoader.php","line":223,"function":"trigger_error"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"-&gt;"},{"function":"spl_autoload_call"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\app\\cache\\dev\\classes.php","line":2234,"function":"class_exists"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\app\\cache\\dev\\classes.php","line":2570,"function":"createController","class":"Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\app\\cache\\dev\\classes.php","line":2180,"function":"createController","class":"Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerResolver","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver.php","line":42,"function":"getController","class":"Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":130,"function":"getController","class":"Symfony\\Component\\HttpKernel\\Controller\\TraceableControllerResolver","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":62,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel.php","line":67,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":183,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\web\\app_dev.php","line":27,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"-&gt;"}]} [] [2017-11-13 15:53:34] php.INFO: The Symfony\Component\Security\Core\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage or Symfony\Component\Security\Core\Authorization\AuthorizationChecker instead. {"type":16384,"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Security\\Core\\SecurityContext.php","line":14,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Security\\Core\\SecurityContext.php","line":14,"function":"trigger_error"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Debug\\DebugClassLoader.php","line":169,"args":["C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Security\\Core\\SecurityContext.php"],"function":"require"},{"function":"loadClass","class":"Symfony\\Component\\Debug\\DebugClassLoader","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\friendsofsymfony\\user-bundle\\FOS\\UserBundle\\Controller\\SecurityController.php","line":27,"function":"spl_autoload_call"},{"function":"loginAction","class":"FOS\\UserBundle\\Controller\\SecurityController","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":142,"function":"call_user_func_array"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":62,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel.php","line":67,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":183,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\web\\app_dev.php","line":27,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"-&gt;"}]} [] [2017-11-13 15:53:34] php.INFO: The "form.csrf_provider" service is deprecated since Symfony 2.4 and will be removed in 3.0. Use the "security.csrf.token_manager" service instead. {"type":16384,"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\app\\cache\\dev\\appDevDebugProjectContainer.php","line":727,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\app\\cache\\dev\\appDevDebugProjectContainer.php","line":727,"function":"trigger_error"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\DependencyInjection\\Container.php","line":304,"function":"getForm_CsrfProviderService","class":"appDevDebugProjectContainer","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\friendsofsymfony\\user-bundle\\FOS\\UserBundle\\Controller\\SecurityController.php","line":43,"function":"get","class":"Symfony\\Component\\DependencyInjection\\Container","type":"-&gt;"},{"function":"loginAction","class":"FOS\\UserBundle\\Controller\\SecurityController","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":142,"function":"call_user_func_array"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":62,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel.php","line":67,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":183,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\web\\app_dev.php","line":27,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"-&gt;"}]} [] [2017-11-13 15:53:34] php.INFO: The Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter::generateCsrfToken method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead. {"type":16384,"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfTokenManagerAdapter.php","line":50,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfTokenManagerAdapter.php","line":50,"function":"trigger_error"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\friendsofsymfony\\user-bundle\\FOS\\UserBundle\\Controller\\SecurityController.php","line":43,"function":"generateCsrfToken","class":"Symfony\\Component\\Form\\Extension\\Csrf\\CsrfProvider\\CsrfTokenManagerAdapter","type":"-&gt;"},{"function":"loginAction","class":"FOS\\UserBundle\\Controller\\SecurityController","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":142,"function":"call_user_func_array"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\HttpKernel.php","line":62,"function":"handleRaw","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel.php","line":67,"function":"handle","class":"Symfony\\Component\\HttpKernel\\HttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":183,"function":"handle","class":"Symfony\\Component\\HttpKernel\\DependencyInjection\\ContainerAwareHttpKernel","type":"-&gt;"},{"file":"C:\\wamp\\www\\Monusco\\Monusco_old1\\web\\app_dev.php","line":27,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"-&gt;"}]} [] [2017-11-13 15:53:34] translation.WARNING: Translation not found. {"id":"An error occur with the search operation.","domain":"FOSUserBundle","locale":"fr"} [] [2017-11-13 15:53:34] request.INFO: Matched route "_wdt". {"route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"c4f1cb","_route":"_wdt"},"request_uri":"http://localhost/monusco/Monusco_old1/web/app_dev.php/_wdt/c4f1cb"} [] [2017-11-13 15:53:35] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] </code></pre> <p>Thanks,</p> </div>

从现有路由重定向到新路由

<div class="post-text" itemprop="text"> <p>I'm trying to redirect if a user is not logged in (works with FOSUser and SonataAdmin) and calls either <code>http://domain.com/app_dev.php</code> (dev) or <code>http://domain.com</code> (prod) then I want in both cases redirect to <code>/login</code> so I wrote this config at <code>app/routing.yml</code>:</p> <pre><code>root: path: / defaults: _controller: FrameworkBundle:Redirect:urlRedirect path: /login permanent: true </code></pre> <p>That works but I have a problem since I have this in a controller:</p> <pre><code>/** * @param Request $request * * @return array * @Route("/", name="brand") * @Method("GET") * @Template() */ public function indexAction(Request $request) { .... } </code></pre> <p>Then when I try to call <code>brand</code> route as per example using a link like: <code>http://domain.com/app_dev.php/?email=7x-xRFClkjw</code> (dev) or <code>http://domain.com/?email=7x-xRFClkjw</code> (prod) I got redirected to <code>/login</code>. My best idea is to change my code into this:</p> <pre><code>/** * @param Request $request * * @return array * @Route("/bp", name="brand") * @Method("GET") * @Template() */ public function indexAction(Request $request) { .... } </code></pre> <p>And then <a href="http://symfony.com/doc/current/cookbook/routing/redirect_in_config.html#redirecting-using-a-route" rel="nofollow">redirect using a route</a> to the new <code>/bp</code> instead to <code>/</code> for that function (this is mainly because users already has a tons of emails that had links as the previously shared and I can't change that). But I've not idea in how to write this rule in <code>routing.yml</code> because if I wrote this:</p> <pre><code>bp: path: / defaults: _controller: FrameworkBundle:Redirect:redirect route: brand permanent: true </code></pre> <p>I will end up with a redirect loop. I could change also how default route to <code>/login</code> is setup I just can't find the right documentation. The big idea behind this post is to setup default route for <code>/</code>. Can any give me some help on this?</p> <p>As extra info this is part of my <code>security.yml</code> file:</p> <pre><code>firewalls: ... admin_area: pattern: ^/ anonymous: ~ form_login: provider: fos_userbundle csrf_provider: form.csrf_provider # the user is redirected here when they need to log in login_path: /login # submit the login form here check_path: /login_check # login success redirecting options (read further below) always_use_default_target_path: true default_target_path: /admin/dashboard target_path_parameter: _target_path use_referer: false failure_path: /admin/dashboard failure_forward: false logout: path: /logout </code></pre> <p><strong>UPDATE</strong></p> <p>Actually the code from @emmanuel-hdz-díaz give me another idea and I don't need to create a kernel listener or add to much code, simple by doing this at my controller:</p> <pre><code>if ($request-&gt;query-&gt;get('email')) { ... } else { return $this-&gt;redirect($this-&gt;generateUrl('sonata_user_admin_security_login')); } </code></pre> <p>I was able to redirect the user to the <code>/login</code> route.</p> </div>

Weblogic12c启动时报错

``` <2016-11-30 上午09时16分26秒 CST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true> <2016-11-30 上午09时16分26秒 CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true> <2016-11-30 上午09时16分27秒 CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.7-b01 from Oracle Corporation.> <2016-11-30 上午09时16分27秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 > <2016-11-30 上午09时16分28秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> <2016-11-30 上午09时16分28秒 CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> <2016-11-30 上午09时16分28秒 CST> <Notice> <LoggingService> <BEA-320400> <The log file D:\Oracle\Middleware\user_projects\domains\HNIIMS_domain\servers\AdminServer\logs\AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms, such as Windows.> <2016-11-30 上午09时16分28秒 CST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to D:\Oracle\Middleware\user_projects\domains\HNIIMS_domain\servers\AdminServer\logs\AdminServer.log00005. Log messages will continue to be logged in D:\Oracle\Middleware\user_projects\domains\HNIIMS_domain\servers\AdminServer\logs\AdminServer.log.> <2016-11-30 上午09时16分28秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file D:\Oracle\Middleware\user_projects\domains\HNIIMS_domain\servers\AdminServer\logs\AdminServer.log is opened. All server side log events will be written to this file.> <2016-11-30 上午09时16分28秒 CST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that wlntio.dll is in: 'D:\Program Files\Java\jdk1.7.0_15\bin;D:\Oracle\Middleware\wlserver_12.1\bin;D:\Oracle\Middleware\wlserver_12.1\server\bin' > <2016-11-30 上午09时16分29秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.> <2016-11-30 上午09时16分30秒 CST> <Warning> <Store> <BEA-280109> <Unable to load the native wlfileio library for the persistent file store "_WLS_AdminServer". The store will use buffered I/O. The store is still operating in a transactionally safe synchronous mode. See store open log messages for the requested and final write policies.> <2016-11-30 上午09时16分31秒 CST> <Warning> <HTTP> <BEA-101296> <Unable to load the default compiler class "com.sun.tools.javac.Main". Using the default javac compiler to compile JSPs.> <2016-11-30 上午09时16分34秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> <2016-11-30 上午09时16分34秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> Exception in thread "Timer-1" Exception in thread "[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'" Exception in thread "[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'" Exception in thread "[STANDBY] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'" Exception in thread "[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'" Exception in thread "[STANDBY] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'" ```

在Symfony中使用HWIOAuth进行Twitter身份验证

<div class="post-text" itemprop="text"> <p>I'm trying to authenticate the user with Twitter using Symfony 2.7.3 + HWIOAuth 0.4, but I have some kind of authentication problem right at the beginning of the process. It just redirects me to the login page.</p> <p>If I dump the $apiResponse in the getRequestToken method of HWIOAuth, I get this:</p> <pre><code>object(Buzz\Message\Response)#313 (5) { ["protocolVersion":"Buzz\Message\Response":private]=&gt; NULL ["statusCode":"Buzz\Message\Response":private]=&gt; NULL ["reasonPhrase":"Buzz\Message\Response":private]=&gt; NULL ["headers":"Buzz\Message\AbstractMessage":private]=&gt; array(21) { [0]=&gt; string(35) "HTTP/1.1 401 Authorization Required" [1]=&gt; string(77) "cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0" [2]=&gt; string(51) "content-disposition: attachment; filename=json.json" [3]=&gt; string(18) "content-length: 64" [4]=&gt; string(45) "content-type: application/json; charset=utf-8" [5]=&gt; string(35) "date: Sat, 01 Aug 2015 18:11:43 GMT" [6]=&gt; string(38) "expires: Tue, 31 Mar 1981 05:00:00 GMT" [7]=&gt; string(44) "last-modified: Sat, 01 Aug 2015 18:11:43 GMT" [8]=&gt; string(16) "pragma: no-cache" [9]=&gt; string(13) "server: tsa_b" [10]=&gt; string(112) "set-cookie: guest_id=v1%3A143845270388433210; Domain=.twitter.com; Path=/; Expires=Mon, 31-Jul-2017 18:11:43 UTC" [11]=&gt; string(24) "status: 401 Unauthorized" [12]=&gt; string(44) "strict-transport-security: max-age=631138519" [13]=&gt; string(55) "www-authenticate: OAuth realm="https://api.twitter.com"" [14]=&gt; string(51) "x-connection-hash: 92baec3955e785a4708e92a6751183de" [15]=&gt; string(31) "x-content-type-options: nosniff" [16]=&gt; string(27) "x-frame-options: SAMEORIGIN" [17]=&gt; string(20) "x-response-time: 103" [18]=&gt; string(31) "x-transaction: de08c20cd3de91f7" [19]=&gt; string(41) "x-twitter-response-tags: BouncerCompliant" [20]=&gt; string(31) "x-xss-protection: 1; mode=block" } ["content":"Buzz\Message\AbstractMessage":private]=&gt; string(64) "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" } </code></pre> <p>Log:</p> <pre><code>[2015-08-01 20:04:15] security.INFO: An AuthenticationException was thrown; redirecting to authentication entry point. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException(code: 0): Not a valid request token. at /home/isty001/PhpstormProjects/twitter-client/vendor/hwi/oauth-bundle/HWI/Bundle/OAuthBundle/OAuth/ResourceOwner/GenericOAuth1ResourceOwner.php:171)"} [] [2015-08-01 20:04:15] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\Security\Http\Firewall\ExceptionListener::onKernelException". [] [] [2015-08-01 20:04:15] event.DEBUG: Listener "Symfony\Component\Security\Http\Firewall\ExceptionListener::onKernelException" stopped propagation of the event "kernel.exception". [] [] [2015-08-01 20:04:15] event.DEBUG: Listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException" was not called for event "kernel.exception". [] [] [2015-08-01 20:04:15] event.DEBUG: Listener "Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException" was not called for event "kernel.exception". </code></pre> <p>My security.yml:</p> <pre><code>security: acl: connection: default encoders: Foggyline\Bundle\TickerBundle\Entity\User: algorithm: sha1 encode_as_base64: false iterations: 1 role_hierarchy: ROLE_USER: ROLE_USER ROLE_ADMIN: ROLE_USER ROLE_SUPER_ADMIN: [ ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ] providers: my_custom_hwi_provider: id: twitter_user.oauth_user_provider firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: pattern: ^/ anonymous: true logout: true logout: path: /logout target: / oauth: resource_owners: twitter: "/login/check-twitter" login_path: /login failure_path: /login oauth_user_provider: service: twitter_user.oauth_user_provider access_control: - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/connect, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/, roles: ROLE_USER } </code></pre> <p>routing.yml:</p> <pre><code>hwi_oauth_login: resource: "@HWIOAuthBundle/Resources/config/routing/login.xml" prefix: / hwi_oauth_redirect: resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml" prefix: /connect user: resource: "@UserBundle/Resources/config/routing.yml" prefix: / app: resource: "@AppBundle/Controller/" type: annotation twitter_login: pattern: /login/check-twitter logout: path: /logout </code></pre> <p>services.yml:</p> <pre><code>services: hwi_oauth.user.provider.entity: class: HWI\Bundle\OAuthBundle\Security\Core\User\OAuthUserProvider twitter_user.oauth_user_provider: class: UserBundle\Provider\OauthProvider arguments: [@session, @doctrine, @service_container] </code></pre> </div>

weblogic 12.1.1启动后又被自己shutdown了。求助大侠。

[weblogic@songpy base_domain]$ ./startWebLogic.sh . . JAVA Memory arguments: -Xms256m -Xmx512m -XX:MaxPermSize=256m . WLS Start Mode=Production . CLASSPATH=/u02/weblogic/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u02/weblogic/patch_oepe101/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u02/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u02/weblogic/jdk160_29/lib/tools.jar:/u02/weblogic/wlserver_12.1/server/lib/weblogic_sp.jar:/u02/weblogic/wlserver_12.1/server/lib/weblogic.jar:/u02/weblogic/modules/features/weblogic.server.modules_12.1.1.0.jar:/u02/weblogic/wlserver_12.1/server/lib/webservices.jar:/u02/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u02/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u02/weblogic/wlserver_12.1/common/derby/lib/derbyclient.jar:/u02/weblogic/wlserver_12.1/server/lib/xqrl.jar:/usr/java/jdk1.6.0_22/lib . PATH=/u02/weblogic/wlserver_12.1/server/bin:/u02/weblogic/modules/org.apache.ant_1.7.1/bin:/u02/weblogic/jdk160_29/jre/bin:/u02/weblogic/jdk160_29/bin:/usr/java/jdk1.6.0_22/bin:/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin . *************************************************** * To start WebLogic Server, use a username and * * password assigned to an admin-level user. For * * server administration, use the WebLogic Server * * console at http://hostname:port/console * *************************************************** starting weblogic with Java version: java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11) Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode) Starting WLS with line: /u02/weblogic/jdk160_29/bin/java -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/u02/weblogic/wlserver_12.1/server/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -Djava.endorsed.dirs=/u02/weblogic/jdk160_29/jre/lib/endorsed:/u02/weblogic/wlserver_12.1/endorsed -da -Dplatform.home=/u02/weblogic/wlserver_12.1 -Dwls.home=/u02/weblogic/wlserver_12.1/server -Dweblogic.home=/u02/weblogic/wlserver_12.1/server -Dweblogic.management.discover=true -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/u02/weblogic/patch_wls1211/profiles/default/sysext_manifest_classpath:/u02/weblogic/patch_oepe101/profiles/default/sysext_manifest_classpath:/u02/weblogic/patch_ocp371/profiles/default/sysext_manifest_classpath weblogic.Server <Feb 20, 2014 4:02:44 PM CST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true> <Feb 20, 2014 4:02:44 PM CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true> <Feb 20, 2014 4:02:45 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Server VM Version 20.4-b02 from Sun Microsystems Inc..> <Feb 20, 2014 4:02:48 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server Temporary Patch for 13340309 Thu Feb 16 18:30:21 IST 2012 WebLogic Server Temporary Patch for 13019800 Mon Jan 16 16:53:54 IST 2012 WebLogic Server Temporary Patch for BUG13391585 Thu Feb 02 10:18:36 IST 2012 WebLogic Server Temporary Patch for 13516712 Mon Jan 30 15:09:33 IST 2012 WebLogic Server Temporary Patch for BUG13641115 Tue Jan 31 11:19:13 IST 2012 WebLogic Server Temporary Patch for BUG13603813 Wed Feb 15 19:34:13 IST 2012 WebLogic Server Temporary Patch for 13424251 Mon Jan 30 14:32:34 IST 2012 WebLogic Server Temporary Patch for 13361720 Mon Jan 30 15:24:05 IST 2012 WebLogic Server Temporary Patch for BUG13421471 Wed Feb 01 11:24:18 IST 2012 WebLogic Server Temporary Patch for BUG13657792 Thu Feb 23 12:57:33 IST 2012 WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 > <Feb 20, 2014 4:02:52 PM CST> <Info> <Security> <BEA-090065> <Getting boot identity from user.> Enter username to boot WebLogic server:weblogic Enter password to boot WebLogic server: <Feb 20, 2014 4:03:04 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> <Feb 20, 2014 4:03:04 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> <Feb 20, 2014 4:03:04 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file /u02/weblogic/user_projects/domains/base_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.> <Feb 20, 2014 4:03:11 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.> <Feb 20, 2014 4:03:19 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> <Feb 20, 2014 4:03:19 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.175.149:7001 for protocols iiop, t3, ldap, snmp, http.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:a00:27ff:fe88:81c5:7001 for protocols iiop, t3, ldap, snmp, http.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.> <Feb 20, 2014 4:03:32 PM CST> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <WebLogicServer> <BEA-000329> <Started the WebLogic Server Administration Server "AdminServer" for domain "base_domain" running in production mode.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.> <Feb 20, 2014 4:03:32 PM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.> Feb 20, 2014 4:03:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation PreparedOperation and @Action on its associated Web Method preparedOperation did not match and will cause problems in dispatching the requests Feb 20, 2014 4:03:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation AbortedOperation and @Action on its associated Web Method abortedOperation did not match and will cause problems in dispatching the requests Feb 20, 2014 4:03:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation ReadOnlyOperation and @Action on its associated Web Method readOnlyOperation did not match and will cause problems in dispatching the requests Feb 20, 2014 4:03:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation CommittedOperation and @Action on its associated Web Method committedOperation did not match and will cause problems in dispatching the requests Feb 20, 2014 4:03:36 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation ReplayOperation and @Action on its associated Web Method replayOperation did not match and will cause problems in dispatching the requests Feb 20, 2014 4:03:37 PM com.sun.xml.ws.model.JavaMethodImpl freeze WARNING: Input Action on WSDL operation RegisterOperation and @Action on its associated Web Method registerOperation did not match and will cause problems in dispatching the requests ^C<Feb 20, 2014 4:05:26 PM CST> <Notice> <WebLogicServer> <BEA-000388> <JVM called the WebLogic Server shutdown hook. The server will force shutdown now.> <Feb 20, 2014 4:05:26 PM CST> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SUSPENDING.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <Server> <BEA-002607> <Channel "Default", listening on 192.168.175.149:7001, was shut down.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <Server> <BEA-002607> <Channel "Default[1]", listening on fe80:0:0:0:a00:27ff:fe88:81c5:7001, was shut down.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <Server> <BEA-002607> <Channel "Default[2]", listening on 127.0.0.1:7001, was shut down.> <Feb 20, 2014 4:05:26 PM CST> <Notice> <Server> <BEA-002607> <Channel "Default[3]", listening on 0:0:0:0:0:0:0:1:7001, was shut down.>

weblogic启动的时候为什么有这样问题 求大神。。

![图片说明](https://img-ask.csdn.net/upload/201607/01/1467355669_513175.png)

Apache重新启动修复的ONE VS域上的空白页面

<div class="post-text" itemprop="text"> <p>You can see the whole thread (which no-one from WP or anyone else) has been able to help me with here &gt;</p> <p>During the thread I actually updated my site checker plugin to include the output of free / disk swapped memory, free RAM, used RAM, PHP memory use at time of recording etc. </p> <p>You can see that plugin (and tell me if anything is wrong with it) here &gt;</p> <p><a href="http://wordpress.org/plugins/strictly-system-check/" rel="nofollow">http://wordpress.org/plugins/strictly-system-check/</a></p> <p>The thread is here.</p> <p><a href="https://wordpress.org/support/topic/blank-scree-due-to-memory-allocation-failure?replies=5#post-5807762" rel="nofollow">https://wordpress.org/support/topic/blank-scree-due-to-memory-allocation-failure?replies=5#post-5807762</a></p> <p>I am on a VPS with 2GB Ram, 4GB VM, behind Cloudflare, ban over 43% of traffic from .htaccess and network rules although I now think due to there not being a Cloudflare repair IP patch for Lenny Linux 5 (old machine I know - not got time to fix at moment) that a lot of these network rules are being ignored as they all come through as Cloudflare.</p> <p>In VMIN the info says </p> <p><strong>Kernel and CPU Linux 2.6.32.9-rscloud on x86_64 CPU load averages 0.30 (1 min) 0.48 (5 mins) 0.79 (15 mins) Running processes 146 Real memory 2.01 GB total, 956.26 MB used Virtual memory 4 GB total, 503.59 MB used Local disk space 74.81 GB total, 22.54 GB used Package updates All Virtualmin packages are up to date.</strong></p> <p>The last post which happened when I checked my email at 6am this Sunday morning showed me an error report at 5.09 (runs at 7 past the hour).</p> <p>Full report is at the bottom.</p> <p>Hi</p> <p>Right I just ran into the white screen of death again on my site.</p> <p>Homepage with wp-debug ON said</p> <p>Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078</p> <p>Warning: Cannot modify header information - headers already sent by (output started at /home/darkpolitricks/public_html/wp-includes/functions.php:3078) in /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 91</p> <p>No fatal errors on homepage</p> <p>when I went to wp-admin / wp-login.php I could login though.</p> <p>So I turned the debug back on No errors just warnings e.g</p> <p>Notice: Undefined variable: cookies in /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php on line 660</p> <p>Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/darkpolitricks/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase1.php:660) in /home/darkpolitricks/public_html/wp-content/plugins/easy-adsense-lite/EzTran.php on line 196</p> <p>Notice: attribute_escape is deprecated since version 2.8! Use esc_attr() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078</p> <p>Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /home/darkpolitricks/public_html/wp-includes/functions.php on line 3078</p> <p>This is a theme my mate put together based on Carrington Blog I don't know if these warnings are important but they don't cause issues most of the time. </p> <p><strong>No Errors or Fatal Errors could be seen in the back end.</strong></p> <p><strong>At the same time note all my other sites on the same server were working fine.</strong> </p> <p>I tried my "bypass" cloudflare domain e.g rob.example.com but that didn't do anything.</p> <p>As always a restart of Apache fixed this one site again.</p> <p>Here is output I got during the time the homepage/front end was blank from the server.</p> <p>I ran a TOP ignoring Zombie processes e.g top -i -H</p> <p>Results 06:02:47 up 16 days, 3:05, 1 user, load average: 1.12, 1.05, 1.14 Tasks: 136 total, 2 running, 134 sleeping, 0 stopped, <strong> 0 zombie</strong> Cpu(s): 4.4%us, 1.8%sy, 0.0%ni, 49.0%id, 44.7%wa, 0.0%hi, 0.0%si, 0.1%st Mem: 2109548k total, 2015788k used, 93760k free, 9332k buffers Swap: 4194296k total, 504124k used, 3690172k free, 1094764k cached</p> <p>PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20297 www-data 20 0 283m 47m 29m D 5 2.3 0:00.19 apache2 75 root 20 0 0 0 0 R 0 0.0 0:18.88 kblockd/0 1901 root 20 0 0 0 0 D 0 0.0 13:19.73 flush-8:1 679 mysql 20 0 656m 289m 2368 D 0 14.0 6:26.27 mysqld 20296 root 20 0 18888 1280 944 R 0 0.1 0:00.00 top</p> <p>A free command </p> <pre><code> total used free shared buffers cached </code></pre> <p>Mem: 2109548 1767116 342432 0 6376 920084 -/+ buffers/cache: 840656 1268892 Swap: 4194296 504092 3690204</p> <p>This shows me that there wad memory about and not many apache processes.</p> <p>I then got the results of my scheduled system report (which kicked it all off otherwise I wouldn't have know the site was down)</p> <pre><code>System Report: 2014-07-20 05:09:00 Initiating System Report... Using Strictly System Check Version: 1.0.8 Initiating an HTTP request to http://www.example.com The HTTP request to http://www.example.com took 1 second(s) to respond and returned a status code of 500 The specified search text &lt;strong&gt;read more&lt;/strong&gt; could not be located within the HTTP response The server is running under the user of www-data &lt;strong&gt;The server load is currently 0.36 The server load is okay Your available server memory is 2.00GB Your current server memory usaage was 91.51% Your available disk swap memory is 4GB Your disk swap memory usage is 14.93% MySQL DB Real Memory Size: 235.63MB The PHP Memory usage at the time of the report was 1.25MB&lt;/strong&gt; MySQL has been running for: 16 days 2 hours 9 mins 40 secs Total Connections: 605071 - Aborted: 0 - Connections Per Hour 1566 Total Queries: 33838003 - Queries / Per Hour 87626 Joins without indexes: 0 - Joins without indexes Per Hour 0 Total Reads: 5768028 (88%) - Total Writes 733689 (12%) Initiating a check for corrupt tables and indexes Table: wp_commentmeta does not need repairing Table: wp_comments does not need repairing Table: wp_links does not need repairing Table: wp_options does not need repairing Table: wp_postmeta does not need repairing Table: wp_posts does not need repairing Table: wp_term_relationships does not need repairing Table: wp_term_taxonomy does not need repairing Table: wp_terms does not need repairing Table: wp_usermeta does not need repairing Table: wp_users does not need repairing Table: wp_wbz404_logs does not need repairing Table: wp_wbz404_redirects does not need repairing Table: wp_wpo_campaign does not need repairing Table: wp_wpo_campaign_category does not need repairing Table: wp_wpo_campaign_feed does not need repairing Table: wp_wpo_campaign_post does not need repairing Table: wp_wpo_campaign_word does not need repairing Table: wp_wpo_log does not need repairing No repairing of tables was required Completed check for corrupt tables and indexes The system is currently configured to accept a maximum of 25 database connections At the time of reporting the database was running 1 query The current database load is 4% The database load is okay The system is not set up to OPTIMIZE the tables or the server load of 0.36 was below the threshold for an OPTIMIZE of 15. The system report concludes that the site is having problems and requires some immediate attention. An email is being sent to me@example.com Report Completed At 2014-07-20 05:09:00 Strictly Software Plugins for Wordpress </code></pre> <p>So this happens out of the blue and a restart of Apache fixes it always. </p> <p>I am guessing due to security and the fact I am using www-data to init the call a blank screen of death cannot be fixed with a restart of apache automatically using shell_exec. Maybe I need a demon running on the server to do similar checks and then run it - horrible idea though - want to fix underlying problem. </p> <p>Must BE some PHP script or service killing the system (only one - others work on same server)</p> <p>Therefore I am at a loss.</p> <p>The only errors in the log file for that time period were client denied (firewall blocks) e.g</p> <p>[Sun Jul 20 04:36:12 2014] [error] [client 188.114.99.241] client denied by server configuration: /home/mysite/public_html/2013, referer: <a href="https://www.google.com/" rel="nofollow">https://www.google.com/</a> [Sun Jul 20 05:16:46 2014] [error] [client 188.114.102.125] client denied by server configuration: /home/mysite/public_html/xmlrpc.php [Sun Jul 20 05:31:56 2014] [error] [client 188.114.99.232] client denied by server configuration: /home/mysite/public_html/wp-content/plugins/wp-o-matic/cache/4f002_http4.bp.blogspot.com-A81P4mnlJ2cUnv41979RKIAAAAAAABAU4AZk14sNBKBs329.jpg [Sun Jul 20 05:56:49 2014] [error] [client 188.114.102.142] client denied by server configuration: /home/mysite/public_html/comments</p> <p>188.114.102.142 is a cloudflare IP addresss.</p> <p>As my box is old and I don't have the time there is not a Lenny patch from Cloudflare to get the IPS returned to their normal IPS in the files etc.</p> <p>I do have the WP Clouflare plugin installed that does Akismet though (and just that I believe).</p> <p>My report is scheduled to run at 7 past the hour. So I checked access logs.</p> <p>Everything running fine</p> <p>108.162.215.198 - - [20/Jul/2014:04:49:23 +0100] "GET / HTTP/1.1" 200 38027 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8" 0/927136 108.162.212.192 - - [20/Jul/2014:04:55:12 +0100] "GET / HTTP/1.1" 301 144 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +<a href="http://www.google.com/bot.html" rel="nofollow">http://www.google.com/bot.html</a>)" 0/348030 108.162.212.51 - - [20/Jul/2014:04:55:13 +0100] "GET / HTTP/1.1" 200 38030 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +<a href="http://www.google.com/bot.html" rel="nofollow">http://www.google.com/bot.html</a>)" 0/932853 108.162.221.68 - - [20/Jul/2014:04:55:19 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); <a href="http://spinn3r.com/robot" rel="nofollow">http://spinn3r.com/robot</a>) Gecko/2010040121 Firefox/3.0.19" 0/26488 108.162.216.160 - - [20/Jul/2014:05:00:58 +0100] "GET / HTTP/1.1" 301 144 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 0/805170 173.245.55.70 - - [20/Jul/2014:05:01:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 1/1210085</p> <p>then this request which was given a 403 forbidden</p> <p>108.162.221.68 - - [20/Jul/2014:04:55:19 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); <a href="http://spinn3r.com/robot" rel="nofollow">http://spinn3r.com/robot</a>) Gecko/2010040121 Firefox/3.0.19" 0/26488</p> <p>then all 500 status codes to the homepage until I rebooted</p> <p>108.162.216.160 - - [20/Jul/2014:05:00:58 +0100] "GET / HTTP/1.1" 301 144 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 0/805170 173.245.55.70 - - [20/Jul/2014:05:01:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 1/1210085 173.245.55.70 - - [20/Jul/2014:05:02:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 1/1188995 173.245.55.70 - - [20/Jul/2014:05:03:03 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 1/1155199 173.245.55.70 - - [20/Jul/2014:05:04:04 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16799781611961306038)" 1/1133494 173.245.54.199 - - [20/Jul/2014:05:06:17 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.59.10 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.10" 1/1156219 108.162.245.42 - - [20/Jul/2014:05:07:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +<a href="http://www.bing.com/bingbot.htm" rel="nofollow">http://www.bing.com/bingbot.htm</a>)" 1/1207917 173.245.55.163 - - [20/Jul/2014:05:07:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1" 1/1190563 173.245.55.70 - - [20/Jul/2014:05:08:20 +0100] "GET / HTTP/1.1" 500 20 "-" "Feedfetcher-Google; (+<a href="http://www.google.com/feedfetcher.html" rel="nofollow">http://www.google.com/feedfetcher.html</a>; 1 subscribers; feed-id=16675227896629445363)" 2/2765042</p> <p>me restarting Apache</p> <p>86.2.70.21 - - [20/Jul/2014:06:17:57 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0" 1/1176223</p> <p>All 200's to the homepage OR 403s where i have banned in .htaccess the robot</p> <p>141.101.99.192 - - [20/Jul/2014:06:19:41 +0100] "GET / HTTP/1.1" 200 38035 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36" 1/1087529 108.162.215.243 - - [20/Jul/2014:06:23:36 +0100] "GET / HTTP/1.1" 200 37137 "-" "Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)" 4/4362257 108.162.215.243 - - [20/Jul/2014:06:23:39 +0100] "GET / HTTP/1.1" 200 37136 "-" "Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)" 1/1161635 199.27.128.160 - - [20/Jul/2014:06:23:41 +0100] "GET / HTTP/1.1" 403 325 "<a href="http://www.baidu.com/search/spider.htm" rel="nofollow">http://www.baidu.com/search/spider.htm</a>" "Mozilla/5.0 (compatible; Baiduspider/2.0; +<a href="http://www.baidu.com/search/spider.html" rel="nofollow">http://www.baidu.com/search/spider.html</a>)" 0/26806 108.162.221.68 - - [20/Jul/2014:06:25:48 +0100] "GET / HTTP/1.1" 403 325 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); <a href="http://spinn3r.com/robot" rel="nofollow">http://spinn3r.com/robot</a>) Gecko/2010040121 Firefox/3.0.19" 0/27637 108.162.222.160 - - [20/Jul/2014:06:28:06 +0100] "GET / HTTP/1.1" 403 322 "-" "Mozilla/5.0 (compatible; Baiduspider/2.0; +<a href="http://www.baidu.com/search/spider.html" rel="nofollow">http://www.baidu.com/search/spider.html</a>)" 0/25588 173.245.55.182 - - [20/Jul/2014:06:35:28 +0100] "GET / HTTP/1.1" 200 24073 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 7_1_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D201 Safari/9537.53" 2/2279796</p> <p>time of my report</p> <p>108.162.245.42 - - [20/Jul/2014:05:07:00 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +<a href="http://www.bing.com/bingbot.htm" rel="nofollow">http://www.bing.com/bingbot.htm</a>)" 1/1207917 173.245.55.163 - - [20/Jul/2014:05:07:01 +0100] "GET / HTTP/1.1" 500 20 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1" 1/1190563</p> <p>However I did notice that this seemed to effect the homepage rather than other pages e.g requests to actual pages or posts were still having 200 status codes returned during this period of activity.</p> <p>So maybe it is something to do with WP Super Cache and the home page? Or cloudflare and the homepage?</p> <p>Any help would be very much appreciated to get to the bottom of this.</p> <p>Thanks</p> <p>Rob</p> </div>

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!

实现简单的文件系统

实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

MIPS单周期CPU-组成原理实验-华中科技大学

使用logisim布线完成的MIPS单周期CPU,可支持28条指令。跑马灯的代码已经装入了寄存器,可以直接开启时钟运行。

2019数学建模A题高压油管的压力控制 省一论文即代码

2019数学建模A题高压油管的压力控制省一完整论文即详细C++和Matlab代码,希望对同学们有所帮助

基于QT和OpenCV的五子棋实现源码

一个简单的五子棋应用,基于QT和OpenCV的实现源码,通过相邻棋子判断是否获胜,不包含人工智能算法,适合新手入门

Git 实用技巧

这几年越来越多的开发团队使用了Git,掌握Git的使用已经越来越重要,已经是一个开发者必备的一项技能;但很多人在刚开始学习Git的时候会遇到很多疑问,比如之前使用过SVN的开发者想不通Git提交代码为什么需要先commit然后再去push,而不是一条命令一次性搞定; 更多的开发者对Git已经入门,不过在遇到一些代码冲突、需要恢复Git代码时候就不知所措,这个时候哪些对 Git掌握得比较好的少数人,就像团队中的神一样,在队友遇到 Git 相关的问题的时候用各种流利的操作来帮助队友于水火。 我去年刚加入新团队,发现一些同事对Git的常规操作没太大问题,但对Git的理解还是比较生疏,比如说分支和分支之间的关联关系、合并代码时候的冲突解决、提交代码前未拉取新代码导致冲突问题的处理等,我在协助处理这些问题的时候也记录各种问题的解决办法,希望整理后通过教程帮助到更多对Git操作进阶的开发者。 本期教程学习方法分为“掌握基础——稳步进阶——熟悉协作”三个层次。从掌握基础的 Git的推送和拉取开始,以案例进行演示,分析每一个步骤的操作方式和原理,从理解Git 工具的操作到学会代码存储结构、演示不同场景下Git遇到问题的不同处理方案。循序渐进让同学们掌握Git工具在团队协作中的整体协作流程。 在教程中会通过大量案例进行分析,案例会模拟在工作中遇到的问题,从最基础的代码提交和拉取、代码冲突解决、代码仓库的数据维护、Git服务端搭建等。为了让同学们容易理解,对Git简单易懂,文章中详细记录了详细的操作步骤,提供大量演示截图和解析。在教程的最后部分,会从提升团队整体效率的角度对Git工具进行讲解,包括规范操作、Gitlab的搭建、钩子事件的应用等。 为了让同学们可以利用碎片化时间来灵活学习,在教程文章中大程度降低了上下文的依赖,让大家可以在工作之余进行学习与实战,并同时掌握里面涉及的Git不常见操作的相关知识,理解Git工具在工作遇到的问题解决思路和方法,相信一定会对大家的前端技能进阶大有帮助。

实用主义学Python(小白也容易上手的Python实用案例)

原价169,限时立减100元! 系统掌握Python核心语法16点,轻松应对工作中80%以上的Python使用场景! 69元=72讲+源码+社群答疑+讲师社群分享会&nbsp; 【哪些人适合学习这门课程?】 1)大学生,平时只学习了Python理论,并未接触Python实战问题; 2)对Python实用技能掌握薄弱的人,自动化、爬虫、数据分析能让你快速提高工作效率; 3)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; 4)想修炼更好的编程内功,优秀的工程师肯定不能只会一门语言,Python语言功能强大、使用高效、简单易学。 【超实用技能】 从零开始 自动生成工作周报 职场升级 豆瓣电影数据爬取 实用案例 奥运冠军数据分析 自动化办公:通过Python自动化分析Excel数据并自动操作Word文档,最终获得一份基于Excel表格的数据分析报告。 豆瓣电影爬虫:通过Python自动爬取豆瓣电影信息并将电影图片保存到本地。 奥运会数据分析实战 简介:通过Python分析120年间奥运会的数据,从不同角度入手分析,从而得出一些有趣的结论。 【超人气老师】 二两 中国人工智能协会高级会员 生成对抗神经网络研究者 《深入浅出生成对抗网络:原理剖析与TensorFlow实现》一书作者 阿里云大学云学院导师 前大型游戏公司后端工程师 【超丰富实用案例】 0)图片背景去除案例 1)自动生成工作周报案例 2)豆瓣电影数据爬取案例 3)奥运会数据分析案例 4)自动处理邮件案例 5)github信息爬取/更新提醒案例 6)B站百大UP信息爬取与分析案例 7)构建自己的论文网站案例

深度学习原理+项目实战+算法详解+主流框架(套餐)

深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)

C/C++跨平台研发从基础到高阶实战系列套餐

一 专题从基础的C语言核心到c++ 和stl完成基础强化; 二 再到数据结构,设计模式完成专业计算机技能强化; 三 通过跨平台网络编程,linux编程,qt界面编程,mfc编程,windows编程,c++与lua联合编程来完成应用强化 四 最后通过基于ffmpeg的音视频播放器,直播推流,屏幕录像,

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

Python界面版学生管理系统

前不久上传了一个控制台版本的学生管理系统,这个是Python界面版学生管理系统,这个是使用pycharm开发的一个有界面的学生管理系统,基本的增删改查,里面又演示视频和完整代码,有需要的伙伴可以自行下

Vue.js 2.0之全家桶系列视频课程

基于新的Vue.js 2.3版本, 目前新全的Vue.js教学视频,让你少走弯路,直达技术前沿! 1. 包含Vue.js全家桶(vue.js、vue-router、axios、vuex、vue-cli、webpack、ElementUI等) 2. 采用笔记+代码案例的形式讲解,通俗易懂

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

JAVA初级工程师面试36问(完结)

第三十一问: 说一下线程中sleep()和wait()区别? 1 . sleep()是让正在执行的线程主动让出CPU,当时间到了,在回到自己的线程让程序运行。但是它并没有释放同步资源锁只是让出。 2.wait()是让当前线程暂时退让出同步资源锁,让其他线程来获取到这个同步资源在调用notify()方法,才会让其解除wait状态,再次参与抢资源。 3. sleep()方法可以在任何地方使用,而wait()只能在同步方法或同步块使用。 ...

java jdk 8 帮助文档 中文 文档 chm 谷歌翻译

JDK1.8 API 中文谷歌翻译版 java帮助文档 JDK API java 帮助文档 谷歌翻译 JDK1.8 API 中文 谷歌翻译版 java帮助文档 Java最新帮助文档 本帮助文档是使用谷

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

智鼎(附答案).zip

并不是完整题库,但是有智鼎在线2019年9、10、11三个月的试题,有十七套以上题目,普通的网申行测题足以对付,可以在做题时自己总结一些规律,都不是很难

Visual Assist X 破解补丁

vs a's'sixt插件 支持vs2008-vs2019 亲测可以破解,希望可以帮助到大家

150讲轻松搞定Python网络爬虫

【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑

JavaWEB商城项目(包括数据库)

功能描述:包括用户的登录注册,以及个人资料的修改.商品的分类展示,详情,加入购物车,生成订单,到银行支付等!另外还有收货地址的和我的收藏等常用操作.环境(JDK 1.7 ,mysql 5.5,Ecli

Python数据挖掘简易入门

&nbsp; &nbsp; &nbsp; &nbsp; 本课程为Python数据挖掘方向的入门课程,课程主要以真实数据为基础,详细介绍数据挖掘入门的流程和使用Python实现pandas与numpy在数据挖掘方向的运用,并深入学习如何运用scikit-learn调用常用的数据挖掘算法解决数据挖掘问题,为进一步深入学习数据挖掘打下扎实的基础。

一学即懂的计算机视觉(第一季)

图像处理和计算机视觉的课程大家已经看过很多,但总有“听不透”,“用不了”的感觉。课程致力于创建人人都能听的懂的计算机视觉,通过生动、细腻的讲解配合实战演练,让学生真正学懂、用会。 【超实用课程内容】 课程内容分为三篇,包括视觉系统构成,图像处理基础,特征提取与描述,运动跟踪,位姿估计,三维重构等内容。课程理论与实战结合,注重教学内容的可视化和工程实践,为人工智能视觉研发及算法工程师等相关高薪职位就业打下坚实基础。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/26281 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,但是大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化 下载方式:电脑登录https://edu.csdn.net/course/detail/26281,点击右下方课程资料、代码、课件等打包下载

软件测试2小时入门

本课程内容系统、全面、简洁、通俗易懂,通过2个多小时的介绍,让大家对软件测试有个系统的理解和认识,具备基本的软件测试理论基础。 主要内容分为5个部分: 1 软件测试概述,了解测试是什么、测试的对象、原则、流程、方法、模型;&nbsp; 2.常用的黑盒测试用例设计方法及示例演示;&nbsp; 3 常用白盒测试用例设计方法及示例演示;&nbsp; 4.自动化测试优缺点、使用范围及示例‘;&nbsp; 5.测试经验谈。

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

课程主要面向嵌入式Linux初学者、工程师、学生 主要从一下几方面进行讲解: 1.linux学习路线、基本命令、高级命令 2.shell、vi及vim入门讲解 3.软件安装下载、NFS、Samba、FTP等服务器配置及使用

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

快速入门Android开发 视频 教程 android studio

这是一门快速入门Android开发课程,顾名思义是让大家能快速入门Android开发。 学完能让你学会如下知识点: Android的发展历程 搭建Java开发环境 搭建Android开发环境 Android Studio基础使用方法 Android Studio创建项目 项目运行到模拟器 项目运行到真实手机 Android中常用控件 排查开发中的错误 Android中请求网络 常用Android开发命令 快速入门Gradle构建系统 项目实战:看美图 常用Android Studio使用技巧 项目签名打包 如何上架市场

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

4小时玩转微信小程序——基础入门与微信支付实战

这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程

YOLOv3目标检测实战系列课程

《YOLOv3目标检测实战系列课程》旨在帮助大家掌握YOLOv3目标检测的训练、原理、源码与网络模型改进方法。 本课程的YOLOv3使用原作darknet(c语言编写),在Ubuntu系统上做项目演示。 本系列课程包括三门课: (1)《YOLOv3目标检测实战:训练自己的数据集》 包括:安装darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 (2)《YOLOv3目标检测:原理与源码解析》讲解YOLOv1、YOLOv2、YOLOv3的原理、程序流程并解析各层的源码。 (3)《YOLOv3目标检测:网络模型改进方法》讲解YOLOv3的改进方法,包括改进1:不显示指定类别目标的方法 (增加功能) ;改进2:合并BN层到卷积层 (加快推理速度) ; 改进3:使用GIoU指标和损失函数 (提高检测精度) ;改进4:tiny YOLOv3 (简化网络模型)并介绍 AlexeyAB/darknet项目。

Qt5 局域网通信软件(模仿QQ)

采用Qt5进行开发的局域网通信客户端+Server,界面模仿QQ的界面,聊天界面采用QWidget绘制的气泡!

Python数据清洗实战入门

本次课程主要以真实的电商数据为基础,通过Python详细的介绍了数据分析中的数据清洗阶段各种技巧和方法。

YOLOv3目标检测实战:训练自己的数据集

YOLOv3是一种基于深度学习的端到端实时目标检测方法,以速度快见长。本课程将手把手地教大家使用labelImg标注和使用YOLOv3训练自己的数据集。课程分为三个小项目:足球目标检测(单目标检测)、梅西目标检测(单目标检测)、足球和梅西同时目标检测(两目标检测)。 本课程的YOLOv3使用Darknet,在Ubuntu系统上做项目演示。包括:安装Darknet、给自己的数据集打标签、整理自己的数据集、修改配置文件、训练自己的数据集、测试训练出的网络模型、性能统计(mAP计算和画出PR曲线)和先验框聚类。 Darknet是使用C语言实现的轻型开源深度学习框架,依赖少,可移植性好,值得深入探究。 除本课程《YOLOv3目标检测实战:训练自己的数据集》外,本人推出了有关YOLOv3目标检测的系列课程,请持续关注该系列的其它课程视频,包括: 《YOLOv3目标检测实战:交通标志识别》 《YOLOv3目标检测:原理与源码解析》 《YOLOv3目标检测:网络模型改进方法》 敬请关注并选择学习!

Python可以这样学(第一季:Python内功修炼)

董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。

ANSI-VITA-46.0-2007(中文翻译版)_V1.0.pdf

ANSI-VITA 46.0 2007老版本的的英文版本的中文翻译版本,含目录,通过谷歌翻译进行文字翻译,翻译的不是很专业,对初学者理解VPX接口及协议有一定的帮助,后续会对翻译进行改进。

Java 最常见的 200+ 面试题:面试必备

这份面试清单是从我 2015 年做了 TeamLeader 之后开始收集的,一方面是给公司招聘用,另一方面是想用它来挖掘在 Java 技术栈中,还有那些知识点是我不知道的,我想找到这些技术盲点,然后修复它,以此来提高自己的技术水平。虽然我是从 2009 年就开始参加编程工作了,但我依旧觉得自己现在要学的东西很多,并且学习这些知识,让我很有成就感和满足感,那所以何乐而不为呢? 说回面试的事,这份面试...

相关热词 c# 不能序列化继承类 c# char* 调用 c# 开发dll模板 c#添加控件到工具箱 c#控制台组合数 编程计算猴子吃桃问题c# c# wpf 背景透明 随机抽取号码软件c# c# 开发环境 c# 属性和字段
立即提问