App :: make()崩溃应用

时间:2013-07-08 23:09:21

标签: php laravel laravel-4

BaseModel Crontroller的App:make()中的

__construct导致应用程序崩溃(php / apache崩溃)。

class BaseModel extends Eloquent
{
    /**
     * Share the Validator instance.
     *
     * @param  array  $attributes
     * @param  Illuminate\Validation\Validator  $validator
     * @return void
     */
    public function __construct(array $attributes = array(), Validator $validator = null)
    {
        parent::__construct($attributes);

        $this->validator = $validator ? $validator : \App::make('validator');
    }
}

是愚蠢的,因为即使应用程序在访问以下路径时崩溃:

Route::get('/', function()
{
    echo 'hello';
});

我将下一个代码放在__construct进行测试,应用程序也崩溃了。

dd(\App::make('translator'));

Apache error.log

[Tue Jul 09 00:24:19.306813 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00428: Parent: child process exited with status 3221225725 -- Restarting.
[Tue Jul 09 00:24:21.325928 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00455: Apache/2.4.3 (Win32) OpenSSL/0.9.8x PHP/5.4.11 mod_wsgi/3.4 Python/2.7.2 configured -- resuming normal operations
[Tue Jul 09 00:24:21.326928 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00456: Server built: Oct 16 2012 19:25:45
[Tue Jul 09 00:24:21.326928 2013] [core:notice] [pid 4052:tid 424] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Tue Jul 09 00:24:21.327928 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00418: Parent: Created child process 6156
[Tue Jul 09 00:24:23.026025 2013] [mpm_winnt:notice] [pid 6156:tid 436] AH00354: Child: Starting 64 worker threads.
[Tue Jul 09 00:24:26.307213 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00428: Parent: child process exited with status 3221225725 -- Restarting.
[Tue Jul 09 00:24:27.650290 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00455: Apache/2.4.3 (Win32) OpenSSL/0.9.8x PHP/5.4.11 mod_wsgi/3.4 Python/2.7.2 configured -- resuming normal operations
[Tue Jul 09 00:24:27.650290 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00456: Server built: Oct 16 2012 19:25:45
[Tue Jul 09 00:24:27.650290 2013] [core:notice] [pid 4052:tid 424] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Tue Jul 09 00:24:27.651290 2013] [mpm_winnt:notice] [pid 4052:tid 424] AH00418: Parent: Created child process 8120
[Tue Jul 09 00:24:29.239381 2013] [mpm_winnt:notice] [pid 8120:tid 436] AH00354: Child: Starting 64 worker threads.

如果我运行任何php artisan命令是一个崩溃的PHP CLI。

0 个答案:

没有答案