PHP 5.1.0! But wheres PECL...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

PHP 5.1.0! But wheres PECL...

Post by Ambush Commander »

A while ago I installed 5.1.0rc. Well, for some reason, I also have pecl-5.1.0RC1-Win32.zip on my harddrive. And that had lots and lots of extensions.

5.1.0 is out. Yay. But for some strange reason the PECL is gone! What happened?
User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

Have you seen http://pecl4win.php.net/ ?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Hmm... so I'll just have to download them individually. Thanks anyway.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

From install.txt:
Chapter 3. Installation of PECL extensions

Introduction to PECL Installations

PHP extensions may be installed in a variety of ways. PECL is a
repository of PHP extensions living within the PEAR structure, and the
following demonstrates how to install these extensions.

These instructions assume /your/phpsrcdir/ is the path to the PHP
source, and extname is the name of the PECL extension. Adjust
accordingly. These instructions also assume a familiarity with the
pear command.

Shared extensions may be installed by including them inside of php.ini
using the extension PHP directive. See also the extensions_dir
directive, and dl(). The installation methods described below do not
automatically configure PHP to include these extensions, this step
must be done manually.

When building PHP modules, it's important to have the appropriate
versions of the required tools (autoconf, automake, libtool, etc.) See
the Anonymous CVS Instructions for details on the required tools, and
required versions.
_________________________________________________________________

Downloading PECL extensions

There are several options for downloading PECL extensions, such as:

* http://pecl.php.net
Listed here is information like the ChangeLog, release
information, requirements, revisions, etc. Although not every PECL
extension has a webpage, most do.
* pear download extname
The pear command may also be used to download source files.
Specific revisions may also be specified.
* CVS
All PECL files reside in CVS. A web-based view may be seen at
http://cvs.php.net/pecl/. To download straight from CVS, consider
the following where phpfi is the password for user cvsread:

$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname

* Windows downloads
Windows users may find compiled PECL binaries by downloading the
Collection of PECL modules from the PHP Downloads page, and by
retrieving a PECL Snapshot. To compile PHP under Windows, read the
Win32 Build README.
_________________________________________________________________

PECL for Windows users

Like with any other PHP extension DLL, to install move the PECL
extension DLLs into the extension_dir folder and include them within
php.ini. For example:

extension=php_extname.dll

After doing this, restart the web server.
_________________________________________________________________

Compiling shared PECL extensions with PEAR

PEAR makes it easy to create shared PHP extensions. Using the pear
command, do the following:

$ pear install extname

That will download the source for extname, and compile it on the
system. This results in an extname.so file that may then be included
in php.ini

In case the systems preferred_state is set higher than an available
extname version, like it's set to stable and the extension is still in
beta, either alter the preferred_state via pear config-set or specify
a specific version of the PECL extension. For example:

$ pear install extname-0.1.1

Regardless, pear will copy this extname.so into the extensions
directory. Adjust php.ini accordingly.
_________________________________________________________________

Compiling shared PECL extensions with phpize

If using pear is not an option, like for building shared PECL
extensions from CVS, or for unreleased PECL packages, then creating a
shared extension may also be done by manually using the phpize
command. The pear command essentially does this but it may also be
done manually. Assuming the source file is named extname.tgz, and that
it was downloaded into the current directory, consider the following:

$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ cd extname
$ phpize
$ ./configure && make

Upon success, this will create extname.so and put it into the modules/
and/or .libs/ directory within the extname/ source. Move this shared
extension (extname.so) into the PHP extensions directory, and adjust
php.ini accordingly.
_________________________________________________________________

Compiling PECL extensions statically into PHP

To statically include the extension within the PHP build, put the
extensions source into the ext/ directory found in the PHP source. For
example:

$ cd /your/phpsrcdir/ext
$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
$ rm package.xml

This will result in the following directory:

/your/phpsrcdir/ext/extname

From here, build PHP as normal:

$ cd /your/phpsrcdir
$ ./buildconf
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install

Whether --enable-extname or --with-extname is used depends on the
extension. Typically an extension that does not require external
libraries uses --enable. To be sure, run the following after
buildconf:

$ ./configure --help | grep extname
_________________________________________________________________
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Windows users may find compiled PECL binaries by downloading the
Collection of PECL modules from the PHP Downloads page, and by
retrieving a PECL Snapshot. To compile PHP under Windows, read the
Win32 Build README.
Yeah. What happened to that? ( see for yourself http://us2.php.net/downloads.php )
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

That's what I was searching for yesterday.... :?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Sami wrote:That's what I was searching for yesterday.... :?
For the record they can be found here: http://pecl4win.php.net/list.php/5_1 for 5.1

For 5.0.x: http://pecl4win.php.net/list.php/5_0

And for 4.4.x: http://pecl4win.php.net/list.php/4_4
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

But no easy zip... T_T
Post Reply