Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Phalcon 5 can't be installed or used on PHP 8.2 #16459

Closed
svdigital-development opened this issue Oct 27, 2023 · 9 comments
Closed

[BUG]: Phalcon 5 can't be installed or used on PHP 8.2 #16459

svdigital-development opened this issue Oct 27, 2023 · 9 comments
Labels
enhancement Enhancement to the framework not a bug Reported issue is not a bug

Comments

@svdigital-development
Copy link

Describe the bug
We are UNABLE to use Phalcon 5 with PHP 8.2 and this is preventing us to upgrade our applications. PHP 8.1 will end its active support in one month and it's unbelievable that it's impossible to upgrade to php8.2 using Phalcon.

The documentation is unuseful: https://docs.phalcon.io/5.0/it-it/installation

"pecl install phalcon" on Debian generates a HUGE amount of warnings on Zephir.

After all those warnings, the installation stops and gets stuck. The pointer remains on its position like it's waiting for a process to end, but in reality the server is not doing anything. I tried waiting even half an hour, but nothing happens.

I tried to compile from sources, but I get the same errors.

I can't find any new sury repository for php8.2-phalcon5 (until php 8.1 it was SOOO simple and handy to install Phalcon so easily).

I read #16401 and #15973 but no one explains how to fix this bug/issue.

The documentation doesn't explain how to install Phalcon on PHP 8.2.

To Reproduce

Provide output if related. Provide coredump if any. Use https://docs.phalcon.io/en/latest/generating-backtrace as reference.

Steps to reproduce the behavior:

Try to install Phalcon5 with php 8.2.

Expected behavior

Phalcon5 is correctly installed in a few seconds and available for use on PHP 8.2 (fpm/cli).

Details

  • Phalcon version: 5.1/5.2
  • PHP Version: 8.2.7
  • Operating System: Debian 10
  • Installation type: Compiling from source or installing via package manager PECL
  • Zephir version (if any): don't know how to find out
  • Server: Nginx
@svdigital-development svdigital-development changed the title [BUG]: [BUG]: Phalcon 5 can't be installed or used on PHP 8.2 Oct 27, 2023
@s-ohnishi
Copy link

I also encountered the same problem.
However, it was a combination of PHP8.1 and Phalcon5.4.0.
I was building this PHP8.1 with Docker Desktop for windows (WSL2).
Just to be sure, I changed the memory allocation to WSL2 from 4GB to 8GB and tried again, and the build was successful.
I also tried it with PHP8.2, and the build completed without any problems.
It may require more memory than Phalcon5.3.x.

The Dockerfile is roughly written as follows.

FROM php:8.2-fpm-bullseye
(Installation of necessary packages, etc....omitted)
ENV PHALCON_VERSION="5.4.0"

RUN set -eux; \
   pecl install phalcon-${PHALCON_VERSION}; \
   pecl clear-cache

@Jeckerson
Copy link
Member

You need at least 3Gb of RAM to compile Phalcon, ideally more. Compilation warning are to ignore.

If you are installing via pecl inside VM or in machine with limited RAM resource, add swap file with 5Gb.
Here is example how to do that: https://gist.github.com/Jeckerson/2322849d9f5dbbc9543c99e49341177e

@Jeckerson
Copy link
Member

Screen.Recording.2023-11-05.at.18.15.39.480p.mov

Here is example how RAM grows during single thread compilation, which takes ±3 minutes.

@Jeckerson Jeckerson added not a bug Reported issue is not a bug enhancement Enhancement to the framework and removed bug A bug report status: unverified Unverified labels Nov 5, 2023
@s-ohnishi
Copy link

I've got it.
We have to be careful with cheap rental servers (as well as machines that don't have a lot of resources).

I don't know what @svdigital-development environment is, but I hope things go well.

@Jeckerson
Copy link
Member

@s-ohnishi ideally is to pre-compile ready to use Dockerfile with all your stuff in: phalcon, another libs and dependencies and the code itself.

@s-ohnishi
Copy link

I see, I didn't notice that.
However, even if you create an image for yourself, it is still a "personal" image, so it is not very reliable, and what you include will not necessarily be useful to others.
It would be nice to have an official Phalcon image with only the minimum packages installed.
(I wish it was built on Debian)

@Jeckerson
Copy link
Member

@s-ohnishi This is on todo list, there are some ready to use images, but still plenty things to do.

https://github.com/phalcon/docker - track this repository for further updates.

@s-ohnishi
Copy link

@Jeckerson
I didn't know this project existed.
Also the official image of Docker.
Is there anything I can do to help?
However, I am a personal user who has built images locally to some extent, and I am also a novice git user.
Above all, my English proficiency is limited to the point where I can't post without the help of a "translation site".

@Jeckerson
Copy link
Member

@s-ohnishi Find me in our Discord sever for further ideas - https://phalcon.io/discord

@phalcon phalcon locked and limited conversation to collaborators Nov 6, 2023
@Jeckerson Jeckerson converted this issue into discussion #16463 Nov 6, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement Enhancement to the framework not a bug Reported issue is not a bug
Projects
None yet
Development

No branches or pull requests

3 participants