Cannot add zip.so in LAMPP

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

Cannot add zip.so in LAMPP

Postby fligoln » 07. September 2012 11:10

Hi,
I have a lampp installation (copied in /opt directory) and trying to setup a Moodle site. I get a message that zip is not activated so I am looking for a way to install zip support in my installation.
I tried the following:
apt-get update
apt-get install libpcre3 libpcre3-dev
apt-get install zziplib-bin
pecl install "channel://pecl.php.net/zip-1.10.2"
This worked and produced a whole pack of files including "zip.so". I copied zip.so to /opt/lampp/lib and removed the comment before the extension=zip.so in php.ini
I also tried to set extension_dir = "/opt/lampp/lib".
Every time I try to open localhost it shows a download window (and attempts to download instead of displaying the page).
Any ideas, please?

thank you,
FLM
fligoln
 
Posts: 1
Joined: 07. September 2012 11:02
Operating System: Ubuntu 10.04

Re: Cannot add zip.so in LAMPP

Postby JonB » 07. September 2012 19:16

I think the problem is zip.so - not you.

I was able to replicate the problem without doing any installing. 'zip.so' is actually included with lampp ./lib/php/extensions/no-debug-non-zts-20090626/zip.so
Enabling it by uncommenting ";extension=zip.so" in php.ini causes lampp to crash and die as you described. The problem is that the PHP handler is crashing, at that point Apache can no longer interpret a .php file, so it thinks you want to DL an unknown file type. Putting the comment back in fixes lammp. :) Since the zip.so came from two independent sources, probably a bug.

CLEAR YOUR BROWSER CACHE - it will want to reload that localhost/index.php page from cache and you will get the same result - LOL ask me how I know... :shock:

For now, try XAMPP 1.7.7 - let me know what happens.

OTAY?
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Cannot add zip.so in LAMPP

Postby greglind » 13. September 2012 18:53

I'm having [s]the same[/s] a possibly related issue with a Moodle site. Can anyone confirm that it's zip.co? Fligoin, did you get it working with 1.7.7? Hopefully resolved in the next point release.

Image
Image
A little further down I think I should see a section for zip but it's not there...
Image
And finally here's a grab of part of my php.ini file:
Image
Last edited by greglind on 13. September 2012 19:30, edited 4 times in total.
greglind
 
Posts: 6
Joined: 13. September 2012 18:50
Operating System: CentOS 5.8

Re: Cannot add zip.so in LAMPP

Postby JonB » 13. September 2012 19:01

A. - did you actually read my post?

B. There is a beta you can test now

http://www.apachefriends.org/en/index.html

or

C. you can test 1.7.7

Good Luck
8)



yif
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Cannot add zip.so in LAMPP

Postby greglind » 13. September 2012 19:27

JonB wrote:A. - did you actually read my post?

Yep. I re-read my post and see that maybe I need to start my own topic. It's not the same problem. I guessed that he started with a similar problem and then tried to download something new, which is now causing the download prompt issue. I am merely having the problem he seems to have started with.

JonB wrote:B. There is a beta you can test now

http://www.apachefriends.org/en/index.html

Great! Thank you.

JonB wrote:C. you can test 1.7.7

Yeah, unfortunately I'm trying to avoid that.

JonB wrote:Good Luck

Thanks.
greglind
 
Posts: 6
Joined: 13. September 2012 18:50
Operating System: CentOS 5.8

Re: Cannot add zip.so in LAMPP

Postby JonB » 13. September 2012 21:42

OK, just a few questions/thoughts -

A. did you enable any 'new' PHP shared objects (like zip.so) but extension=blah.so; in php.ini? Basically by uncommenting them from the php.ini supplied.

B. If you can get to the welcome page & php.ini - then it is most likely related to the location of the files and permissions/configuration.

C. What is the exact browser URL you are using that causes the crash and burn??? where are those files located on your filesystem?

D. If its a script, the script could be making 'poor PHP' decisions that were aimed at Apache 2.2 & PHP 5.3.x


:?:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Cannot add zip.so in LAMPP

Postby greglind » 14. September 2012 17:52

JonB wrote:A. did you enable any 'new' PHP shared objects (like zip.so) but extension=blah.so; in php.ini? Basically by uncommenting them from the php.ini supplied.

No. I only enabled zip.so.
JonB wrote:B. If you can get to the welcome page & php.ini - then it is most likely related to the location of the files and permissions/configuration.

I'll check again. I may not have been thorough enough.
JonB wrote:C. What is the exact browser URL you are using that causes the crash and burn??? where are those files located on your filesystem?

Yeah, this is where maybe I'm starting to hijack this thread. My site doesn't crash. I'm responding to fligoin's initial condition, where he was trying to install Moodle but couldn't because Moodle runs a system check and determines that zip.so is not enabled (see screen shot below). The way I read it, he tried to solve the primary issue by getting another version of zip.so, which led to a secondary issue. I think that your advice to him solves his secondary issue but probably doesn't address the primary issue. That's why I was wondering if it worked for him.
Image

JonB wrote:D. If its a script, the script could be making 'poor PHP' decisions that were aimed at Apache 2.2 & PHP 5.3.x

I'll check. This started to happen after I updated to Xampp 1.8.0 from 1.7.2 (I think--it was thereabouts if not exactly). My current Moodle installation (ver 2.0.1+) stopped zipping files for backup. After a bit of testing I wondered if my Moodle files/database might be corrupted so I tried to install a new Moodle instance (ver 2.3.2) and troubleshoot Moodle. But I can't install a new instance because the Moodle check fails (again, see above image).

With this bit of info I went back to my original Moodle installation and ran its check and it too indicates that zip.so isn't active. That, at least, makes sense since it's the zip stage of my backups that fail.

So I guess the question is is this a Moodle problem or is this a zip.so and/or its inclusion in 1.8.0 problem?

Lastly, this is a new full installation of 1.8.0. My databases were corrupted during the final upgrade so I uninstalled xampp, installed 1.8.0, and used phpmyadmin to import from a backup of my databases and this worked with no issues. The only thing I've changed is removing the semicolon to enable zip.so, yet in my phpinfo display I don't see any reference to zip and Moodle can't find it, either. Am I right to think that removing the semicolon would use whatever default file structure exists within xampp and that this should be the safest way to enable zip.so?

I'll keep digging but any more suggestions would be welcome. Also I'd be happy to PM you the URL if you still want it, but remember--it doesn't crash.

UPDATE: I'm feeling a little like a n00b, but it appears that zip.so is not where it is supposed to be. Either I deleted it (unlikely) or perhaps it is somehow not included in 1.8.0 (also unlikely). I feel like I'm missing something obvious but can't figure out what it is.

First I looked for zip.so in the location you mentioned:
Image
Then I searched for it from the root directory with negative results:
Image

Is this as simple as finding a compatable zip.so and dropping it in the directory? Maybe this is why fligoin got zip.so from an external source.
greglind
 
Posts: 6
Joined: 13. September 2012 18:50
Operating System: CentOS 5.8

Re: Cannot add zip.so in LAMPP

Postby JonB » 14. September 2012 20:49

OK here is your answer AFAIK -

A. I think 1.8.0 is a goner on zip.so (I tried transplanting and had a crash & burn)

