We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

104: Connection reset by peer

When I'm using Phalcon 2.0.9 with Nginx, I got an error message:

[error] 525#0: *4 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: *.*.*.*, server: localhost, request: "GET /TestZilla/public/index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "*.*.*.*"

And the Laravel framework works well.

BTW I think I have installed the Phalcon framework correctly. Because I got following output using print_r(get_loaded_extensions()):

Array ( 
    [0] => Core 
    [1] => date 
    [2] => ereg 
    [3] => libxml 
    [4] => openssl 
    [5] => pcre 
    [6] => sqlite3 
    [7] => zlib 
    [8] => bcmath 
    [9] => bz2 
    [10] => calendar 
    [11] => ctype 
    [12] => curl 
    [13] => dba 
    [14] => dom 
    [15] => hash 
    [16] => fileinfo 
    [17] => filter 
    [18] => ftp 
    [19] => gd 
    [20] => gettext 
    [21] => gmp 
    [22] => SPL 
    [23] => iconv 
    [24] => json 
    [25] => mbstring 
    [26] => mcrypt 
    [27] => session 
    [28] => mysql 
    [29] => mysqli 
    [30] => standard 
    [31] => PDO 
    [32] => mysqlnd 
    [33] => pdo_sqlite 
    [34] => Phar 
    [35] => posix 
    [36] => readline 
    [37] => Reflection 
    [38] => pdo_mysql 
    [39] => shmop 
    [40] => SimpleXML 
    [41] => soap 
    [42] => sockets 
    [43] => exif 
    [44] => sysvmsg 
    [45] => sysvsem 
    [46] => sysvshm 
    [47] => tokenizer 
    [48] => wddx 
    [49] => xml 
    [50] => xmlreader 
    [51] => xmlwriter 
    [52] => xsl 
    [53] => zip 
    [54] => cgi-fcgi 
    [55] => phalcon 
    [56] => mhash 
)

Environment:

I found that this error is caused by getContent():

$application = new Application($di);
echo $application->handle()->getContent();

Everything goes well until execute echo $application->handle()->getContent();.

But I don't know how to solve it :(.

Who can help me to solve this problem?



58.4k

Hey,

If you have install xdebug try to disable it then restart again php-fpm, or you can debug via console

cd ../public && php index.php

I haven't installed xdebug.

And here's the output of php index.php:

Fatal error: Class 'Phalcon\Config\Adapter\Ini' not found in /usr/local/nginx/html/TestZilla/public/index.php on line 29

On my PC, the output is the same. But Phalcon works on my PC (with Apache).

Hey,

If you have install xdebug try to disable it then restart again php-fpm, or you can debug via console

cd ../public && php index.php
edited Dec '15

Another important thing to consider:

Since the VPS only has 1 GB RAM, so I compiled the Phalcon framework on another server with the same environment.

Here's what I executed on another VPS:

cd build
./install
cd ../..
tar -czvf cphalcon.tar.gz cphalcon

As you see, I packed this folder and unpacked this compress file to my 1GB-RAM-Server:

And here's what I executed on this server:

cd build./64bit
make install

Hey,

If you have install xdebug try to disable it then restart again php-fpm, or you can debug via console

cd ../public && php index.php


58.4k

Fatal error: Class 'Phalcon\Config\Adapter\Ini' not found in /usr/local/nginx/html/TestZilla/public/index.php on line 29

I have see Phalcon not yet install