php extensions linux

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

php extensions linux

Post by mad_phpq »

Hi,

Can some tell me how i can add php5 extenstions in linux. I'm trying to get zip_open to work.

I'm using debian 4.0. I'm a linux newbie by the way.

Thanks

--Mark
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The manual page states the installation instructions. Are you confused by them?
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Post by mad_phpq »

yes.
Linux systems

In order to use these functions you must compile PHP with zip support by using the --enable-zip configure option.
where do i enable this option at?
mad_phpq
Forum Commoner
Posts: 85
Joined: Fri Apr 27, 2007 5:53 am

Post by mad_phpq »

do i have to recompile php? How do i do this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

While running the "configure" script you would give that as an option. Yes, it does require recompiling.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Best advice I can give you is to run phpinfo in a browser to view what the current configuration options are. Download a copy of the PHP source code and extract it. In a terminal you'll want to navigate to the directory containing the code and run the following:

./configure --with-all-your-options-typed-here
./make
su
<root password>
./make install

Be sure to backup your current php.ini file as it may be replaced. You'll probably run into some issues of some sort and you may have to reconfigure your httpd.conf file depending on what version of PHP you install.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

According to
http://security.debian.org/debian-security/pool/updates/main/p/php5/php5_5.2.0-8+etch7.diff.gz wrote:+COMMON_CONFIG=--build=$(PHP5_BUILD_GNU_TYPE)-gnu \
[...]
+ --enable-zip \
the php_zip module should be built-in.
Post Reply