kreait / firebase-php

Unofficial Firebase Admin SDK for PHP
https://firebase-php.readthedocs.io/
MIT License
2.24k stars 429 forks source link

Constant undefined "CURL_SSLVERSION_TLSV1_2" #936

Closed WilliamGeorge1997 closed 2 days ago

WilliamGeorge1997 commented 2 days ago

Describe the bug

Hello, After upgrading to kreait/firebase-php v7.10.0 it worked well on my development machine which is windows 10 and cURL 8.7 but on production server it gives error from curlfactory.php file which is Constant undefined "CURL_SSLVERSION_TLSV1_2" server os : CentOS Linux release 7.9.2009 (Core) server curl version: 7.29 i tried many times to update curl but the update itself didn't work so, i couldn't update it Is there are any solution?

Installed packages

asm89/stack-cors                   v2.2.0              Cross-origin resource sharing library and stack middleware
bacon/bacon-qr-code                2.0.8               BaconQrCode is a QR code generator for PHP.
beste/clock                        3.0.0               A collection of Clock implementations
beste/in-memory-cache              1.3.1               A PSR-6 In-Memory cache that can be used as a fallback imple...
beste/json                         1.5.0               A simple JSON helper to decode and encode JSON
brick/math                         0.12.1              Arbitrary-precision arithmetic library
carbonphp/carbon-doctrine-types    3.2.0               Types to use Carbon in Doctrine
code-lts/laravel-fcm               1.8.1               Laravel / Lumen package for Firebase Cloud Messaging
dasprid/enum                       1.0.6               PHP 7.1 enum implementation
dflydev/dot-access-data            v3.0.3              Given a deep data structure, access data by dot notation.
doctrine/inflector                 2.0.10              PHP Doctrine Inflector is a small library that can perform s...
doctrine/instantiator              2.0.0               A small, lightweight utility to instantiate objects in PHP w...
doctrine/lexer                     1.2.3               PHP Doctrine Lexer parser library that can be used in Top-Do...
dragonmantank/cron-expression      v3.3.3              CRON for PHP: Calculate the next or previous run date and de...
egulias/email-validator            2.1.25              A library for validating emails against several RFCs
facade/flare-client-php            1.10.0              Send PHP errors to Flare
facade/ignition                    2.17.7              A beautiful error page for Laravel applications.
facade/ignition-contracts          1.0.2               Solution contracts for Ignition
fakerphp/faker                     v1.23.1             Faker is a PHP library that generates fake data for you.
fig/http-message-util              1.1.5               Utility classes and constants for use with PSR-7 (psr/http-m...
filp/whoops                        2.15.4              php error handling for cool kids
firebase/php-jwt                   v6.10.1             A simple library to encode and decode JSON Web Tokens (JWT) ...
fruitcake/laravel-cors             v2.2.0              Adds CORS (Cross-Origin Resource Sharing) headers support in...
google/auth                        v1.42.0             Google Auth Library for PHP
google/cloud-core                  v1.59.1             Google Cloud PHP shared dependency, providing functionality ...
google/cloud-storage               v1.42.1             Cloud Storage Client for PHP
google/common-protos               4.8.3               Google API Common Protos for PHP
google/gax                         v1.34.1             Google API Core for PHP
google/grpc-gcp                    v0.4.0              gRPC GCP library for channel management
google/longrunning                 0.4.3               Google LongRunning Client for PHP
google/protobuf                    v4.28.2             proto library for PHP
graham-campbell/result-type        v1.1.3              An Implementation Of The Result Type
grpc/grpc                          1.57.0              gRPC library for PHP
guzzlehttp/guzzle                  7.9.2               Guzzle is a PHP HTTP client library
guzzlehttp/promises                2.0.3               Guzzle promises library
guzzlehttp/psr7                    2.7.0               PSR-7 message implementation that also provides common utili...
hamcrest/hamcrest-php              v2.0.1              This is the PHP port of Hamcrest Matchers
intervention/image                 2.7.2               Image handling and manipulation library with support for Lar...
kreait/firebase-php                7.10.0              Firebase Admin SDK
kreait/firebase-tokens             4.3.0               A library to work with Firebase tokens
laravel/framework                  v8.83.27            The Laravel Framework.
laravel/sail                       v1.25.0             Docker files for running a basic Laravel application.
laravel/sanctum                    v2.15.1             Laravel Sanctum provides a featherweight authentication syst...
laravel/serializable-closure       v1.3.4              Laravel Serializable Closure provides an easy and secure way...
laravel/tinker                     v2.9.0              Powerful REPL for the Laravel framework.
lcobucci/clock                     3.0.0               Yet another clock abstraction
lcobucci/jwt                       4.3.0               A simple library to work with JSON Web Token and JSON Web Si...
league/commonmark                  2.5.3               Highly-extensible PHP Markdown parser which fully supports t...
league/config                      v1.2.0              Define configuration arrays with strict schemas and access v...
league/flysystem                   1.1.10              Filesystem abstraction: Many filesystems, one API.
league/mime-type-detection         1.15.0              Mime-type detection for Flysystem
mockery/mockery                    1.6.12              Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                    2.9.3               Sends your logs to files, sockets, inboxes, databases and va...
mpdf/mpdf                          v8.2.4              PHP library generating PDF files from UTF-8 encoded HTML
mpdf/psr-http-message-shim         v2.0.1              Shim to allow support of different psr/message versions.
mpdf/psr-log-aware-trait           v2.0.0              Trait to allow support of different psr/log versions.
mtdowling/jmespath.php             2.8.0               Declaratively specify how to extract elements from a JSON do...
myclabs/deep-copy                  1.12.0              Create deep copies (clones) of your objects
namshi/jose                        7.2.3               JSON Object Signing and Encryption library for PHP.
nesbot/carbon                      2.72.5              An API extension for DateTime that supports 281 different la...
nette/schema                       v1.3.0              πŸ“ Nette Schema: validating data structures against a give...
nette/utils                        v4.0.5              πŸ›   Nette Utils: lightweight utilities for string & arra y ...
nikic/php-parser                   v5.2.0              A PHP parser written in PHP
niklasravnsborg/laravel-pdf        v4.1.0              Generate PDFs in Laravel with this mPDF wrapper.
nunomaduro/collision               v5.11.0             Cli error handling for console/command-line PHP applications.
nwidart/laravel-modules            8.6.0               Laravel Module management
opis/closure                       3.6.3               A library that can be used to serialize closures (anonymous ...
paragonie/random_compat            v9.99.100           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phar-io/manifest                   2.0.4               Component for reading phar.io manifest information from a PH...
phar-io/version                    3.2.1               Library for handling version information and constraints
phpoption/phpoption                1.9.3               Option Type for PHP
phpunit/php-code-coverage          9.2.32              Library that provides collection, processing, and rendering ...
phpunit/php-file-iterator          3.0.6               FilterIterator implementation that filters files based on a ...
phpunit/php-invoker                3.1.1               Invoke callables with a timeout
phpunit/php-text-template          2.0.4               Simple template engine.
phpunit/php-timer                  5.0.3               Utility class for timing
phpunit/phpunit                    9.6.21              The PHP Unit Testing framework.
psr/cache                          3.0.0               Common interface for caching libraries
psr/clock                          1.0.0               Common interface for reading the clock.
psr/container                      1.1.2               Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0               Standard interfaces for event handling.
psr/http-client                    1.0.3               Common interface for HTTP clients
psr/http-factory                   1.1.0               PSR-17: Common interfaces for PSR-7 HTTP message factories
psr/http-message                   2.0                 Common interface for HTTP messages
psr/log                            2.0.0               Common interface for logging libraries
psr/simple-cache                   1.0.1               Common interfaces for simple caching
psy/psysh                          v0.12.4             An interactive shell for modern PHP.
ralouphie/getallheaders            3.0.3               A polyfill for getallheaders.
ramsey/collection                  2.0.0               A PHP library for representing and manipulating collections.
ramsey/uuid                        4.7.6               A PHP library for generating and working with universally un...
rize/uri-template                  0.3.8               PHP URI Template (RFC 6570) supports both expansion & extrac...
sebastian/cli-parser               1.0.2               Library for parsing CLI options
sebastian/code-unit                1.0.8               Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3               Looks up which function or method a line of code belongs to
sebastian/comparator               4.0.8               Provides the functionality to compare PHP values for equality
sebastian/complexity               2.0.3               Library for calculating the complexity of PHP code units
sebastian/diff                     4.0.6               Diff implementation
sebastian/environment              5.1.5               Provides functionality to handle HHVM/PHP environments
sebastian/exporter                 4.0.6               Provides the functionality to export PHP variables for visua...
sebastian/global-state             5.0.7               Snapshotting of global state
sebastian/lines-of-code            1.0.4               Library for counting the lines of code in PHP source code
sebastian/object-enumerator        4.0.4               Traverses array structures and object graphs to enumerate al...
sebastian/object-reflector         2.0.4               Allows reflection of object attributes, including inherited ...
sebastian/recursion-context        4.0.5               Provides functionality to recursively process PHP variables
sebastian/resource-operations      3.0.4               Provides a list of PHP built-in functions that operate on re...
sebastian/type                     3.2.1               Collection of value objects that represent the types of the ...
sebastian/version                  3.0.2               Library that helps with managing the version number of Git-h...
setasign/fpdi                      v2.6.1              FPDI is a collection of PHP classes facilitating developers ...
simplesoftwareio/simple-qrcode     4.2.0               Simple QrCode is a QR code generator made for Laravel.
spatie/laravel-activitylog         3.17.0              A very simple activity logger to monitor the users of your w...
spatie/laravel-permission          5.11.1              Permission handling for Laravel 6.0 and up
spatie/laravel-translatable        4.6.0               A trait to make an Eloquent model hold translations
swiftmailer/swiftmailer            v6.3.0              Swiftmailer, free feature-rich PHP mailer
symfony/console                    v5.4.43             Eases the creation of beautiful and testable command line in...
symfony/css-selector               v6.4.8              Converts CSS selectors to XPath expressions
symfony/deprecation-contracts      v3.5.0              A generic function and convention to trigger deprecation not...
symfony/error-handler              v5.4.42             Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher           v6.4.8              Provides tools that allow your application components to com...
symfony/event-dispatcher-contracts v3.5.0              Generic abstractions related to dispatching event
symfony/finder                     v5.4.43             Finds files and directories via an intuitive fluent interface
symfony/http-foundation            v5.4.42             Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                v5.4.43             Provides a structured process for converting a Request into ...
symfony/mime                       v5.4.43             Allows manipulating MIME messages
symfony/polyfill-ctype             v1.31.0             Symfony polyfill for ctype functions
symfony/polyfill-iconv             v1.31.0             Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme     v1.31.0             Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn          v1.31.0             Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 fun...
symfony/polyfill-intl-normalizer   v1.31.0             Symfony polyfill for intl's Normalizer class and related fun...
symfony/polyfill-mbstring          v1.31.0             Symfony polyfill for the Mbstring extension
symfony/polyfill-php56             v1.20.0             Symfony polyfill backporting some PHP 5.6+ features to lower...
symfony/polyfill-php73             v1.31.0             Symfony polyfill backporting some PHP 7.3+ features to lower...
symfony/polyfill-php80             v1.31.0             Symfony polyfill backporting some PHP 8.0+ features to lower...
symfony/process                    v5.4.40             Executes commands in sub-processes
symfony/routing                    v5.4.43             Maps an HTTP request to a set of configuration variables
symfony/service-contracts          v3.5.0              Generic abstractions related to writing services
symfony/string                     v6.4.11             Provides an object-oriented API to strings and deals with by...
symfony/translation                v6.4.10             Provides tools to internationalize your application
symfony/translation-contracts      v3.5.0              Generic abstractions related to translation
symfony/var-dumper                 v5.4.43             Provides mechanisms for walking through any arbitrary PHP va...
symfony/yaml                       v6.4.11             Loads and dumps YAML files
taqnyat/php                        1.0.2               A PHP wrapper for Taqnyat's API
theseer/tokenizer                  1.2.3               A small library for converting tokenized PHP source code int...
tijsverkoyen/css-to-inline-styles  v2.2.7              CssToInlineStyles is a class that enables you to convert HTM...
tymon/jwt-auth                     dev-develop 014be8d JSON Web Token Authentication for Laravel and Lumen
vlucas/phpdotenv                   v5.6.1              Loads environment variables from `.env` to `getenv()`, `$_EN...
voku/portable-ascii                1.6.1               Portable ASCII library - performance optimized (ascii) strin...
webmozart/assert                   1.11.0              Assertions to validate method input/output with nice error m...

PHP version and extensions

composer                2.4.1     Composer package
composer-plugin-api     2.3.0     The Composer Plugin API
composer-runtime-api    2.2.2     The Composer Runtime API
ext-bcmath              8.1.25    The bcmath PHP extension
ext-bz2                 8.1.25    The bz2 PHP extension
ext-calendar            8.1.25    The calendar PHP extension
ext-ctype               8.1.25    The ctype PHP extension
ext-curl                8.1.25    The curl PHP extension
ext-date                8.1.25    The date PHP extension
ext-dom                 20031129  The dom PHP extension
ext-exif                8.1.25    The exif PHP extension
ext-fileinfo            8.1.25    The fileinfo PHP extension
ext-filter              8.1.25    The filter PHP extension
ext-ftp                 8.1.25    The ftp PHP extension
ext-gd                  8.1.25    The gd PHP extension
ext-gettext             8.1.25    The gettext PHP extension
ext-gmp                 8.1.25    The gmp PHP extension
ext-hash                8.1.25    The hash PHP extension
ext-iconv               8.1.25    The iconv PHP extension
ext-imagick             0         The imagick PHP extension (actual version: @PACKAGE_VERSION@)
ext-imap                8.1.25    The imap PHP extension
ext-intl                8.1.25    The intl PHP extension
ext-json                8.1.25    The json PHP extension
ext-libxml              8.1.25    The libxml PHP extension
ext-mbstring            8.1.25    The mbstring PHP extension
ext-mysqli              8.1.25    The mysqli PHP extension
ext-mysqlnd             0         The mysqlnd PHP extension (actual version: mysqlnd 8.1.25)
ext-openssl             8.1.25    The openssl PHP extension
ext-pcntl               8.1.25    The pcntl PHP extension
ext-pcre                8.1.25    The pcre PHP extension
ext-pdo                 8.1.25    The PDO PHP extension
ext-pdo_mysql           8.1.25    The pdo_mysql PHP extension
ext-pdo_sqlite          8.1.25    The pdo_sqlite PHP extension
ext-phar                8.1.25    The Phar PHP extension
ext-posix               8.1.25    The posix PHP extension
ext-pspell              8.1.25    The pspell PHP extension
ext-reflection          8.1.25    The Reflection PHP extension
ext-session             8.1.25    The session PHP extension
ext-simplexml           8.1.25    The SimpleXML PHP extension
ext-soap                8.1.25    The soap PHP extension
ext-sockets             8.1.25    The sockets PHP extension
ext-sodium              2.0.23    The sodium PHP extension
ext-spl                 8.1.25    The SPL PHP extension
ext-sqlite3             8.1.25    The sqlite3 PHP extension
ext-sysvmsg             8.1.25    The sysvmsg PHP extension
ext-sysvsem             8.1.25    The sysvsem PHP extension
ext-sysvshm             8.1.25    The sysvshm PHP extension
ext-tidy                8.1.25    The tidy PHP extension
ext-tokenizer           8.1.25    The tokenizer PHP extension
ext-xml                 8.1.25    The xml PHP extension
ext-xmlreader           8.1.25    The xmlreader PHP extension
ext-xmlwriter           8.1.25    The xmlwriter PHP extension
ext-xsl                 8.1.25    The xsl PHP extension
ext-zip                 1.19.5    The zip PHP extension
ext-zlib                8.1.25    The zlib PHP extension
lib-bz2                 1.0.6     The bz2 library
lib-curl                7.29.0    The curl library
lib-curl-libssh2        1.8.0     curl libssh2 version
lib-curl-nss            3.90      curl nss version (3.90)
lib-curl-zlib           1.2.7     curl zlib version
lib-date-timelib        2021.19   date timelib version
lib-date-zoneinfo       2023.3    zoneinfo ("Olson") database for date
lib-fileinfo-libmagic   540       fileinfo libmagic version
lib-gd                  2.0.35    The gd library
lib-gd-freetype         2.8.0     freetype version for gd
lib-gd-libjpeg          6.2       libjpeg version for gd
lib-gd-libpng           1.5.13    libpng version for gd
lib-gd-libxpm           3.4.11    libxpm version for gd
lib-gmp                 6.0.0     The gmp library
lib-iconv               2.17      The iconv library
lib-icu                 50.2      The ICU unicode and globalization support library
lib-icu-cldr            2.0.78.30 ICU CLDR project version
lib-icu-unicode         6.2.0     ICU unicode version
lib-icu-zoneinfo        2018.5    zoneinfo ("Olson") database for icu
lib-imagick-imagemagick 6.9.10.68 The imagick-imagemagick library
lib-libsodium           1.0.18    The libsodium library
lib-libxml              2.9.1     libxml library version
lib-libxslt             1.1.28    The libxslt library
lib-libxslt-libxml      2.9.1     libxml version libxslt is compiled against
lib-mbstring-libmbfl    1.3.2     mbstring libmbfl version
lib-mbstring-oniguruma  6.8.2     mbstring oniguruma version
lib-openssl             1.0.2.11  OpenSSL 1.0.2k  26 Jan 2017
lib-pcre                10.39     The pcre library
lib-pcre-unicode        14.0.0    PCRE Unicode version support
lib-pdo_sqlite-sqlite   3.7.17    The pdo_sqlite-sqlite library
lib-sqlite3-sqlite      3.7.17    The sqlite3-sqlite library
lib-zip-libzip          1.5.1     The zip-libzip library
lib-zlib                1.2.7     The zlib library
php                     8.1.25    The PHP interpreter
php-64bit               8.1.25    The PHP interpreter, 64bit
php-ipv6                8.1.25    The PHP interpreter, with IPv6 support

Steps to reproduce the issue.

Nothing

Error message/Stack trace

Constant undefined "CURL_SSLVERSION_TLSV1_2"

Additional information

No response

jeromegamez commented 2 days ago

Please update to the latest version of the SDK, 7.10 is outdated.

Others had problems with server software/CentOS and cURL, you can read more at https://github.com/kreait/firebase-php/issues/888

If you can't update the server dependencies, going back to 7.9.1 might help, but again, upgrading to the latest version would be better 🀞🏻

jeromegamez commented 2 days ago

Closing because server environments are out of scope of this project. Feel free to add further comments with your findings so that other might benefit from them πŸ™πŸ»

WilliamGeorge1997 commented 2 days ago

I downgrade the package to 7.9.1 and it worked for me but i have a question as it work synchronously, if i have large number of tokens like for ex. 10k should i divide them into batches using a loop then send them using a job?

jeromegamez commented 2 days ago

That would be a sensible approach, yes. But I'd rather recommend upgrading the server OS and the SDK, because both are not supported anymore and you will miss out on security patches and new features. πŸ˜…

WilliamGeorge1997 commented 2 days ago

For sure i will very soon. I would like to thank you very much for your help❀