Install PHP extension on Linux Slackware 13.37 gets error: phpize failed

Install extension

I was trying to install PECL extension and run into this problem with phpize error

pecl install oauth
downloading oauth-1.2.2.tar ...
Starting to download oauth-1.2.2.tar (Unknown size)
........................done: 233,984 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
configure.in:3: warning: prefer named diversions
configure.in:3: warning: prefer named diversions
ERROR: `phpize' failed

After a googling the issue I didn’t found a quick and easy solution and make a post at linuxquestions.org and after get to a post with solution. Unfortunately it didn’t work for me, but fist try it. It may help you – ths solution is simple – there is a patch file that you save as text file on your system and run a command. After that it should work.

Trying the Kagan MacTane patch

This post has a whole explanation about the problem and provides a patch file. There is even fix for that patch, that worked for some distros. Try the patch first without updating anything.

Follow theese steps:

  • Copy the text from the patch file and paste it in text file on your filesystem. Then run
patch -p0 < /path/to/patch_file

In my case I get

patching file Builder.php
Hunk #1 succeeded at 472 (offset 15 lines).
patch: **** malformed patch at line 46: 2))));
  • Try the fix of the patch file

Repeat the previous step, but with the fixed patch. This also didn’t worked for me. Here are my results

patching file Builder.php
Hunk #1 succeeded at 472 (offset 8 lines).
patch: **** malformed patch at line 47: 2))));

Solution for package distributions

On various posts I found that installing php-dev package solves the issue with phpize error. However I can’t test if that works. Here is a snippet from a similar post

yum -y install php-devel

or if you have other package manager, for example on Debian apt-get

apt-get install php-dev

Recompile PHP

The Error: phpize actualy comes long ago from 2004 year. There is a exit signal not habdled properly and therefore the phpize error. Here is the issue reported on PHP bug tracking page. I recommend stop there and vote for it, since it’s current status is closed.

When run

./configure

i get that error

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

For solving it you have to install the dependency:

apt-get install libc-client-dev

or exlude the –with-imap-ssl=/usr –with-imap=/usr/local/lib/c-client opcions from the configuration if you don’t need them

In particular the phpize error comes form the  –enable-sigchild setting in PHP configuration and the solution for me was to recompile the PHP without that option. You can run

make test

It take some time, but it generates a test file that you can send to PHP QA team for investigation. After recompiling PHP from source the phpize error disappear and I was able to run

pecl install oauth

in order to install extension. Just don’t forget to add the relevant line in php.ini file

extension = oauth
Tagged with: , , ,
Posted in Linux, PHP
One comment on “Install PHP extension on Linux Slackware 13.37 gets error: phpize failed
  1. Hosting geek says:

    I also having this problem, began to look for a solution and found this article. Thank you very much.

3 Pings/Trackbacks for "Install PHP extension on Linux Slackware 13.37 gets error: phpize failed"
  1. [...] I reinstalled PHP from source without –enable-sigchild in configuration. Thanks for the help. Here is all what i do. Hope it will help [...]

  2. [...] ……………………done: … Read the original here: Install PHP extension on Linux Slackware 13.37 gets error: phpize … This entry was posted in Uncategorized and tagged download-oauth-1-2-2-tar, install-oauth, pecl, [...]

  3. [...] the original post: Install PHP extension on Linux Slackware 13.37 gets error: phpize … Tagged with: [ books, css, development, google, home, hry, install, JavaScript, kdelchev-com, [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sites
Categories
Archives