Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default recompiling php with --enable-zip parameter

    Today I tried to install the eFront LMS. The install failed because the zip facility was missing. On investingating this matter I discover that we can add zip to php by recompiling with the enable-zip parameter.

    If I understand things properly it is not a big deal to add a parameter to php. The php.net instructions suggest that only steps 10, 11, 12 need to be followed, and that only a restart of php is needed rather than a recompile.

    That sounds good! Trouble is that the files on the vps seem to be located differently to the guidelines from php.net. I can't even find the right place to run the ./configure --help command.

    I am sure this is quite an easy matter to sort out, but I am terribly cautious about changing files above root and would appreciate it if someone could give me some advice.

    Actually, I have missed the zip facility on the westhost vps after using both tar and zip on our cpanel setup, so I think this is a good opportunity to find out how to add it - and other parameters.

    Simon

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    We are not able to access ./configure for PHP. This is something controlled by WestHost. It looks like eFront is for windows based systems so it may be you'll run into other problems.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3

    Default

    Thank you once again Wildjoker. eFront comes with both installations for Windows and Linux, so that is not a problem.

    I was certainly not happy about fiddling with php so am not at all surprised that westhost has denied us this opportunity - even on our own vps. On the other hand, this then means that we are unable to add ANY php parameter not included in the initial setup.

    I will put in a ticket to support to see if they can help. I will also inform efrontlearning of this difficulty. It should be something they can sort out themselves. Other LMSs such as Moodle also use zip files. Moodle have obviously managed to include this in their own coding.

    Thanks again.

    Simon

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Simon,

    It would be great if there was some way we could have access to ./configure for PHP so we could change what is enabled by default. If you find a work around I would love to know about it.

    Shawn
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Moderator mamos's Avatar
    Join Date
    Oct 2008
    Location
    Logan, Utah
    Posts
    5

    Default

    Dear Simon,

    You can install this via the pecl command in php. Open up a shell and run this command:

    pecl install zip
    Once you have run that, edit the file located at /etc/php.ini and where you see the other extension=mod.so lines and add this line:

    extension=zip.so
    Save the file then simply restart your account using the "Restart Account" Link within Site Manager.
    Sincerely,

    Mark Amos
    Technical Support
    WestHost Inc.

    When you expect more from your Web host
    http://www.westhost.com/

  6. #6

    Default

    Thank you support, that worked fine.

    I then wondered about this pecl command. Is it for installing php extensions?
    I have previously had problems loading the ming extension (that Shawn solved), so I tried pecl install ming - but that didn't work.

    I looked on php.net for information about pecl but got no hits. I presume that pecl is an in house command. Does it do anything else that might be useful for us to know about?

    Simon

  7. #7
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Here is a link to the PECL site: http://pecl.php.net/ No it is not an in house command. This link may also be useful to you: http://us3.php.net/manual/en/install.pecl.php

    If you are in an SSH session you can type the following command for brief help on usage:
    Code:
    pecl help
    ming is not available via pecl that I can tell although it is listed as a module. I think perhaps it is still under development.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  8. #8

    Default

    Thank you Shawn, the links were interesting and useful.

    Although my problems are now solved - I have installed both the zip and ming extensions - I will continue with this for a bit since others may be interested in adding php extensions via pecl.

    I looked at
    pecl help
    and then
    pecl list-all
    This gives a list of 15 packages that I presumed would be installable. One of the packages is zip. Ming is not included.

    Just to test things out I decided the oggvorbis extension might be useful to have, so I tried
    pecl install oggvorbis
    This is what I got back
    /$ pecl install oggvorbis
    Package "oggvorbis" Version "0.2" does not have REST xml available
    Cannot initialize 'channel://pecl.php.net/oggvorbis', invalid or missing package file
    Package "channel://pecl.php.net/oggvorbis" is not valid
    install failed
    I think I will bother support again to find out which extensions we can install via pecl.

    The main reason for my continuing with this is the amount of time the pecl install saved us. Compare the couple of minutes installing the zip extension via pecl with the hours of fiddling about trying to install the ming extension and it becomes very clear that the more php extensions we can add via pecl the better!

    Simon

  9. #9
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Something else we have available to us is PEAR: http://pear.php.net/ Actually PECL and PEAR are very similar and are kind of tied together.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  10. #10

    Default

    I have now been in contact with support and asked if they can give us some clearer guidelines on using pecl for php extensions. pecl is clearly very useful and saves a lot of time, so will probably be of interest for others.

    As a footnote to this post about zips, I then thought it would be useful to be able to create zips directly on our vps. Here follows a couple of useful links:

    The first link talks a bit about pecl and the zip extension and gives some examples:
    devzone.zend.com

    I downloaded and tested PclZip from here:
    PhpConcept

    After downloading the file I made a php to create a zip using the following code (with a couple of changes) from the user manual.

    Code:
     <?php
      include_once('pclzip.lib.php');
      $archive = new PclZip('archive.zip');
      $v_list = $archive->create('file.txt,data/text.txt,folder');
      if ($v_list == 0) {
        die("Error : ".$archive->errorInfo(true));
      }
    ?>
    It worked just fine!

    Simon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •