Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-28412

Detect broken iconv before install/upgrade (previously Can't install Moodle 2.2 on MAMP)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: Installation
    • Labels:
    • Environment:
      MAMP 2.0.1
      MAMP 1.9.5
      Moodle4Mac

      Description

      I'm testing the new MAMP 2.0.1 which is needed to use Moodle4Mac with OS X Lion 10.7.

      While updating Moodle 2.2dev (20110713) to Moodle 2.2dev (20110719) the upgrade stopped on http://localhost:8888/moodle22/admin/upgradesettings.php

      I tried a fresh installation of Moodle 2.2dev (20110713) and the update to Moodle 2.2dev (20110719) .. the same problem.

      Also a fresh installation with Moodle 2.2dev (20110719) does not work. It stopped while saving the admin profile. "Incorrect sesskey submitted, form not accepted!"

      I also use installaions with XAMPP and do not have problems ... but XAMPP is really old. I don't know if it will work with OS X Lion. Therefore I am testing the new MAMP

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              Works fine on Lion for me (using default apache + php and binary install from postgresql.org).

              Show
              skodak Petr Skoda added a comment - Works fine on Lion for me (using default apache + php and binary install from postgresql.org).
              Hide
              skodak Petr Skoda added a comment -

              I do not think it is Moodle's fault.

              Show
              skodak Petr Skoda added a comment - I do not think it is Moodle's fault.
              Hide
              krause Ralf Krause added a comment -

              Hi Petr,
              the installation of the weekly snapshot (20110713) from last week worked fine ... the installation of the package from the current week (20110719) failed.
              Ralf

              Show
              krause Ralf Krause added a comment - Hi Petr, the installation of the weekly snapshot (20110713) from last week worked fine ... the installation of the package from the current week (20110719) failed. Ralf
              Hide
              skodak Petr Skoda added a comment -

              It works for me, I tried it yesterday after I installed Lion.

              Show
              skodak Petr Skoda added a comment - It works for me, I tried it yesterday after I installed Lion.
              Hide
              krause Ralf Krause added a comment -

              Sorry, I want to build the Moodle4Mac package so I need to use MAMP or XAMPP. XAMPP is rather old and I do not know if it would work with Lion. So I want to use the new MAMP 2.0.1 for Moodle4Mac.

              What could be the reason for the fact that Moodle 2.2dev (20110713) works fine but not Moodle 2.2dev (20110719)?

              Show
              krause Ralf Krause added a comment - Sorry, I want to build the Moodle4Mac package so I need to use MAMP or XAMPP. XAMPP is rather old and I do not know if it would work with Lion. So I want to use the new MAMP 2.0.1 for Moodle4Mac. What could be the reason for the fact that Moodle 2.2dev (20110713) works fine but not Moodle 2.2dev (20110719)?
              Hide
              skodak Petr Skoda added a comment -

              Should be something else then Moodle because it works for me in Lion and Snow Leopard.

              Show
              skodak Petr Skoda added a comment - Should be something else then Moodle because it works for me in Lion and Snow Leopard.
              Hide
              salvetore Michael de Raadt added a comment -

              I'm no expert on MAMP. Have you tried to replicate this on another machine?

              Show
              salvetore Michael de Raadt added a comment - I'm no expert on MAMP. Have you tried to replicate this on another machine?
              Hide
              krause Ralf Krause added a comment -

              Hi,

              I installed MAMP 2.0.1 on another machine. MAMP works fine and I installed Moodle 2.2 (20110713) ... yes, this version (20110713) works for me. I updated up to Moodle 2.2 (20110726). The update started and stopped on page http://localhost:8888/moodle22/admin/upgradesettings.php ... clicking on the save button did not work.

              I went back to http://localhost:8888/moodle22/ and tried some settings but nothing works ... no switching of the language, no changing mail address in my personal profile. I tried to see the page http://localhost:8888/moodle22/admin/index.php but Moodle switched back to http://localhost:8888/moodle22/admin/upgradesettings.php

              I turned on the debugging directly in the database mdl_config (debug=6143 and debugdisplay=1). No debug errors were shown.

              Where is the problem with Moodle 2.2 and MAMP 2.0.1 ... Moodle 2.1 works without a problem.

              Ralf

              Show
              krause Ralf Krause added a comment - Hi, I installed MAMP 2.0.1 on another machine. MAMP works fine and I installed Moodle 2.2 (20110713) ... yes, this version (20110713) works for me. I updated up to Moodle 2.2 (20110726). The update started and stopped on page http://localhost:8888/moodle22/admin/upgradesettings.php ... clicking on the save button did not work. I went back to http://localhost:8888/moodle22/ and tried some settings but nothing works ... no switching of the language, no changing mail address in my personal profile. I tried to see the page http://localhost:8888/moodle22/admin/index.php but Moodle switched back to http://localhost:8888/moodle22/admin/upgradesettings.php I turned on the debugging directly in the database mdl_config (debug=6143 and debugdisplay=1). No debug errors were shown. Where is the problem with Moodle 2.2 and MAMP 2.0.1 ... Moodle 2.1 works without a problem. Ralf
              Hide
              skodak Petr Skoda added a comment -

              please try to add debug enabling to your config.php:

              @error_reporting(1023);
              @ini_set('display_errors', '1');
              $CFG->debug = 38911;
              $CFG->debugdisplay = true;

              Show
              skodak Petr Skoda added a comment - please try to add debug enabling to your config.php: @error_reporting(1023); @ini_set('display_errors', '1'); $CFG->debug = 38911; $CFG->debugdisplay = true;
              Hide
              krause Ralf Krause added a comment -

              I can't login anymore ... I will try the update again tomorrow and I will set your additions to the config.php.

              Show
              krause Ralf Krause added a comment - I can't login anymore ... I will try the update again tomorrow and I will set your additions to the config.php.
              Hide
              krause Ralf Krause added a comment -

              Hi Petr,

              I found the same problem with MAMP 1.9.5. Moodle4Mac based on MAMP 1.9.5 seems to work fine with Moodle 2.2dev (20110713). I patched the config.php as you show in your tracker message on 27/Jul/11 12:32 AM.

              Now I try to update Moodle 2.2.dev from 20110713 to 20110803 via CVS.
              The Update script works fine and loads all the new files into htdocs/moodle22

              I login as the admin user of Moodle4Mac (admin/12345).

              Moodle starts the update process.
              The server checks do not show any problem.

              4 updates for plugins should be done ... choice, scorm, external database, basic report and everything runs successfully. I should set some upgrade settings ... yes, I save the defaults.

              I do not get any problem or error message but I can't logout anymore.
              I try to update the admnin account data and get an error: Incorrect sesskey submitted, form not accepted!

              I can't get any answer for my problem. The MAMP logs do not show any problem and MAMP 1.9.5 runs fine with Moodle 1.9.13+, 2.0.4+, 2.1.1+, and 2.2dev (20110713)

              I found the problem with Moodle 2.2dev (20110719) and all following versions.

              Please tell what I should test now.

              Ralf

              Show
              krause Ralf Krause added a comment - Hi Petr, I found the same problem with MAMP 1.9.5. Moodle4Mac based on MAMP 1.9.5 seems to work fine with Moodle 2.2dev (20110713). I patched the config.php as you show in your tracker message on 27/Jul/11 12:32 AM. Now I try to update Moodle 2.2.dev from 20110713 to 20110803 via CVS. The Update script works fine and loads all the new files into htdocs/moodle22 I login as the admin user of Moodle4Mac (admin/12345). Moodle starts the update process. The server checks do not show any problem. 4 updates for plugins should be done ... choice, scorm, external database, basic report and everything runs successfully. I should set some upgrade settings ... yes, I save the defaults. I do not get any problem or error message but I can't logout anymore. I try to update the admnin account data and get an error: Incorrect sesskey submitted, form not accepted! I can't get any answer for my problem. The MAMP logs do not show any problem and MAMP 1.9.5 runs fine with Moodle 1.9.13+, 2.0.4+, 2.1.1+, and 2.2dev (20110713) I found the problem with Moodle 2.2dev (20110719) and all following versions. Please tell what I should test now. Ralf
              Hide
              krause Ralf Krause added a comment -

              I will do another test.

              I take a working Moodle4Mac 2.1.1+ (20110806) and try to update to 2.2dev (20110806).

              To see the debugging messages I add the settings to the config.php
              @error_reporting(1023);
              @ini_set('display_errors', '1');
              $CFG->debug = 38911;
              $CFG->debugdisplay = true;

              Then I upgrade the moodle files from 2.1.1 to 2.2dev via cvs
              cvs -q update -dP -r HEAD

              Moodle shows that it is upgrading Moodle database from version 2.1.1+ (Build: 20110803) (2011070101.01) to 2.2dev (Build: 20110803) (2011080300)

              I runs all scripts without any debug message but it stops when saving the default upgradesettings.
              http://localhost:8888/moodle21/admin/upgradesettings.php

              Yes, the folder moodle21 is correct because we are upgrading a working Moodle 2.1.1

              Sorry ... the upgrade to Moodle 2.2 does not work with MAMP 1.9.5

              Show
              krause Ralf Krause added a comment - I will do another test. I take a working Moodle4Mac 2.1.1+ (20110806) and try to update to 2.2dev (20110806). To see the debugging messages I add the settings to the config.php @error_reporting(1023); @ini_set('display_errors', '1'); $CFG->debug = 38911; $CFG->debugdisplay = true; Then I upgrade the moodle files from 2.1.1 to 2.2dev via cvs cvs -q update -dP -r HEAD Moodle shows that it is upgrading Moodle database from version 2.1.1+ (Build: 20110803) (2011070101.01) to 2.2dev (Build: 20110803) (2011080300) I runs all scripts without any debug message but it stops when saving the default upgradesettings. http://localhost:8888/moodle21/admin/upgradesettings.php Yes, the folder moodle21 is correct because we are upgrading a working Moodle 2.1.1 Sorry ... the upgrade to Moodle 2.2 does not work with MAMP 1.9.5
              Hide
              krause Ralf Krause added a comment - - edited

              I decided to do another test with a fresh installation of Moodle 2.2dev and MAMP 1.9.5.

              I created a mysql database "moodle22", a folder "Applications/MAMP/data/moodle22", and got a fresh copy of Moodle 2.2 from download.moodle.org ... I get the same result as in the start message of MDL-28412 ... I can't save the admin user account. When I copy the debug settings into the config.php I see the following stack trace message.


              Incorrect sesskey submitted, form not accepted!
              More information about this error

              Stack trace:
              line 429 of /lib/setuplib.php: moodle_exception thrown
              line 238 of /lib/formslib.php: call to print_error()
              line 165 of /lib/formslib.php: call to moodleform->_process_submission()
              line 125 of /user/editadvanced.php: call to moodleform->moodleform()


              Show
              krause Ralf Krause added a comment - - edited I decided to do another test with a fresh installation of Moodle 2.2dev and MAMP 1.9.5. I created a mysql database "moodle22", a folder "Applications/MAMP/data/moodle22", and got a fresh copy of Moodle 2.2 from download.moodle.org ... I get the same result as in the start message of MDL-28412 ... I can't save the admin user account. When I copy the debug settings into the config.php I see the following stack trace message. Incorrect sesskey submitted, form not accepted! More information about this error Stack trace: line 429 of /lib/setuplib.php: moodle_exception thrown line 238 of /lib/formslib.php: call to print_error() line 165 of /lib/formslib.php: call to moodleform->_process_submission() line 125 of /user/editadvanced.php: call to moodleform->moodleform()
              Hide
              skodak Petr Skoda added a comment -

              I am sorry I can not help you, I do not know anything about MAMP or Moodle4Mac. I am 100% sure Moodle works on OS X Lion and Snow Leopard when using ports for everything, binary mysql/postgresql work fine too, in Lion it works also when using built in apache and PHP.

              If I find some time I will install a fresh new Lion instance in VM and try the MAMP for the first time...

              Show
              skodak Petr Skoda added a comment - I am sorry I can not help you, I do not know anything about MAMP or Moodle4Mac. I am 100% sure Moodle works on OS X Lion and Snow Leopard when using ports for everything, binary mysql/postgresql work fine too, in Lion it works also when using built in apache and PHP. If I find some time I will install a fresh new Lion instance in VM and try the MAMP for the first time...
              Hide
              krause Ralf Krause added a comment -

              It's not a problem of Mac OS X Lion.

              I'm still using Mac OS X 10.6.8 Snow Leopard on my iMac. I thought about changing from MAMP 1.9.5 to MAMP 2.0.1 because they write on their web site that MAMP 2.0.1 works with OS X Lion ... can't say if MAMP 1.9.5 will work.

              A few days ago I found the same installation problem with MAMP 1.9.5 ... I can't install or update Moodle 2.2dev (20110803) with MAMP.

              Show
              krause Ralf Krause added a comment - It's not a problem of Mac OS X Lion. I'm still using Mac OS X 10.6.8 Snow Leopard on my iMac. I thought about changing from MAMP 1.9.5 to MAMP 2.0.1 because they write on their web site that MAMP 2.0.1 works with OS X Lion ... can't say if MAMP 1.9.5 will work. A few days ago I found the same installation problem with MAMP 1.9.5 ... I can't install or update Moodle 2.2dev (20110803) with MAMP.
              Hide
              skodak Petr Skoda added a comment -

              Did you try it on any other computer?

              I am going to use only Lion because it finally legally allows me to run virtualised copies.

              Show
              skodak Petr Skoda added a comment - Did you try it on any other computer? I am going to use only Lion because it finally legally allows me to run virtualised copies.
              Hide
              skodak Petr Skoda added a comment -

              wow! I think I found it, the iconv seems to be completely borked in MAMP, there is no way Moodle could work on that.

              I am going to add a sanity check to the admin/index.php to detect this and prevent installation and upgrades.

              Show
              skodak Petr Skoda added a comment - wow! I think I found it, the iconv seems to be completely borked in MAMP, there is no way Moodle could work on that. I am going to add a sanity check to the admin/index.php to detect this and prevent installation and upgrades.
              Hide
              skodak Petr Skoda added a comment -

              try to google for: mamp iconv problem
              it looks like it is mamp's fault

              Show
              skodak Petr Skoda added a comment - try to google for: mamp iconv problem it looks like it is mamp's fault
              Show
              skodak Petr Skoda added a comment - http://forum.mamp.info/search.php?keywords=iconv
              Hide
              krause Ralf Krause added a comment -

              I installed Moodle4Mac 2.2 (20110806) back to MAMP 1.9.4 ... this version should work.

              Show
              krause Ralf Krause added a comment - I installed Moodle4Mac 2.2 (20110806) back to MAMP 1.9.4 ... this version should work.
              Hide
              skodak Petr Skoda added a comment -

              This is a tricky issue, pretty much all PHP software is affected by this very nasty MAMP bug. Next week we should probably back port this to stable branches.

              I am going to create a separate issue for this.

              Thanks for the report.

              Show
              skodak Petr Skoda added a comment - This is a tricky issue, pretty much all PHP software is affected by this very nasty MAMP bug. Next week we should probably back port this to stable branches. I am going to create a separate issue for this. Thanks for the report.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Great detective work! this has been integrated now.

              Show
              samhemelryk Sam Hemelryk added a comment - Great detective work! this has been integrated now.
              Hide
              krause Ralf Krause added a comment -

              Hi Petr,

              I switched back Moodle4Mac to MAMP 1.9.4 with PHP 5.3.2 and a working iconv. I noticed the problem three weeks ago when I tried to get Moodle4Mac up to the new MAMP 2.0.1. Yes, it should be a blocker for MAMP 2.0.1 and for their commertial MAMP Pro 2.0.1.

              Thank you very much for your detective work and your patience!

              Best regards,
              Ralf

              Show
              krause Ralf Krause added a comment - Hi Petr, I switched back Moodle4Mac to MAMP 1.9.4 with PHP 5.3.2 and a working iconv. I noticed the problem three weeks ago when I tried to get Moodle4Mac up to the new MAMP 2.0.1. Yes, it should be a blocker for MAMP 2.0.1 and for their commertial MAMP Pro 2.0.1. Thank you very much for your detective work and your patience! Best regards, Ralf
              Hide
              krause Ralf Krause added a comment -

              I wrote an error message for MAMP
              http://forum.mamp.info/viewtopic.php?f=5&t=14282

              Show
              krause Ralf Krause added a comment - I wrote an error message for MAMP http://forum.mamp.info/viewtopic.php?f=5&t=14282
              Hide
              jerome Jérôme Mouneyrac added a comment -

              Hi Ralf, I don't know if you remember, but we had another issue related to iconv a year ago and Julian suggested a way to fix it: https://tracker.moodle.org/browse/MDL-21501?focusedCommentId=81381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-81381

              Maybe it's not related to this issue but I just post comment if ever it is

              Show
              jerome Jérôme Mouneyrac added a comment - Hi Ralf, I don't know if you remember, but we had another issue related to iconv a year ago and Julian suggested a way to fix it: https://tracker.moodle.org/browse/MDL-21501?focusedCommentId=81381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-81381 Maybe it's not related to this issue but I just post comment if ever it is
              Hide
              dongsheng Dongsheng Cai added a comment -

              Thanks

              Show
              dongsheng Dongsheng Cai added a comment - Thanks
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Sent upstream and closing, many thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Sent upstream and closing, many thanks!

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/Dec/11