Laravel4升级Laravel5之后,报sphinxApi.php有错。

升级到Laravel5之后,sphinx会报错,求指点,谢谢。错误信息如下:
[2015-06-07 13:24:37] production.ERROR: exception 'ErrorException' with message 'assert(): Assertion failed' in /web/project/it/app/Services/SphinxClient.php:816
Stack trace:

0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'assert(): Asser...', '/web/project/it...', 816, Array)

1 /web/project/it/app/Services/SphinxClient.php(816): assert(false)

2 /web/project/it/app/Services/G.php(166): App\Services\SphinxClient->SetFieldWeights(Array)

3 /web/project/it/app/Services/G.php(96): App\Services\G::sphinx('\xE9\x98\xBF\xE9\x87\x8C\xE5\xB7\xB4\xE5\xB7\xB4', 50, false)

4 /web/project/it/app/Http/Controllers/Show/SearchController.php(54): App\Services\G::getKeywordNews('\xE9\x98\xBF\xE9\x87\x8C\xE5\xB7\xB4\xE5\xB7\xB4')

5 [internal function]: App\Http\Controllers\Show\SearchController->searchList()

6 /web/project/it/vendor/compiled.php(8287): call_user_func_array(Array, Array)

7 /web/project/it/vendor/compiled.php(8354): Illuminate\Routing\Controller->callAction('searchList', Array)

8 /web/project/it/vendor/compiled.php(8333): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\Show\SearchController), Object(Illuminate\Routing\Route), 'searchList')

9 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

10 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

11 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

12 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

13 /web/project/it/vendor/compiled.php(8334): Illuminate\Pipeline\Pipeline->then(Object(Closure))

14 /web/project/it/vendor/compiled.php(8320): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\Show\SearchController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'searchList')

15 /web/project/it/vendor/compiled.php(7317): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'searchList')

16 /web/project/it/vendor/compiled.php(7288): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))

17 /web/project/it/vendor/compiled.php(6954): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))

18 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

19 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

20 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

21 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

22 /web/project/it/vendor/compiled.php(6955): Illuminate\Pipeline\Pipeline->then(Object(Closure))

23 /web/project/it/vendor/compiled.php(6944): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

24 /web/project/it/vendor/compiled.php(6929): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

25 /web/project/it/vendor/compiled.php(1935): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

26 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))

27 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

28 /web/project/it/vendor/compiled.php(2438): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

29 /web/project/it/app/Http/Middleware/VerifyCsrfToken.php(49): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

30 /web/project/it/vendor/compiled.php(8944): App\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

31 /web/project/it/vendor/compiled.php(12083): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

32 /web/project/it/vendor/compiled.php(8944): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

33 /web/project/it/vendor/compiled.php(10785): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

34 /web/project/it/vendor/compiled.php(8944): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))

35 /web/project/it/vendor/compiled.php(11789): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

36 /web/project/it/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))

37 /web/project/it/vendor/compiled.php(11738): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

38 /web/project/it/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))

39 /web/project/it/vendor/compiled.php(2478): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

40 /web/project/it/vendor/compiled.php(8944): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))

41 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

42 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

43 /web/project/it/vendor/compiled.php(1891): Illuminate\Pipeline\Pipeline->then(Object(Closure))

44 /web/project/it/vendor/compiled.php(1880): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

45 /web/project/it/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

46 {main}

Next exception 'ErrorException' with message 'fclose() expects parameter 1 to be resource, null given' in /web/project/it/app/Services/SphinxClient.php:513
Stack trace:

0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'fclose() expect...', '/web/project/it...', 513, Array)

1 /web/project/it/app/Services/SphinxClient.php(513): fclose(NULL)

2 /web/project/it/app/Services/G.php(96): App\Services\SphinxClient->__destruct()

3 /web/project/it/app/Services/G.php(96): App\Services\G::sphinx('\xE9\x98\xBF\xE9\x87\x8C\xE5\xB7\xB4\xE5\xB7\xB4', 50, false)

4 /web/project/it/app/Http/Controllers/Show/SearchController.php(54): App\Services\G::getKeywordNews('\xE9\x98\xBF\xE9\x87\x8C\xE5\xB7\xB4\xE5\xB7\xB4')

5 [internal function]: App\Http\Controllers\Show\SearchController->searchList()

6 /web/project/it/vendor/compiled.php(8287): call_user_func_array(Array, Array)

7 /web/project/it/vendor/compiled.php(8354): Illuminate\Routing\Controller->callAction('searchList', Array)

8 /web/project/it/vendor/compiled.php(8333): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\Show\SearchController), Object(Illuminate\Routing\Route), 'searchList')

9 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

10 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

11 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

12 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

13 /web/project/it/vendor/compiled.php(8334): Illuminate\Pipeline\Pipeline->then(Object(Closure))

14 /web/project/it/vendor/compiled.php(8320): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\Show\SearchController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'searchList')

15 /web/project/it/vendor/compiled.php(7317): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'searchList')

16 /web/project/it/vendor/compiled.php(7288): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))

17 /web/project/it/vendor/compiled.php(6954): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))

18 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))

19 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

20 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

21 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

22 /web/project/it/vendor/compiled.php(6955): Illuminate\Pipeline\Pipeline->then(Object(Closure))

23 /web/project/it/vendor/compiled.php(6944): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

24 /web/project/it/vendor/compiled.php(6929): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

25 /web/project/it/vendor/compiled.php(1935): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

26 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))

27 /web/project/it/vendor/compiled.php(8952): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

28 /web/project/it/vendor/compiled.php(2438): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

29 /web/project/it/app/Http/Middleware/VerifyCsrfToken.php(49): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

30 /web/project/it/vendor/compiled.php(8944): App\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

31 /web/project/it/vendor/compiled.php(12083): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

32 /web/project/it/vendor/compiled.php(8944): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

33 /web/project/it/vendor/compiled.php(10785): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

34 /web/project/it/vendor/compiled.php(8944): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))

35 /web/project/it/vendor/compiled.php(11789): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

36 /web/project/it/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))

37 /web/project/it/vendor/compiled.php(11738): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

38 /web/project/it/vendor/compiled.php(8944): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))

39 /web/project/it/vendor/compiled.php(2478): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

40 /web/project/it/vendor/compiled.php(8944): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))

41 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))

42 /web/project/it/vendor/compiled.php(8935): call_user_func(Object(Closure), Object(Illuminate\Http\Request))

43 /web/project/it/vendor/compiled.php(1891): Illuminate\Pipeline\Pipeline->then(Object(Closure))

44 /web/project/it/vendor/compiled.php(1880): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

45 /web/project/it/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

46 {main}

已邀请:

要回复问题请先登录注册