cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Error 502 Bad Gateway when using Paginator getPaginate

Open jimmycdinata opened this issue 13 years ago • 5 comments

Dear experts,

I found error 502 when using $paginator->getPaginate().

$customer = \Model\customer::find();

$paginator = new \Phalcon\Paginator\Adapter\Model(array(
"data" => $customer,
"limit" => 10,
"page" => 2
));
$page = $paginator->getPaginate();

I get this error on php-fpm

[15-Sep-2013 18:37:35] WARNING: [pool www] child 11176 exited on signal 4 (SIGILL - core dumped) after 27567.009692 seconds from start
[15-Sep-2013 18:37:35] NOTICE: [pool www] child 21832 started 

Environment:

PHP Version 5.3.10
Nginx 1.1.19
Phalcon 1.2.3/1.2.4/1.3.0
FPM/FastCGI 

Any tips? I also tried the querybuilder with same problem.

I've tried 1.2.4 and 1.3.0 branch, but the problem are still exist. I've tried solution on this thread http://forum.phalconphp.com/discussion/898/-solved-paginator-problem#C3876, but still no luck :(

Thank you.

Jim

jimmycdinata avatar Oct 16 '13 08:10 jimmycdinata

SIGILL means illegal instruction, that is, the compiled Phalcon used instructions your CPU does not support — it looks like gcc incorrectly determined the capabilities of your CPU.

Please try to build Phalcon manually (not using ./build/install):

# If your system is 32 bit:
cd build/32bits
# If your system is 64 bit:
cd build/64bits

phpize
./configure CFLAGS="-O2 -g -fomit-frame-pointer -DPHALCON_RELEASE"
make
sudo make install

and see if this solves the issue.

ghost avatar Oct 16 '13 11:10 ghost

@sjinks Building from ext/ folder solved the issues.

Thank you for pointing for re-building :)

jimmycdinata avatar Oct 16 '13 21:10 jimmycdinata

thanks for your valuable suggestion ............my problem is solved...

aniket310 avatar Sep 10 '14 14:09 aniket310

@jimmycdinata, thank you. Fall in problem with ubuntu 12.04.5 and Phalcon 1.3.6, building from ext with your flags solve 502 errors.

tinpansoul avatar Feb 25 '16 09:02 tinpansoul

SIGILL means illegal instruction, that is, the compiled Phalcon used instructions your CPU does not support — it looks like gcc incorrectly determined the capabilities of your CPU.

Please try to build Phalcon manually (not using ./build/install):

If your system is 32 bit:

cd build/32bits

If your system is 64 bit:

cd build/64bits

phpize ./configure CFLAGS="-O2 -g -fomit-frame-pointer -DPHALCON_RELEASE" make sudo make install and see if this solves the issue.

OMG YOU SAVED MY LIFE 😭😭😭😭😭

Sn-Kinos avatar Mar 16 '25 11:03 Sn-Kinos