Moodle
  1. Moodle
  2. MDL-28412

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker 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
    • Rank:
      18065

      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

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

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

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

          I do not think it is Moodle's fault.

          Show
          Petr Škoda added a comment - I do not think it is Moodle's fault.
          Hide
          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
          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
          Petr Škoda added a comment -

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

          Show
          Petr Škoda added a comment - It works for me, I tried it yesterday after I installed Lion.
          Hide
          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
          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
          Petr Škoda added a comment -

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

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

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

          Show
          Michael de Raadt added a comment - I'm no expert on MAMP. Have you tried to replicate this on another machine?
          Hide
          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
          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
          Petr Škoda 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
          Petr Škoda 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
          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
          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
          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
          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
          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
          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
          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
          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
          Petr Škoda 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
          Petr Škoda 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
          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
          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
          Petr Škoda 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
          Petr Škoda 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
          Petr Škoda 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
          Petr Škoda 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
          Petr Škoda added a comment -

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

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

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

          Show
          Ralf Krause added a comment - I installed Moodle4Mac 2.2 (20110806) back to MAMP 1.9.4 ... this version should work.
          Hide
          Petr Škoda 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
          Petr Škoda 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
          Sam Hemelryk added a comment -

          Great detective work! this has been integrated now.

          Show
          Sam Hemelryk added a comment - Great detective work! this has been integrated now.
          Hide
          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
          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
          Ralf Krause added a comment -

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

          Show
          Ralf Krause added a comment - I wrote an error message for MAMP http://forum.mamp.info/viewtopic.php?f=5&t=14282
          Hide
          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
          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 Cai added a comment -

          Thanks

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

          Sent upstream and closing, many thanks!

          Show
          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: