Maybe bug in Nette SafeStream
- steelbull
- Member | 241
Hi, I found a following failure in Nette 2.4:
THX for solve bug : -)
Failure description:
The bug is relevant only for PHP7 and higher version (PHP 5.6 runs without
failure). After some days or weeks of nonstop running of PHP server, all newly
updated Nette apps will crash and display error message (see Symptoms).
…but older non-updated nette 2.4 apps running on same server are working.
Also another non-nette apps also working. After restart of the server, problem
is solved.
Symptoms:
Failure analysis:
I found problem on autoload_real.php on line 66, where is following line
require($file) inside foreach cycle. Autoload real is loading all files until
loader.php (Nette SafeStream).
Loader.php is loaded, but after register of SafeStream
(Nette\Utils\SafeStream::register()) something will broke and autoload cannot
continue in loading files and display error (see Symptoms).
Server:
- hacafrakus
- Member | 14
Seems like a PHP bug to me. Your file
wrapper gets renamed to
0
for whatever reason.
I suggest:
- remove
nette/safe-stream
package unless you actually need it, - if some other package requires it, try to downgrade it to
<2.3.0
where wrapper wasn't registered automatically, - might be related to 2.3.2 release,
so
- upgrade to
^2.3.2
- or downgrade to
<2.3.2
- upgrade to
- steelbull
- Member | 241
Yes, I already do this. Also I agree, that problem can be in PHP7. I writed this issue, because I lost much time to found this problem. Also I writed more discuss threads to the Nette forum, but It was complicated to explain and nobody found an answer. Therefore this thread can help for users with will catch similar problem, like me.
THX :-)
hacafrakus wrote:
Seems like a PHP bug to me. Your
file
wrapper gets renamed to0
for whatever reason.I suggest:
- remove
nette/safe-stream
package unless you actually need it,- if some other package requires it, try to downgrade it to
<2.3.0
where wrapper wasn't registered automatically,- might be related to 2.3.2 release, so
- upgrade to
^2.3.2
- or downgrade to
<2.3.2