PHP Deprecated: Function (null),

5 years ago

Milo
Nette Core | 1149
+
+2
-

This topic follows discussion from Nette 2.2.4 release topic.

This is a PHP bug. It starts to show on my sites too. Debian, PHP 5.4.16 as apache2 module.

PHP Notice: Undefined variable: file in .../src/Http/Response.php:299
PHP Notice: Undefined variable: line in .../src/Http/Response.php:299
PHP Deprecated: Function æĄly°Š() is deprecated in Unknown:0
PHP Deprecated: Function (null)::H‰l$čL‰d$šH‰ĶL‰l$ųH‰\$ąHƒģ8H…ÉA‰üI‰õt!H‹ŪźM() is deprecated in .../cache/latte/xxxx-f58ecdceb29baf29d552a02bd25a2224.php:72
PHP Deprecated: Function (null)() is deprecated in ....

after that

Fatal Error
Allowed memory size of 134217728 bytes exhausted (tried to allocate 909587003 bytes)

Question is, which change in Nette invokes this bug.

5 years ago

Šaman
Member | 2307
+
0
-

Do you know what PHP version bug? Or all?

5 years ago

Milo
Nette Core | 1149
+
0
-

I'm not sure, 5.4.21 on Windows and 5.4.16 on Linux are reported. It looks like some memory leak, hard to find in PHP bugs tracker.

5 years ago

Pavel Macháň
Member | 285
+
0
-

Milo wrote:

I'm not sure, 5.4.21 on Windows and 5.4.16 on Linux are reported. It looks like some memory leak, hard to find in PHP bugs tracker.

@Milo Im not sure if its memory leak. My execute time was 2× more, but memory is same.

5 years ago

Milo
Nette Core | 1149
+
0
-

If you can, try to replace this line in Nette\Http\Response by

header_register_callback($this->removeDuplicateCookies);

If it helps to you, please, give me a feedback. It is hard to recognize if it is a bug reason and any feedback is appreciated.

EDIT: Github issue https://github.com/…tp/issues/25

5 years ago

Pavel Macháň
Member | 285
+
0
-

Milo wrote:

If you can, try to replace this line in Nette\Http\Response by

header_register_callback($this->removeDuplicateCookies);

If it helps to you, please, give me a feedback. It is hard to recognize if it is a bug reason and any feedback is appreciated.

@Milo Edited and now 2.2.4 working fine.

EDIT: With 1200ms+, Without 250ms+ and Apache is happy now too :)

EDIT2: But now

Warning
session_regenerate_id(): Session object destruction failed

Last edited by Pavel Macháň (2014-11-14 15:32)

5 years ago

Jan Tvrdík
Nette guru | 2556
+
0
-

@PavelMacháň Can you try this as well?

// requires closure due PHP bug #66375
header_register_callback(function() {
    $this->removeDuplicateCookies();
});

Last edited by Jan Tvrdík (2014-11-14 15:37)

5 years ago

Pavel Macháň
Member | 285
+
0
-

Jan Tvrdík wrote:

@PavelMacháň Can you try this as well?

// requires closure due PHP bug #66375
header_register_callback(function() {
  $this->removeDuplicateCookies();
});

@JanTvrdík This working too :)

Last edited by Pavel Macháň (2014-11-15 18:25)

5 years ago

David Grudl
Nette Core | 6850
+
0
-

Opraveno v Nette 2.2.6 a 2.1.8. Díky všem za odhalení a opravu chyby!