B. you could try 1.8.1 beta (ahh just DL'ed - no zip.so so unless hard-linked - same issue)

or
C. You could install 1.7.7 and Moodle will just work. There's only one (non critical) php extension missing from the as-is install, xmlrpc.so (XML Remote Procedure call - AFAIK)

php_extension xmlrpc should be installed and enabled for best resultsshould be installed and enabled for best results

Code: Select all
The xmlrpc extension is needed for hub communication, and useful for web services and Moodle networking
   Check
unicode       must be installed and enabledmust be installed and enabled    OK
database    mysql    version 5.1.33 is required and you are running 5.5.16version 5.1.33 is required and you are running 5.5.16    OK
php       version 5.3.2 is required and you are running 5.3.8version 5.3.2 is required and you are running 5.3.8    OK
pcreunicode       should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    iconv    must be installed and enabledmust be installed and enabled    OK
php_extension    mbstring    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    curl    must be installed and enabledmust be installed and enabled    OK
php_extension    openssl    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    tokenizer    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    soap    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    ctype    must be installed and enabledmust be installed and enabled    OK
php_extension    zip    must be installed and enabledmust be installed and enabled    OK
php_extension    gd    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    simplexml    must be installed and enabledmust be installed and enabled    OK
php_extension    spl    must be installed and enabledmust be installed and enabled    OK
php_extension    pcre    must be installed and enabledmust be installed and enabled    OK
php_extension    dom    must be installed and enabledmust be installed and enabled    OK
php_extension    xml    must be installed and enabledmust be installed and enabled    OK
php_extension    intl    should be installed and enabled for best resultsshould be installed and enabled for best results    OK
php_extension    json    must be installed and enabledmust be installed and enabled    OK
php_extension    hash    must be installed and enabledmust be installed and enabled    OK
php_setting    memory_limit    recommended setting detectedrecommended setting detected    OK
php_setting    safe_mode    recommended setting detectedrecommended setting detected    OK
php_setting    file_uploads    recommended setting detectedrecommended setting detected    OK
Your server environment meets all minimum requirements.


============================== works ============================= no mas ==========
Installation
You are logged in as Admin User (Logout)
On this page you should configure your main administrator account which will have complete control over the site. Make sure you give it a secure username and password as well as a valid email address. You can create more admin accounts later on.

General
UsernameRequired field
Choose an authentication method Help with Choose an authentication method
Manual accounts
The password must have at least 8 characters, at least 1 digit(s), at least 1 lower case letter(s), at least 1 upper case letter(s), at least 1 non-alphanumeric character(s)
New passwordRequired field Help with New password
Unmask
Force password change Help with Force password change
================================== OTAY? :shock: ====================

I now know too much about Moodle :D And I have to get back to my own Open Source Project whihc is birthing a new version.

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Cannot add zip.so in LAMPP

Postby greglind » 14. September 2012 22:48

I appreciate your help. Thanks!
greglind
 
Posts: 6
Joined: 13. September 2012 18:50
Operating System: CentOS 5.8

Re: Cannot add zip.so in LAMPP

Postby fman » 23. December 2012 18:31

faced same issue when trying to use with TestLink (www.teamst.org), PHPExcel.
I was able to solve it in this way:
I'm using fedora 14 32bits, then I've searched for php-common rpm (contains php-zip => zip.so) with PHP version provided with LAMPP 1.8.1 =>5.4.7,
I've found php-common-5.4.9-1.fc14.remi.i686.rpm (5.4.9 > 5.4.7 then I've choosen to give a try)
Got the rpm and install it, then went to /usr/lib/php/modules/ and there was zip.so.
I've copied it into /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525.
enabled zip.so in php.ini
stop/start lampp
Things seems to be working.
fman
 
Posts: 1
Joined: 23. December 2012 18:20
Operating System: Fedora 14

Re: Cannot add zip.so in LAMPP

Postby JonB » 26. December 2012 14:51

Fman - Thanks for posting your workaround.

Happy Holidays!
:D
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Cannot add zip.so in LAMPP

Postby Tomica » 11. January 2013 17:07

fman your work around helped me too. I have XAMPP 1.8.1 for Linux on 64 bit Ubuntu 12.04. Here's the zip.so file that I've used:

https://files.myopera.com/tomica/files/zip.so

I've made it working using your method. Great stuff, thanks!

I actually started a separate topic asking someone to help me with this, and will post my complete solution there in a second:

http://community.apachefriends.org/f/viewtopic.php?f=17&t=52369
Tomica
 
Posts: 8
Joined: 18. September 2011 16:01

Re: Cannot add zip.so in LAMPP

Postby itoffshore » 17. February 2013 07:47

I followed this guide to build zip.so on 32 bit Debian Wheezy for XAMPP 1.8.1:

http://mattiasgeniar.be/2008/09/14/how-to-compile-and-install-php-extensions-from-source/

Change the configure command in the guide to:
Code: Select all
sudo mkdir /opt/lampp/include
sudo ln -s /usr/include/php5 /opt/lampp/include/php
./configure --with-php-config=/opt/lampp/bin/php-config --enable-zip

A 32 bit zip.so can be found at:

http://www.mediafire.com/file/26yp1fuamvg6und/zip.so

Copy zip.so into /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525

In /opt/lampp/etc/php.ini around line 814 set:
Code: Select all
extension_dir = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525"

& uncomment on line 993:
Code: Select all
extension="zip.so"

A brand new install of Joomla shows Native Zip Support as On

These instructions will also work for building http://eaccelerator.net/ with:
Code: Select all
./configure --enable-shared --with-php-config=/opt/lampp/bin/php-config

& uncomment lines 1013 - 1026 of /opt/lampp/etc/php.ini
itoffshore
 
Posts: 1
Joined: 17. February 2013 07:11
Operating System: Debian Testing


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 41 guests