Skip to content
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

Couchbase installation is corrupting all other packages installation. #180

Closed
HeenaBansal20 opened this issue Sep 30, 2024 · 10 comments · Fixed by #181
Closed

Couchbase installation is corrupting all other packages installation. #180

HeenaBansal20 opened this issue Sep 30, 2024 · 10 comments · Fixed by #181

Comments

@HeenaBansal20
Copy link

HeenaBansal20 commented Sep 30, 2024

After installing couchbase package via pecl install , I am unable to install any other php packages in docker container OR running any PHP commands like composer -version in my container.

Couchbase version : 4.2.3
php version : 8.4.0beta5
OS: Linux/Ubuntu

Reproduction:
Dockerfile.txt
docker build .

Error:

 => CACHED [12/14] RUN pecl install couchbase-4.2.3 && echo "extension=couchbase.so" >> "/usr/local/etc/php/conf.d/ext-couchbase.ini"                                                                                                           0.0s
 => [13/14] RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php                                                                                                                                                           1.2s
 => ERROR [14/14] RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer                                                                                                                                              0.6s
------                                                                                                                                                                                                                                               
 > [14/14] RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer:                                                                                                                                                         
0.407 php: /usr/src/php/Zend/zend_API.c:2900: zend_normalize_internal_type: Assertion `!(((*type).type_mask & (1u << (9))) != 0) && "resource is not allowed in a zend_type"' failed.
0.591 Aborted (core dumped)
------
Dockerfile:51
--------------------
  49 |     # Install Composer
  50 |     RUN curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
  51 | >>> RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
  52 |     
  53 |     
--------------------

Tried with installing "pecl install grpc-1.66.0" and other php commands. These installation works fine without couchbase extension installation in docker container.

composer --version

[21:24:09](https://ci.instana.io/teams/php/pipelines/php-extensions:supporting_php_version_8.4#L66cf2542:159)
Assertion failed: !(((*type).type_mask & (1u << (9))) != 0) && "resource is not allowed in a zend_type" (/usr/src/php/Zend/zend_API.c: zend_normalize_internal_type: 2900)
[21:24:09](https://ci.instana.io/teams/php/pipelines/php-extensions:supporting_php_version_8.4#L66cf2542:160)
Aborted (core dumped)


PS:
issue is not seen with PHP 8.3.11.

Expected Behavior:
Installation should be successful

@HeenaBansal20
Copy link
Author

@avsej @Matt-Woz , I apologize for tagging you directly but the link to submit issues on bug tracker is not reachable.

Can you please look on the above issue , The installation of couchbase pecl package is corrupting all php scripts/commands after installation in PHP8.4.0beta5.
Thanks in advance.

@avsej
Copy link
Member

avsej commented Oct 2, 2024

Thank you for reporting this, @HeenaBansal20 . I will take a look shortly

@avsej
Copy link
Member

avsej commented Oct 2, 2024

btw, we publish precompiled extensions, so waiting for pecl to compile extension is not necessary

@avsej
Copy link
Member

avsej commented Oct 2, 2024

I confirm that I can reproduce this issue with 8.4beta5. I will fix it an get back soon

@HeenaBansal20
Copy link
Author

btw, we publish precompiled extensions, so waiting for pecl to compile extension is not necessary

hmm.. where we can find precompiled extension for couchbase that supports PHP 8.4

@HeenaBansal20
Copy link
Author

I confirm that I can reproduce this issue with 8.4beta5. I will fix it an get back soon

Great ! Thanks @avsej for quick action on the issue. I really appreciate .
Thanks !

@avsej
Copy link
Member

avsej commented Oct 2, 2024

@HeenaBansal20, right, we do not do precompilation for PHP 8.4 yet (it is still beta), but in future we will do it :)

I found that I should not have IS_RESOURCE in signatures in the first place (and php/php-src#13102 added this check, which I would immediately notice once I will try to build with 8.4).

I will fix the signatures.

@avsej
Copy link
Member

avsej commented Oct 2, 2024

should be fixed with #181. I noticed couple of deprecation warnings, which I also will try to fix separately.

@avsej avsej closed this as completed in #181 Oct 2, 2024
@avsej avsej closed this as completed in 166e242 Oct 2, 2024
@HeenaBansal20
Copy link
Author

@avsej , would you mind releasing it with some version so I can use it in my environment.

@avsej
Copy link
Member

avsej commented Oct 4, 2024

Sure, next release is scheduled on 15th of October approximately. If PHP 8.4 will be released by then, we will also produce precompiled versions of the extension for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants