Moodle 2.0 requires Zip PHP extension


#1

The new release of Moodle 2.0 requires Zip PHP extension
I changed the lines in my php.ini
extension = php_mbstring.dll ( and others lines) deleting the comment.

But nothing has changed in the Moodle Server Checks Messages.
Should I restart the Web Server? :-)))

The Server Checks:
php_extension (zip) must be installed and enabledmust be installed and enabled
php_extension (xmlrpc) should be installed and enabled for best resultsshould be installed and enabled
php_extension (soap) should be installed and enabled for best resultsshould be installed and enabled


#2

You cannot enable zip extensions for PHP via the php.ini file. In order to use these functions you must compile PHP with zip support by using the --with-zip[=DIR] configure option, where [DIR] is the prefix of the » ZZIPlib library install. Full instructions are found at http://www.php.net/manual/en/book.zip.php


#3

Thnks rlparker
I did not understand HOW to compile PHP with zip support.

But I want to make a Modest Proposal.
Since DH users who use Moodle are many, and ALL soon will have the same problem with the new version of 2.0,
Why DH does not provide PHP with zip support functions?
It seems very reasonable and would save time to users and to you.
Thanks.


#4

It might seem that way, but the issue is not really that simple. Moodle Users may prefer this functionality, while users of other packages might desire pre-configured SOAP functionality, and yet other users might want even other extensions. Each extension installed increases the memory footprint of PHP, and the larger, and more bloated, PHP becomes, the less RAM is available for processing. There have to be limits and compromises made.

Our philosophy is that we should provide a solid, functional, yet lean, installation of PHP that meets the needs of the largest possible cross-section of users and uses the least possible resources in doing this. Every suggestion to add a module/extension is evaluated with regard to how well adding that module/extension meets this criteria.

All that said, you can certainly post this as a suggestion in the panel, and it will be added to the suggestions already there where users can vote for/against it, and be considered by our developers/admins.

This is how many features get implemented, and if you feel strongly about this I recommend you make that suggestion in this way. Not every suggestion can be implemented, for a variety of reasons, but the suggestion system in the panel gives it is best chance of being seriously considered and possibly implemented.


#5

Hi

Moodle 2.0 is out, and many of us need to implement it for the new year.
I tried to upgrade a one-click install and as expected the upgrade script stalls on checking the server environment and requires some PHP extensions not available: zip, xmlrpc, soap and intl.

I’ve scanned through the wiki page http://wiki.dreamhost.com/Installing_PHP5#Compiling_a_Customized_PHP_5 for building a custom php5 environment trying to intimidated by the three warnings clearly comunicating that if one goes this route everything might break and you’ll be on your own. Great.

Has anyone succesfully upgraded php to cope with Moodle 2.0, which script is the best to use, how to modify them to have all the right extensions?

How long should the process take?

Is there a way to revert?

Any advice or pointers would be much appreciated


#6

Just a heads up, perhaps this method will work: http://discussion.dreamhost.com/thread-127909.html , please as andrew said, these features are still in beta, in time they may change.

I for one still have those extensions, after i’m done with setting up my sites anything that isn’t needed will have to go to free up memory.


#7

I believe the beta version of PHP 5.3 includes all the extensions that Moodle wants.


#8

In order to install Moodle 2.0 you must vote in Suggestions on Panel.

2010-11-25 Goodies - One-Click Installs Moodle 2.0 3 credits #

suggested This suggestion will be available for voting once it has been screened by other users.


#9

Will Dreamhost be supporting Moodle 2.0 or not?

If so, when?


#10

It already supports it, just use PHP 5.3 as the domain PHP and install Moodle manually. Probably in the future once PHP 5.3 is out of the DH beta stage it will be available as a one click install.


#11

Ah, not available on my VPS. Will have to contact someone at DH. Cool.


#12

I succeeded in upgrading a Moodle instance to 2.0 after setting the domain to run on PHP5.3 FastCGI, the basic functionality works 'though I do encounter serious problems trying to use web services.

In Moodle’s built-in webservices test client it reports:
“exception ‘Zend_Soap_Client_Exception’ with message ‘SOAP extension is not loaded.’ in …”

Looking at Moodle’s check of the server environment it complains about missing extensions; XMLRPC, SOAP and INTL

So, my plan of action is to set up a separate domain, with a shell user, running php5.3 beta, do a one-click install of moodle (for the sake of dreamhost friendly config) Then attempt the custom PHP install on that domain before upgrading Moodle to 2.0 and seeing if that works. The ‘documentation’ on the custom scripts seem a bit, uhm, fuzzy :slight_smile:

I hope the one 'PHP 5.3 + Xdebug + APC install script ’ will give us the right stuff, though I don’t see something enabling SOAP. Hope its just a matter of adding eg. --enable-soap \ in PHP features.


#13

All the extensions Moodle’s looking for are compiled and available in /usr/local/php53/lib/php/extensions — they just aren’t loaded by default. If you need them, you can load them for all domains under a user (at the expense of slightly higher memory usage!) by creating a directory at /home//.php/5.3/ and putting the following lines in a file named “phprc”:

extension = intl.so
extension = soap.so
extension = xmlrpc.so

The same approach will work for loading custom modules (including loaders like Zend Optimizer and Ioncube), but you will need to specify the full path to the module in that case.


#14

Thanks!, will do that


#15

Sorry, I’m a newb at this, I’ve created the directory, but what should the lines of code be in, does it have to be a specific file/name?
(assuming with doing this the custom install script isn’t necessary)


#16

Sorry, I misspoke slightly. Edited my previous post to clarify.


#17

That works, thanks (note for others, I had to recreate the tokens in Moodle before the webservices completely worked)


#18

I had my VPS upgraded on Monday but have had no luck installing a new instance of Moodle on it. First is was bad-http-conf now, just doesn’t run anything.

Added the extensions as outlined in this thread, for 2.0 but can’t even get a 1.9 one-click loaded.

Wanted to try a one-click of 1.9 and then manually upgrade. Installation fails completely. Re-try, fails the same way (redirects to missing index.php page, never completes installation).

Support is dragging on this.


#19

I gave up on using the one-click and just loaded a fresh copy of Moodle 2.0 on a different sub-domain. I believe my install needs and DH’s one-click panel UI upgrades were not playing nicely yesterday…

Happy to report that by following andrewf’s instructions in this thread, Moodle has every extension it could possibly desire…


#20

so far so good :slight_smile:

I hope someone can help me with getting the cron job running though, at the moment I’m trying to set it through the panel with '/usr/local/php53/bin/php /home/regenonline2/[domain]/online/admin/cron.php’
and have tried a few variations with no luck

(though with the above the cron sends this error email:

[quote]PHP Warning: Module ‘soap’ already loaded in Unknown on line 0 PHP Warning: Module ‘xmlrpc’ already loaded in Unknown on line 0

Warning: require(…/config.php): failed to open stream: No such file or directory in /home/regenonline2/[domain]/online/admin/cron.php on line 45

Fatal error: require(): Failed opening required ‘…/config.php’ (include_path=’.:/usr/local/lib/php:/usr/local/php5/lib/pear’) in /home/regenonline2/[domain]/online/admin/cron.php on line 45[/quote]
)

Moodle also says ‘Enabling the PHP setting display_errors is not recommended on production sites because some error messages may reveal sensitive information about your server.’ can one disable display_errors?

Thanks