OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Tina Marles -
Number of replies: 15

Sorry if this has already been discussed but I could not find anything about this problem. Fresh install of 2.8.1 (no prior versions of Moodle ever) onto my MacBook Pro running Yosemite. MAMP servers do not start and I cannot select the Apache Server (only the SQL Server).

Could it be that 2.8.1 is not compatible with OS X 10.10.1 as the system requirements only list up to OS X 9.

Thanks heaps for any advice !!!


Average of ratings: -
In reply to Tina Marles

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers
Tina,

Yes unfortunately the Yosemite is the issue behind this, but don't you worry, you aren't the only one having this issue.

what you have do do is, first change the default ports of Apache and MySQL in MAMP, from ports 8888 for Apache to 80 and for MySQL, port 3306 instead of port 8889. (If you want, you can skip that step as well of changing default ports) but then you have to access localhost by this command. localhost:8888 (as browser tends to find web servers on default ports 80)

Next, go to Applications/MAMP/Library/bin (or use finder) and find the file envvars, and rename it to _envvars

VERY IMPORTANT: make sure your MAMP server is completely stopped before doing any of the ports change and/or renaming the envvars file.

after that restart the server, it will ask for your administrator account password, and you are good to go.
Average of ratings: Useful (1)
In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Jonathan Baldwin -

Thanks - that seems to have worked for me...

In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Jonathan Baldwin -

I spoke too soon.


I have MAMP running, but trying to access Moodle gives the error below (and then redirects to the 8888 address... which is inaccessible)

Is there a step missing?

Incorrect access detected, this server may be accessed only through "http://localhost:8888/moodle28" address, sorry.
Please notify server administrator.
This page should automatically redirect. If nothing is happening please use the continue link below.
Continue
In reply to Jonathan Baldwin

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers
Jonathan, are you able to access moodle after this screen? as this screen is not an error, when you setup moodle on live server, it makes difference accessing it using www and without www, and when one does that this screen appears which after 3 seconds takes you to the moodle installation.

Are you able to get into moodle after that? as you can see there is mentioned port 8888, though if you mention non-default ports (other than 80) then you have to mention them with your localhost, as Browser looks for port 80 for web presence.

you can change/mention address in your config.php file typing same address
or you can go to your moodle file directory, open folder "lib" and find file "setuplib.php"
open that file, and go to line 795
you'll find the code written
 redirect($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3);
        }

where its mentioned wwwroot, 3, change that into 0 (this is time in seconds showing up the same error for, that you showed above)

rest, if you want you can change the default ports for Apache and MySQL, but ideally you must have done it before installing moodle, as may be you'll get database error.
In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Jonathan Baldwin -
Hi


No, I can't access Moodle - localhost:80 is what takes me here.

I'm trying to run a local installation of Moodle to develop a course before moving it to a live server. Obviously, all was working fine until recently - I could access Moodle no problem.


I tried editing setuplib.php as you described.

Now what happens is I try to access localhost:80/moodle or localhost:80/moodle28 and immediately get the error in the screenshot - I seem to be being forwarded to localhost:8888/moodle28...


So to recap, I was getting the same errors as Tina, changed the ports in MAMP as you described, restarted the servers and then received the error.

I've changed setuplib.php but if I figured this out correctly, all that changed was the amount of time it waited to give me an error message.


Thanks for your time!

Attachment Failed_to_open_page.png
In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Jonathan Baldwin -

Do you think this problem will be fixed at installation anytime soon to avoid us having to root around in php files? I liked MAMP because it didn't require it!

In reply to Jonathan Baldwin

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers

Jonathan,

if you already have installed Moodle, then you can skip the port changes but do change the file name _envvars.

in any case, make sure you have all servers stopped while you make changes.

I had mentioned port changes assuming that Moodle has not been installed yet, or you may will re-install moodle once again after MAMP configuration.

Just make sure you have Moodle access address as same as mentioned in config.php file found at root of Moodle installation directory. if you have changed the ports to 80 for Apache, even then you can go to Moodle directory and make changes to the config.php file, re-writing address as localhost/moodle or localhost/moodle28 (which ever applies)

In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Tina Marles -

