ID:               31486
 User updated by:  tim dot lokot at printsoft dot com
 Reported By:      tim dot lokot at printsoft dot com
 Status:           Open
 Bug Type:         *Configuration Issues
 Operating System: Redhat
 PHP Version:      5.0.2
 New Comment:

To anyone that has similar issues, the workaround using phpize is as
follows (its not well documented for custom installs
http://www.php.net/manual/en/install.pecl.phpize.php ) ...

$ cd [phpbindir]
$ ./pear download [extname]
$ gzip -d < [extname].tgz | tar -xvf -
$ cd [extname]
$ ../phpize
$ ./configure --with-php-config=[phpbindir]/php-config
$ make
$ cd .libs
$ mv [extname].so [phpextdir]

This works when the default "./pear install [extname]" does not


Previous Comments:
------------------------------------------------------------------------

[2005-01-11 22:47:39] tim dot lokot at printsoft dot com

The commands I ran (in order) were:

cd /usr/local/php5/bin
./pear install pdflib

When I run "./pear show-config" I get these settings below.  To me it
looks like everything is in the correct place.

Configuration:
==============
PEAR executables directory     bin_dir         /usr/local/php5/bin
PEAR documentation directory   doc_dir        
/usr/local/php5/lib/php/doc
PHP extension directory        ext_dir        
/usr/local/php5/lib/php/extensions
PEAR directory                 php_dir         /usr/local/php5/lib/php
PEAR Installer cache directory cache_dir       /tmp/pear/cache
PEAR data directory            data_dir       
/usr/local/php5/lib/php/data
PHP CLI/CGI binary             php_bin         /usr/local/php5/bin/php
PEAR test directory            test_dir       
/usr/local/php5/lib/php/test
Cache TimeToLive               cache_ttl       3600
Preferred Package State        preferred_state stable
Unix file mask                 umask           22
Debug Log Level                verbose         1
HTTP Proxy Server Address      http_proxy      <not set>
PEAR server                    master_server   pear.php.net
PEAR password (for             password        <not set>
maintainers)
Signature Handling Program     sig_bin         /usr/bin/gpg
Signature Key Directory        sig_keydir     
/usr/local/php5/etc/pearkeys
Signature Key Id               sig_keyid       <not set>
Package Signature Type         sig_type        gpg
PEAR username (for             username        <not set>
maintainers)


The only thing I can think of is that when I type in phpize or pear
from any other directory (without specifically running the php5
version) it runs the php4 versions as the directory must be set in the
environment path.

So how do I get pear to specifically run the version in the php5 bin
directory rather than the version it finds in the environment path?

Thanks for the pointer to phpize though.

------------------------------------------------------------------------

[2005-01-11 16:28:20] [EMAIL PROTECTED]

You try to run with wrong phpize. Use the one you installed in the
/usr/local/php5/bin 


------------------------------------------------------------------------

[2005-01-11 04:58:06] tim dot lokot at printsoft dot com

Description:
------------
I've been trying to test PHP5 on my PHP4 webserver and ended up running
PHP5 as a CGI with PHP4 as an Apache module.  PHP4 was installed via
RPM.

I used this command to configure PHP5:

'./configure' '--prefix=/usr/local/php5'
'--with-mysql=/usr/include/mysql/'
'--with-config-file-path=/usr/local/lib/php5'
'--includedir=/usr/local/php5/include'
'--oldincludedir=/usr/local/php5/include'

PHP5 seems to run fine until I try to add any extensions to it from
PECL.  Then the pear executable tells me that it has the wrong API in
it.  So now whenever it tries to install any PECL modules, I get API
errors when PHP tries to load them.

>From what I can tell I'm either (hopefully) missing a configure option,
or the pear compile is finding the php4 headers by default and using
them instead of the php5 ones.

Actual result:
--------------
The php5 pear executable returns this:

Configuring for:
PHP Api Version:   20020918
Zend Module Api No:   20020429
Zend Extension Api No:   20021010


phpinfo() returns this:

PHP API  20031224
PHP Extension  20040412
Zend Extension  220040412


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31486&edit=1

Reply via email to