-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support PHP 7's Extension API #4
Comments
Hi, unfortunately in close feature I have no plans (read time) to create
new version for PHP7.
Regards,
Mateo
…On Tue, Sep 12, 2017 at 3:58 PM, Claude Bing ***@***.***> wrote:
Are there any plans to support PHP 7 with this wrapper? I am interested in
integrating LMDB with an embedded device project, but cannot compile this
against the PHP 7 headers.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALMX6PZ8U1aKnn843LBLe8sBgZRi9af5ks5shoehgaJpZM4PUphR>
.
|
hey @mpremus can you give me some hints or guidance as to how to proceed to try to make this lib php7 compatible? |
@7php @meinemitternacht The latest php version 7.2 supports lmdb by compiling the dba extension with --with-lmdb=/path/to/lmdb |
For example, with brew (homebrew/linuxbrew): brew install lmdb |
@dana321 thank you! I'll give it a look at work tomorrow. |
@dana321 did you even tried running it on Ubuntu 16? Also how can it be working when the Obviously it has to be something like:
So my output with errors go something like:
|
@7php Its clear you have no idea what you're doing or what you're talking about - thats ok. But don't make demands of me, i provided the solution and you're still trying to compile the old php module against the php5 header files. I am under no obligation to help you whatsoever! Theres a reason why people use and learn linuxbrew and phpbrew, its because you can compile the latest and greatest software without the hastle. Take the hint. |
@7php The DBA extension natively supports LMDB now, no need for a wrapper. |
@meinemitternacht that was very helpful and it's a great news as I really wanted to use LMDB on a project close to my heart. cheers |
Method for configure and build from sources PHP7 in |
I agree. I dont support this plugin for more then 4 years. If you have some
code that can improve this please Create a fork and I will merge commit
…On Wed, 30 Oct 2019, 22:19 Denis Veselov, ***@***.***> wrote:
phpbrew is bad tool (valet not worked with this).
Method for configure and build from sources PHP7 in homebrew:
https://gist.github.com/saippuakauppias/fac2a33dfe420adb4a6cf19c257eef46
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACZRP2ARZJPPHJVKDBVWSUTQRH25XA5CNFSM4D2STBI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVZTBQ#issuecomment-548116870>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZRP2DY65VCZ7SCHCQ5SMTQRH25XANCNFSM4D2STBIQ>
.
|
@saippuakauppias is there a reason you would not want to use the DBA extension that is bundled with PHP? |
Because by default php builts without lmdb support (see docs). DBA extension enabled by default, but without lmdb (need reconfigure php before compiling). |
Wow, I cannot believe it's already Jan 2022, so many years later I got back to this :) Hope everyone in here is safe and doing well. @dana321 I read my comments above and I am not proud of what I wrote up there. That year was one of my worse period in rl, and I clearly see I also completely misunderstood your reply as well at that time. I'm sorry for my tone and way of speaking there - not the proper me. irrespective of my situation, I should have done much better in replying. Please accept my sincere apology. @saippuakauppias I actually came here to get in touch with you since I could not find a point of contact with you. I am hitting MDB_MAP_FULL with LMDB using php_dba and I saw your gist here aimed at MAC. I also found someone's interaction on the php mail list here. The limit of 1MB seems still in place and I keep hitting the issue despite passing the 4th param as Have you been able to find any solution for Ubuntu servers or your case was on Mac only? Because of this issue, I'll probably drop usage for LMDB, which is sad due the power it has. |
On Ubuntu, I just build LMDB and PHP myself and bypass this restriction (I've been using it in production for over a year): set -euo pipefail
# install lmdb
apt -y install make gcc wget
cd ~
# clone
LMDB_VERSION="0.9.24"
wget https://github.com/LMDB/lmdb/archive/LMDB_${LMDB_VERSION}.tar.gz
tar -zxvf LMDB_${LMDB_VERSION}.tar.gz
cd ~/lmdb-LMDB_${LMDB_VERSION}/libraries/liblmdb/
# patch 1
# get memory pagesize: `getconf PAGESIZE`
# 4194304000 Bytes = 4GB
sed -e "s/DEFAULT_MAPSIZE\s1048576/DEFAULT_MAPSIZE 4194304000/g" ~/lmdb-LMDB_${LMDB_VERSION}/libraries/liblmdb/mdb.c -i
LMDB_MAPSIZE_CHECK=`cat ~/lmdb-LMDB_${LMDB_VERSION}/libraries/liblmdb/mdb.c | grep '4194304000' | wc -l`
echo "LMDB_MAPSIZE_CHECK: ${LMDB_MAPSIZE_CHECK}"
# patch 2
sed -e "s/DEFAULT_READERS\s126/DEFAULT_READERS 1024/g" ~/lmdb-LMDB_${LMDB_VERSION}/libraries/liblmdb/mdb.c -i
LMDB_READERS_CHECK=`cat ~/lmdb-LMDB_${LMDB_VERSION}/libraries/liblmdb/mdb.c | grep 'DEFAULT_READERS 1024' | wc -l`
echo "LMDB_READERS_CHECK: ${LMDB_READERS_CHECK}"
# install
make
make test
make install prefix=/opt/lmdb # directory path: https://ru.wikipedia.org/wiki/FHS
# install PHP
# like: https://gist.github.com/saippuakauppias/d3e2cdd1c654313efefef3b8b66a5802
# with :
PHP_CONFIGURE_ARGS="--prefix=/usr/local/php7 \
# ...
--enable-dba \
--with-lmdb=/opt/lmdb \
" |
Are there any plans to support PHP 7 with this wrapper? I am interested in integrating LMDB with an embedded device project, but cannot compile this against the PHP 7 headers.
The text was updated successfully, but these errors were encountered: