XAMPP PHP 重编译

Problems with the Linux version of XAMPP, questions, comments, and anything related.

XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 07:59

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

Re: XAMPP PHP 重编译

Postby Wiedmann » 18. June 2009 08:09

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?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 08:50

Yes, i want to add a php extension. ImageMagick
andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 08:52

andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 08:52

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").
andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby Wiedmann » 18. June 2009 09:04

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.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 11:15

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").

"
andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby Wiedmann » 18. June 2009 11:23

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?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 11:31

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").
andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby Wiedmann » 18. June 2009 11:45

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?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: XAMPP PHP 重编译

Postby andriy5pal » 18. June 2009 12:20

En...Yes

I want to know how recompile the PHP ... Thanks :oops:
Last edited by andriy5pal on 18. June 2009 12:24, edited 1 time in total.
andriy5pal
 
Posts: 7
Joined: 18. June 2009 07:55

Re: XAMPP PHP 重编译

Postby Wiedmann » 18. June 2009 12:31

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.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 7 guests