I am trying to run mamp's phpize command on a source code as below:
/Applications/MAMP/bin/php/php5.3.14/bin/phpize
But this is giving me error as below output:
grep: /Applications/MAMP/bin/php/php5.3.14/include/php/main/php.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.3.14/include/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/MAMP/bin/php/php5.3.14/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
Do you have any idea, what is wrong here?
Here's a great guide on how to download and configure the resources that you need:
https://stackoverflow.com/a/11175197/369326
Related
I am attempting to add the ZeroMQ extension's PHP functionality to my local server. I have successfully installed it however binding it to the PHP of my system has been a challenge.
I've attempted both the PEAR/PECL and Github building methods however they all come down to this CLI Error:
In file included from /private/tmp/pear/install/zmq/zmq.c:31:
/private/tmp/pear/install/zmq/php_zmq.h:45:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [zmq.lo] Error 1
ERROR: `make' failed
where can I generate and include this php.h file?
php-v shows: PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
phpize -v shows: grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
I ran into this when installing zmq on MacOS 10.14.3 Mojave. I'd done the followings and it's fixed.
install the command line tools if you haven't done so.
xcode-select --install
install the header files
cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg
Credit to #Steven Installing xdebug on MacOs Mojave - 'php.h' file not found
So i'm trying to download the imagick dependency. I already have the ImageMagick installed through homebrew now i'm trying to put the imagick directory in with: (i'm using mac OS)
sudo pecl install imagick
i get the following error
downloading imagick-3.2.0RC1.tgz ...
Starting to download imagick-3.2.0RC1.tgz (163,503 bytes)
...................................done: 163,503 bytes
16 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
Here is my current setup directory of pear
1. Installation base ($prefix) : /usr/local/pear
2. Temporary directory for processing : /tmp/pear/install
3. Temporary directory for downloads : /tmp/pear/install
4. Binaries directory : /usr/local/bin
5. PHP code directory ($php_dir) : /usr/local/pear/share/pear
6. Documentation directory : /usr/local/pear/docs
7. Data directory : /usr/local/pear/data
8. User-modifiable configuration files directory : /usr/local/pear/cfg
9. Public Web Files directory : /usr/local/pear/www
10. Tests directory : /usr/local/pear/tests
11. Name of configuration file : /private/etc/pear.conf
I try install OCI8 + PHP I can access mi DB's in sqlplus
I try this
pecl install oci8
and the result is this
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] :
in the scrip prompt i write this
instantclient,/usr/local/lib
But i have this problem
/private/tmp/pear/install/oci8/oci8.c:35:10: fatal error: 'php.h' file not found
#include "php.h"
^
1 error generated.
make: *** [oci8.lo] Error 1
ERROR: `make' failed
You need write the instant client path.
above download link instant client:
https://www.oracle.com/br/database/technologies/instant-client/macos-intel-x86-downloads.html
I'm tryng to install imagick in my VPS at Dreamhost and when I type "phpize" in the imagick-3.0.1 folder I get this:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
I'm following this tutorial: http://wiki.dreamhost.com/ImageMagick_and_imagick_php_module_on_shared_hosting#Configure_PHP_to_use_this_extension
Any help would be apreciated.
The problem was that the configure script was looking for the
MagickWand.h file in this directory:
/home/bylifeweb/local/include/ImageMagick/wand/MagickWand.h
but the file is actually in this directory
/home/bylifeweb/local/include/ImageMagick-6/wand/MagickWand.h
To fix that I simply made a symlink from ImageMagick to ImageMagick-6 and
ran the configure script again, it worked fine that time and I was then
able to run make.
Libraries have been installed in:
/home/bylifeweb/build/imagick-3.0.1/modules
I had some problems installing eAccelerator on XAMPP installation of Mac OS X Lion.
Firstly, I had this problem:
Mohd-Yusufs-MacBook-Pro:APC-3.1.9 mohdyusuf$ $PHP_PREFIX/bin/phpize
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main/php.h: No such file or directory
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_modules.h: No such file or directory
grep: /Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
So I solved it by installing "Developer package" from XAMPP download page.
Then, I had problems with compiled version of eAccelerator:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so' - dlopen(/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so, 9): no suitable image found. Did find:
/Applications/XAMPP/xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/eaccelerator.so: mach-o, but wrong architecture in Unknown on line 0
How to solve it?
Under eAccelerator source dir:
make clean
./configure CFLAGS='-arch i386' APXSLDFLAGS='-arch i386' --enable-eaccelerator=shared --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
make
sudo make install
Ps: dont forget to enable eaccelerator.so extention under /Applications/XAMPP/xamppfiles/etc/php.ini