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

When compiled version of extension #98

Open
faustynm opened this issue Apr 18, 2024 · 3 comments
Open

When compiled version of extension #98

faustynm opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@faustynm
Copy link

On main page:
Binary versions of the driver, available for Linux systems and officialy supported versions of PHP (8.1 and 8.2), can be obtained from GitHub Releases (soon).

I started a new project, I would like to use scylladb. I have a problem compiling the extension. When to expect compiled extensions to be available

@CodeLieutenant CodeLieutenant self-assigned this Apr 18, 2024
@CodeLieutenant CodeLieutenant added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 18, 2024
@CodeLieutenant
Copy link
Member

It will be always better for you to compile it, as binary distributions will only work for the platforms where it was built, (Ubuntu 22.04 binary will have no guarantee that the same binary will work on 24.04, dynamic linking problem). Depending on what are your needs, you can just use this script as an example of how to build the driver from the source

Make sure you have all the correct dependencies for your system (Mac/Linux)

  • libgmp
  • libuv
  • libz
  • libcurl
  • libscylladb (By default it will be built from source in the following example on the latest TAG, if you need Apache Cassandra support, check the CMake file for the options - I'll make sure to document them in the future)
cmake --preset Release
pushd out/Release
ninja install

# Put this into cassandra.ini in your php ini directory
extension=cassandra

@faustynm
Copy link
Author

THX

In example In QuickStart is error:
$result = $querySent->get();

I received:
Fatal error: Uncaught Error: Call to undefined method Cassandra\Rows::get() in .....

I had to change to:
$result = $querySent->offsetGet(0);

@CodeLieutenant
Copy link
Member

this looks like a bug, will fix it, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: In Verification
Development

No branches or pull requests

2 participants