When scan project it notification error but in web server it notification Successful analysis

I use sonarqube-8.6.1.40680 and sonar-scanner-4.6.0.2311-windows
when i scan project
it had error

Blockquote
INFO: 2 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for php: Sonar way
INFO: ------------- Run sensors on module astrol_test_new_111
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=434ms
INFO: Sensor CSS Rules [cssfamily]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Sensor CSS Rules [cssfamily] (done) | time=14096ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=56ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=6ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=79ms
INFO: Sensor PHP sensor [php]
INFO: Starting PHP symbol indexer
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Starting PHP rules
INFO: 2 source files to be analyzed
ERROR: Unable to parse file [file:///H:/Astrol/1181_release/app/Http/Controllers/AnsTest/AdminController.php] at line 42
ERROR: Parse error at line 42 column 21:

32: * @return void
33: */
34: public function getAdminControllerList(Request $request)
35: {
36: ABLog::start(‘AM0401’, $request);
37:
38: $haNoiVietNam = “H? N?i Vi?t Nam”;
39: echo ("$haNoiVietNam");
40:
41: echo(“Hello”); // Noncompliant, but it works
42: echo(“Hello”, “World”); // Noncompliant. Parse error
^
43:
44: $input = $request->all();
45: list($products, $total_count, $page_num) = $this->product_repository->getProducts($input);
46: ABLog::end();
47: return [
48: ‘result’ => true,
49: ‘total_count’ => $total_count,
50: ‘page_num’ => $page_num,
51: ‘products’ => $products,
52: ];

ERROR: Unable to parse file [file:///H:/Astrol/1181_release/app/Http/Controllers/AnsTest/ProductSSSController.php] at line 42
ERROR: Parse error at line 42 column 21:

32: * @return void
33: */
34: public function getProductList(Request $request)
35: {
36: ABLog::start(‘AM0401’, $request);
37:
38: $haNoiVietNam = “H? N?i Vi?t Nam”;
39: echo ("$haNoiVietNam");
40:
41: echo(“Hello”); // Noncompliant, but it works
42: echo(“Hello”, “World”); // Noncompliant. Parse error
^
43:
44: $input = $request->all();
45: list($products, $total_count, $page_num) = $this->product_repository->getProducts($input);
46: ABLog::end();
47: return [
48: ‘result’ => true,
49: ‘total_count’ => $total_count,
50: ‘page_num’ => $page_num,
51: ‘products’ => $products,
52: ];

INFO: 2/2 source files have been analyzed
INFO: No PHPUnit test report provided (see ‘sonar.php.tests.reportPath’ property)
INFO: No PHPUnit coverage reports provided (see ‘sonar.php.coverage.reportPaths’ property)
INFO: Sensor PHP sensor [php] (done) | time=805ms
INFO: Sensor Analyzer for “php.ini” files [php]
INFO: Sensor Analyzer for “php.ini” files [php] (done) | time=10ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=3ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=21ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 2 source files to be analyzed
INFO: SCM Publisher 0/2 source files have been analyzed (done) | time=168ms
WARN: Missing blame information for the following files:
WARN: * AdminController.php
WARN: * ProductSSSController.php
WARN: This may lead to missing/broken features in SonarQube
INFO: CPD Executor Calculating CPD for 0 files
INFO: CPD Executor CPD calculation finished (done) | time=0ms
INFO: Analysis report generated in 187ms, dir size=92 KB
INFO: Analysis report compressed in 32ms, zip size=13 KB
INFO: Analysis report uploaded in 445ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=astrol_test_new_111
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXe4iFlnQzTq-Ym4lZGD
INFO: Analysis total time: 3:15.240 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:19.025s
INFO: Final Memory: 12M/47M
INFO: ------------------------------------------------------------------------

but in web dashboard it alway Successful
All conditions passed.

The analysis is successful and that’s the overall result which appears in your logs:

What I think surprises you is that the analysis is successful even if a parsing error was triggered.
That’s the intended behavior: we don’t want to fail the analysis in such a case.
If you want to see such errors using SonarQube user interface, you should activate a specific rule named PHP parser failure.