Page 1 of 1

XAMPP PHP 重编译

PostPosted: 18. June 2009 07:59
by andriy5pal
请教一下 我想添加一个php扩展 需要重新编译PHP 该如何操作呢

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 08:09
by Wiedmann
Can you ask your question in English language?

IMHO you want ask how to recompile PHP and adding a PHP extension? Which PHP extension want you add?

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 08:50
by andriy5pal
Yes, i want to add a php extension. ImageMagick

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 08:52
by andriy5pal

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 08:52
by andriy5pal
4) Go back to the main PHP source directory (from the example above, it
would be "PHP_SRC_DIR", and run:

rm ./configure

and then

./buildconf --force

to remove and rebuild the PHP configure script.

5) Follow the PHP installation instructions, but add

--with-magickwand=IMG_MGCK_DIR

to your ./configure command, replacing "IMG_MGCK_DIR" with the full path
of the directory where ImageMagick is installed (in most cases "/usr").

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 09:04
by Wiedmann
Well, the above post describes the installation statically into PHP (which require a rebuild of PHP).

The recommended way for XAMPP is to build a shared extension:
- download / install the XAMPP devel package.
- compile/ install a shared extension with phpize.
- enable the extension in "php.ini"

BTW:
i want to add a php extension. ImageMagick

The above is the MagicWand extension. There is also a ImageMagick extension.

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 11:15
by andriy5pal
Yes, i compile/ install a shared extension with phpize.

BUT which directory should i implementation of these orders
"
4) Go back to the main PHP source directory , and run:

rm ./configure

and then

./buildconf --force

to remove and rebuild the PHP configure script.

5) Follow the PHP installation instructions, but add

--with-magickwand=IMG_MGCK_DIR

to your ./configure command, replacing "IMG_MGCK_DIR" with the full path
of the directory where ImageMagick is installed (in most cases "/usr").

"

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 11:23
by Wiedmann
i compile/ install a shared extension with phpize.

The instructions from your post are for a static extension without phpize, and not for a shared extension. You remember?

BUT which directory should i implementation of these orders

Sorry. Don't really understand. Which directory did you mean?

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 11:31
by andriy5pal
I want to go to the main PHP source directory and run :

- rm ./configure

- ./buildconf --force

AND

==>Follow the PHP installation instructions, but add

--with-magickwand=IMG_MGCK_DIR

to your ./configure command, replacing "IMG_MGCK_DIR" with the full path of the directory where ImageMagick is installed (in most cases "/usr").

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 11:45
by Wiedmann
I want to go to the main PHP source directory and run :
Code: Select all
rm ./configure
./buildconf --force

So you don't want make a shared extension?

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 12:20
by andriy5pal
En...Yes

I want to know how recompile the PHP ... Thanks :oops:

Re: XAMPP PHP 重编译

PostPosted: 18. June 2009 12:31
by Wiedmann
I want to know how recompile the PHP ...

- you need the XAMPP devel package
- the PHP source code

The original PHP configure string from XAMPP you can find in the file "/lampp/share/lampp/configures.tar.gz". How to compile PHP you can read in the PHP manual.

Sorry, can't help more. Don't have Linux and only know how to compile a shared extension.