Open TouriSpo opened 8 years ago
+1
was your geos library compiled with php7 bindings?
The api changed. People says it takes at max 2 hour to change it to the new zend API. Unfortunately, I don't know C.
But it's not a GeoPhp bug, GEOS is an external library.
Sorry to hijack this but has anyone managed to compile geos with bindings for php7? Huge blocking issue for the team I'm working with at the moment as we really need to move to php7 but this is a crucial lib for us. Any info would be really appreciated.
Any news on that issue?
Found a solution: 1st: Compile and install GEOS package without PHP bindings 2nd: Compile and install newest PHP bindings seperately ( https://git.osgeo.org/gogs/geos/php-geos )
Yes we actually hired Sandro to do this work and it's working nicely
Is this library no longer maintained? This is an issue for me as well.
Just use up to date geos bindings @matthewmummert5. I hit this issue with 3.4.2, but it works well with 3.6.1 and PHP bindings from https://git.osgeo.org/gogs/geos/php-geos.
curl -s -O http://download.osgeo.org/geos/geos-3.6.1.tar.bz2 &&\
tar -xjvf geos-3.6.1.tar.bz2 &&\
cd geos-3.6.1/ &&\
./configure --enable-php &&\
make &&\
make install &&\
cd ..
ldconfig
curl -s -O https://git.osgeo.org/gogs/geos/php-geos/archive/master.tar.gz &&\
tar -zxvf master.tar.gz &&\
cd php-geos &&\
./autogen.sh &&\
./configure &&\
make &&\
make install &&\
cd .. &&
The master.tar.gz has moved here:
https://git.osgeo.org/gitea/geos/php-geos/archive/master.tar.gz
Updates procedure here:
curl -s -O http://download.osgeo.org/geos/geos-3.6.1.tar.bz2 &&\
tar -xjvf geos-3.6.1.tar.bz2 &&\
cd geos-3.6.1/ &&\
./configure --enable-php &&\
make &&\
make install &&\
cd ..
ldconfig
curl -s -O https://git.osgeo.org/gitea/geos/php-geos/archive/master.tar.gz &&\
tar -zxvf master.tar.gz &&\
cd php-geos &&\
./autogen.sh &&\
./configure &&\
make &&\
make install &&\
cd .. &&
Note: ./autogen.sh refers to phpize. You have to install php7.x-dev
Example for php 7.1:
sudo apt-get install php7.1-dev
Just tried to install geos on Centos 7.6, PHP 7.3.15
# yum install bzip2
# yum install gcc
# yum install php-devel
# wget http://download.osgeo.org/geos/geos-3.8.0.tar.bz2
# tar -xjvf geos-3.8.0.tar.bz2
# cd geos-3.8.0
# ./configure
on last command ( ./configure ) I'm stuck with the following errors:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for GEOS version... "3.8.0"
checking for GEOS CAPI version... "1.13.1"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/root/geos-3.8.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Any help greatly appreciated. Thx
Just tried to compile geoPHP with new PHP 7.0.1 version. Compiling fails with the following errors:
Is supporting PHP7 on your roadmap? Would be great to be able to update PHP and still use all the cool features of geoPHP.
Thanks for a short heads up Martin