We are running php on a machine with Centos7, running multiple php versions and we need to install the sql server drivers and are running with the following errors.
we have tried running pecl from the 7.3 php location but it reverts midway to the default pecl instance for the machine, which is 5.6 and fails to complete the task.
running: make
/bin/sh /var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/libtool --mode=compile g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/include -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -o conn.lo
libtool: compile: g++ -std=c++11 -I. -I/var/tmp/sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/include -I/var/tmp/pear-build-rootL2VMF0/sqlsrv-5.6.1/main -I/var/tmp/sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /var/tmp/sqlsrv/conn.cpp -fPIC -DPIC -o .libs/conn.o
In file included from /var/tmp/sqlsrv/php_sqlsrv_int.h:25:0,
from /var/tmp/sqlsrv/conn.cpp:24:
/var/tmp/sqlsrv/shared/core_sqlsrv.h:2390:38: error: macro "ZVAL_STRINGL" requires 4 arguments, but only 3 given
ZVAL_STRINGL(value_z, str, str_len);
^
/var/tmp/sqlsrv/shared/core_sqlsrv.h:2437:54: error: macro "add_assoc_string" requires 4 arguments, but only 3 given
int zr = ::add_assoc_string(array_z, key, val);
how do we tell pecl to do the whole procedure in php 7.3 so it can run propperly??
We noticed a week ago that we were missing some pdo php drivers, we installed them via yum and then we succesfully connected the machine to sqlserver
Related
I try to get Xdebug ready on my Mac to use for PHP development, I inputed the output of phpinfo() in the official Wizard and followed the instructions. phpize worked, running ./configure also works, but I'm stuck at the make command which outputs:
Makefile:230: warning: overriding commands for target `test'
Makefile:134: warning: ignoring old commands for target `test'
/bin/sh ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/libtool --mode=compile cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -o xdebug.lo
mkdir .libs
cc -I. -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -DPHP_ATOM_INC -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/include -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/main -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I~/Downloads/xdebug-3.0.4/xdebug-3.0.4/src -DHAVE_CONFIG_H -g -O2 -c ~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c -fno-common -DPIC -o .libs/xdebug.o
~/Downloads/xdebug-3.0.4/xdebug-3.0.4/xdebug.c:25:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [xdebug.lo] Error 1
I tried to install the php-dev package through brew, but it does not exist. How to fix this issue?
It is because OSX doesn't install the PHP headers that extensions require when they are being compiled. I think you're using the OSX provided PHP.
You should instead use homebrew to install PHP, which would also install the headers, and then you can install Xdebug (and other extensions).
There are excellent instructions in this answer.
I tried to install the gnupg yet I seem to keep getting the same error. I am using my MAC to install gnup so encode a file. I'm using PECL to install
pecl install gnupg
Yet I get the following error:
/bin/sh /op/gnupg-1.4.0/libtool --mode=compile cc -I. -I/opt/gnupg-1.4.0 -DPHP_ATOM_INC -I/opt/gnupg-1.4.0/include -I/opt/gnupg-1.4.0/main -I/opt/gnupg-1.4.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /opt/gnupg-1.4.0/gnupg.c -o gnupg.lo
mkdir .libs
cc -I. -I/
opt/gnupg-1.4.0 -DPHP_ATOM_INC -I/opt/gnupg-1.4.0/include -I/opt/gnupg-1.4.0/main -I/opt/gnupg-1.4.0 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /opt/gnupg-1.4.0/gnupg.c -fno-common -DPIC -o .libs/gnupg.o
/opt/gnupg-1.4.0/gnupg.c:21:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
I have installed the previous packages using the commands:
brew install gpg
brew install gpgme
I have even tried to download and manually make the extension but I still get the same error.
I had used the instructions from this question.
Does anyone have any ideas about what the issue is?
I am new on Linux. I am compiling PDO oci8 for Oracle on PHP 5.6. And I am using 12.1 instant client for Oracle.
I am following this link to install.
http://shiki.me/blog/installing-pdo_oci-and-oci8-php-extensions-on-centos-6-4-64bit/
But on make command I am facing lots of errors.
running: make
/bin/sh /var/tmp/pear-build-rootra3mow/oci8-2.0.0/libtool --mode=compile cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/include -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -o oci8.lo
libtool: compile: cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/include -I/var/tmp/pear-build-rootra3mow/oci8-2.0.0/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -fPIC -DPIC -o .libs/oci8.o
In file included from /usr/include/php/Zend/zend_config.h:1,
from /usr/include/php/Zend/zend.h:51,
from /usr/include/php/main/php.h:35,
from /var/tmp/oci8/oci8.c:35:
/usr/include/php/main/../main/php_config.h:1230: error: expected ë=í, ë,í, ë;í, ëasmí or ë__attribute__í before ëHAVE_OCI8_DTRACEí
There are some other errors. I will upload if needed.
Please help, Every type of help will be appreciated.
Thanks in advance.
The main problem would be downloading PDO_OCI from PECL. This, similar to other DB's PDO drivers, is obsoleted and you must use the PDO_OCI code from a PHP source bundle.
I'd strongly recommend using OCI8 instead of PDO_OCI. OCI8 has all sorts of things like connection pooling, statement caching etc.
I install all dependencies / requires for phalcon , and pull from git then when i run ./install i got theese errors :
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
/bin/sh /root/down/cphalcon/build/64bits/libtool --mode=compile gcc -I. -I/root/down/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/down/cphalcon/build/64bits/include -I/root/down/cphalcon/build/64bits/main -I/root/down/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /root/down/cphalcon/build/64bits/phalcon.c -o phalcon.lo
libtool: compile: gcc -I. -I/root/down/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/down/cphalcon/build/64bits/include -I/root/down/cphalcon/build/64bits/main -I/root/down/cphalcon/build/64bits -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /root/down/cphalcon/build/64bits/phalcon.c -fPIC -DPIC -o .libs/phalcon.o
/root/down/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_array_unshift’:
/root/down/cphalcon/build/64bits/phalcon.c:6058: error: void value not ignored as it ought to be
make: *** [phalcon.lo] Error 1
What can i do ?
Make sure your PHP is 5+ then check if you have the latest version of these packages: php-devel php-mysqlnd gcc libtool.
If still no luck try to using PHP 5.5 and install the packages: php55-devel php55-mysqlnd.
And finally if you believe that the problem isn't with your machine configurations, checkout to branches 1.3.2 or 1.3.3 and try to install again.
Hopefully you got this figured out by now, but I just ran into the same issue. I'm using Ubuntu through VirtualBox.
The issue was that GCC ran out of memory, so I changed the allocated memory from 512MB to 1024MB, then I ran it again successfully.
I am running OS X 10.7 Lion with Zend Server CE 5.5 (and therefore PHP 5.3.8). When I try to setup a new Symfony2 project the configuration checker warns me to upgrade the intl extension to ICU 4+.
I followed the instructions I found in another StackOverflow Post, mainly this blog post about upgrading intl on Lion. But when I try to compile the extension with PHP 5.3.8. I get the following error:
$ make
/bin/sh /Users/Florian/Downloads/php-5.3.8/ext/intl/libtool --mode=compile cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c -o php_intl.lo
mkdir .libs
cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c -fno-common -DPIC -o .libs/php_intl.o
/Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c:490: error: ‘PHP_FE_END’ undeclared here (not in a function)
make: *** [php_intl.lo] Error 1
I was able to compile intl.so with PHP 5.3.6 but when I put that file in my php_extensions directory, PHP does not recognize intl at all. I think in my last attempt I tried to compile it with ICU 4.0.1, but I also tried some other versions like 4.8.1 or 4.6.1. Is there any possibility to compile ICU with PHP 5.3.8 on 10.7 at the moment?
How much do you need Zend Server? If not at all, then you could try http://php-osx.liip.ch/ which comes with ext/intl and everything else you need for Symfony2