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?
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.
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
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 am attempting to install OAuth on Ubuntu Server 12.04 but getting errors. I am following this tutorial but something isn't lining up:
http://sergiopvilar.wordpress.com/2013/05/18/how-to-install-php-oauth-extension/
Command I am running in terminal:
sudo pecl install oauth
Last portion of error I am getting response (because it returns several pages of response):
running: make
/bin/bash /tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -o oauth.lo
libtool: compile: cc -I. -I/tmp/pear/temp/oauth -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/include -I/tmp/pear/temp/pear-build-rootFgGDRe/oauth-1.2.3/main -I/tmp/pear/temp/oauth -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -Wall -g -c /tmp/pear/temp/oauth/oauth.c -fPIC -DPIC -o .libs/oauth.o
In file included from /tmp/pear/temp/oauth/php_oauth.h:47:0,
from /tmp/pear/temp/oauth/oauth.c:14:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [oauth.lo] Error 1
ERROR: `make' failed
Make is installed and working. Any advice?
Found it, I needed to install PCRE Library ( Perl 5 Compatible Regular Expression Library ).
# apt-get update
# apt-get install libpcre3 libpcre3-dev
This worked for me.
Try This
apt-get update
apt-get install libpcre3 libpcre3-dev
sudo pecl install mongodb
I got some serious error while installing expect extension in PHP.
I ran sudo pecl install channel://pecl.php.net/expect-0.3.1
I got error like this while running make,
running: make
/bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool --mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/expect/expect.c -o expect.lo
libtool: compile: cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/expect/expect.c -fPIC -DPIC -o .libs/expect.o
In file included from /tmp/pear/temp/expect/expect.c:21:0:
/tmp/pear/temp/expect/php_expect.h:33:17: fatal error: tcl.h: No such file or directory
compilation terminated.
make: *** [expect.lo] Error 1
ERROR: `make' failed
Please advice me as I am a very beginner in PHP.
Thanks.
I found this post helpful for this issue. On CentOS I was able to get this installed via:
yum install tcl tcl-devel tk tk-devel
yum install expect expect-devel
pecl install channel://pecl.php.net/expect-0.3.1
Then add the following to php.ini:
extension = expect.so