Thank you Usman - but this only partly worked. It opens a page (http://localhost/MAMP/?language=English) which has information about MAMP but I cannot start the moodle page (as shown in the installation document - the one you access using localhost:8888/moodle. I tried to enter http://localhost:80/moodle instead (just thinking because we changed the port) but it still just tries to open http://localhost:8888/moodle28 and tells me that the webpage is not available! Before it displays the "Webpage is not available!" it shows me a page for about 2-3 seconds with the error message "Incorrect access detected, this server may be accessed only through "http://localhost:8888/moodle28" address, sorry.

Please notify server administrator." 

So, I am wondering what else I can do to get Moodle to work????

Thank you so much for any help!!



In reply to Tina Marles

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Tina Marles -

To Jonathan Baldwin - I had the same problem (see my post) but somehow I fixed it!!! 

I did change the ports as Usman said and changed that file envvars to _envvars, getting the same problems. So, I changed the ports back to the defaults (8888 and 8889) but left the _envvars file. Restarted the servers and voila!!! It worked!!!! 

Hope it works for you too!! I use google chrome - not sure if that makes a difference or not.

Average of ratings: Useful (1)
In reply to Tina Marles

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Tina (and Usman), today I decided to try installing this MAMP program on my Mac.  I had the same difficulties as others, and made it down to your post.  When I followed your advice to go back to 8888 and 8889 after changing -envvars, yep, everything worked form me too!  Thanks for your post.

Quite honestly, I have desired to have the ability to run an experimental version of Moodle on my local computer for about 5 years.  For several years on my PC, I never seemed to have success.  Now finally on my Mac, I think that I have this ability.

Soon, I am going to see if I can install Moodle 2.7 into this environment, update 2.8, and finally install a version of Moodle on my Mac to mirror my production web server's install.  Can't wait!

Thanks again.

In reply to Rick Jerz

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers

Rick, I couldn't get your phrase "For several years on my PC, I never seemed to have success", I dont use MAC, never actually (but briefly once in 2006) just for the sake of using applications that aren't available on PC Platform (Final Cut, Aperture, keynote etc), what sort of issues you were having on PC platform? As to me using PC is way easier rather than MAC smile and application availability for PC platform is much higher.

In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Interesting, Usman. On the PC, I first ran into port issues with Skype.  Then, sometimes AMP would work, but then it wouldn't.  I tried for quite awhile, but then gave up.  Maybe now, if I were to do it again (with my experience), it would work.


The MAC OS is built upon UNIX, so I find the environment more closely matches my virtual server.  Instead of a DOS window, for example, Terminal on the MAC is a UNIX shell.

Well, could be my personal preference now.

In reply to Rick Jerz

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers

That's what I thought, that an experienced person like you are having troubles on using WAMP cant be possible, but anyway, thanks for clearing that, of course I am in certainty that you wont have any issue ahead, those who can run unix, can run anything smile

In reply to Usman Asar

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I am struggling a little with the correct form of a cron job.  Can you suggest what might work?  Here are my two possibilities:

*/5 * * * * /usr/bin/curl http://localhost:8888/moodle27/admin/cron.php -o /dev/null/ -silent

*/5 * * * * /usr/bin/php  /Applications/MAMP/htdocs/moodle27/admin/cron.php >/dev/null

Or should it be different?  So far, neither of these have seemed to work.

I know that email is working in my MAMP because I had to send myself a password reset, which worked.

In reply to Rick Jerz

Re: OS X 10.10.1 (Yosemite) and Moodle4Mac-MAMP 2.8.1 - MAMP servers dont start

by Usman Asar -
Picture of Plugin developers Picture of Testers

Rick,

I use this command on my LAMP, and works on LLMP as well with CRON outputs to Emails.

php -q /home/mruasar/public_html/moodle/admin/cli/cron.php

on MAMP try this command see if this works

*/5 * * * * /usr/bin/curl --silent --compressed http://localhost:8888/moodle/admin/cron.php

or you can as well try

*/5 * * * * /usr/bin/curl --silent --compressed http://localhost:8888/moodle/admin/cli/cron.php

as well try getting rid of --compressed command if it doesnt worked out.