Undefined constant AMQP_NOPARAM in AmqpStamp #54761
-
Symfony version(s) affected6.3.12 DescriptionI just tried to use this package
And when I search for the definition of the constant
and added the following to
But it does not really look the right thing for me, I must have been missing something or is it a bug? How to reproduceI mentioned all the code above. Possible SolutionI added my workaround above, maybe it could also be moved to the repo itself? Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 21 comments 4 replies
-
Note that this Symfony version is not maintained anymore. Even if you've identified a bug, you won't get any bugfixes unless you upgrade to a newer version.
The AMQP extension might be the something that you're missing. |
Beta Was this translation helpful? Give feedback.
-
Hey 👋
Thanks for the upgrade tip, I can do it if the problem will be fixed with
it, but since it is a live and complex project it will take some time.
About AMQP extension I already have. Indeed with my quick fix push and
consumption work normally.
Thanks a lot.
…On Sat, Apr 20, 2024, 4:42 PM Alexander M. Turek ***@***.***> wrote:
6.3.12
Not that this Symfony version is not maintained anymore
<https://symfony.com/releases/6.3>. Even if you've identified a bug, you
won't get any bugfixes unless you upgrade to a newer version.
I must have been missing something or is it a bug?
The AMQP extension <https://pecl.php.net/package/amqp> might be the
something that you're missing.
—
Reply to this email directly, view it on GitHub
<#54682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQPKZOQTANBK76NVM66MR3Y6J5FJAVCNFSM6AAAAABGQP3NF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXGY4TIOBTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
But the constant that you're missing should be defined by the AMQP extension. Maybe you're using an old version of it? |
Beta Was this translation helpful? Give feedback.
-
Ok, I'll check it out.
…On Sun, Apr 21, 2024, 9:20 AM Alexander M. Turek ***@***.***> wrote:
But the constant that you're missing should be defined by the AMQP
extension. Maybe you're using an old version of it?
—
Reply to this email directly, view it on GitHub
<#54682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASQPKZPTJG3SNPR5UHJMTZDY6NSCPAVCNFSM6AAAAABGQP3NF6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXHEZTOMZZHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@derrabus I am sorry for my above and incorrect reply. I do not have the pecl extension but on Ubuntu 22.04 I have |
Beta Was this translation helpful? Give feedback.
-
@musahcoding having them installed is not enough. You can check via |
Beta Was this translation helpful? Give feedback.
-
Thanks for the continued support, I think it is loaded, as I mentioned with that hack publish and consumption work, but also the following commands can confirm it too that the extension is loaded:
Somehow it seems that the apt implementation is different that pecl one. Even if that is the case, I would be happy to follow the pecl installation, but maybe you/we can emphasize in the symfony doc to use the pecl installation or else developers would run into this issue? 🤔 |
Beta Was this translation helpful? Give feedback.
-
Can you also share the output of the following commands?
|
Beta Was this translation helpful? Give feedback.
-
Hey!
|
Beta Was this translation helpful? Give feedback.
-
Ubuntu ships the old v1 of the extension. I suspect that v1 does not have the constant (which is just an alias for zero anyway). So the fix might be that we're using |
Beta Was this translation helpful? Give feedback.
-
So this proves that the constant is defined. Could it be that you run PHP in different contexts (CLI and web for example) and that the other context (the request channel in the log excerpt leads me to this assumption) doesn't have the extension enabled? |
Beta Was this translation helpful? Give feedback.
-
This does not add up: Ubunto ships v1: https://packages.ubuntu.com/jammy/php-amqp |
Beta Was this translation helpful? Give feedback.
-
@xabbuh I have already checked both web and CLI they use the same extensions. @derrabus I am using using LAMP image of digital oceans where they have references to more recent versions of PHP 8.3, I see
|
Beta Was this translation helpful? Give feedback.
-
<?php
var_dump(AMQP_NOPARAM);
var_dump(phpversion('amqp')); What is the output of this script when you access it over your web server? |
Beta Was this translation helpful? Give feedback.
-
Hey @xabbuh 👋 here it is:
|
Beta Was this translation helpful? Give feedback.
-
I think he meant you should access it via web SAPI (via browser, curl, ...) instead of CLI SAPI. |
Beta Was this translation helpful? Give feedback.
-
@discordier is right |
Beta Was this translation helpful? Give feedback.
-
I think, I'm moving this to support now to reduce the noise on the bug tracker. |
Beta Was this translation helpful? Give feedback.
-
Hi 👋 I found the issue finally 🎉 TLDR: Details: I was working with one of the old images of the server, and I noticed that it runs on an out dated version of PHP 8.2, where the server runs on PHP 8.3, so I did:
And now I had:
But then the deployment failed again with the same error Then after googling again + gemini, I suspected the version conflict, and running Now deployment worked again 🎉 |
Beta Was this translation helpful? Give feedback.
-
Am I the only one failing to see any relevance of the memcached extension when this was all about AMQP? |
Beta Was this translation helpful? Give feedback.
Hi 👋 I found the issue finally 🎉
TLDR:
When I upgraded the PHP version of server from 8.2 to 8.3, I did not purge the
php8.2*
packages by runningsudo apt purge php8.2*
. Doing so fixed my problem ofundefined AMQP_NOPARAM
Details:
I was working with one of the old images of the server, and I noticed that it runs on an out dated version of PHP 8.2, where the server runs on PHP 8.3, so I did:
And now I had:
But then the deployment failed again with …