OSX 10.4.4

OSX 10.4.4

by Steven Tripp -
Number of replies: 22
Upgraded to 10.4.4. last night and now Moodle is broken.

I get this:
---
Error: Database connection failed.

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php
---

config files don't seem to have been changed, though.

Steve
Average of ratings: -
In reply to Steven Tripp

Re: OSX 10.4.4

by Vern Kollas -
Steve,

    What versions of the MySql and such were you running???  Were you using the ones built into OS X, or separate installers??   I was able to upgrade to 10.4.4. ok and moodle still worked, EXCEPT I wasn't able to run php from the terminal anymore meaning that I wasn't able to schedule the cron.php script to run anymore.  I had to reformat and go back to 10.4.3.  I am still having troubles, but I will save that for another thread....surprise

Good Luck!!

Vern
In reply to Vern Kollas

Re: OSX 10.4.4

by Steven Tripp -
MySQL Version 4.0.15 on one machine and 4.0.21 on the other. Don't remember if these were built in or not.

I think this is getting close to the problem:

http://www.macintouch.com/tiger43.html#jan12
In reply to Steven Tripp

Re: OSX 10.4.4

by Steven Tripp -
I've got one working.


I changed localhost to 127.0.0.1 in the config.php file.
In reply to Steven Tripp

Re: OSX 10.4.4

by Daryl Hawes -
Interesting comment. My initial reaction, I'm sorry to say, was "phooey" smile
However, with it shelved in the back on my mind I came across this page:

http://wiki.logicampus.com/index.php/Installation

Where they say "Make sure to use http://127.0.0.1/ and not http://localhost/ when testing the system. Some browsers will not take cookies from domain names that don't have dots in them.". Now that makes more sense.

For Mac users there's yet another option. You can use the "bonjour" name. By using this name for your config.php file as the server address as well as the mysql address you get the benefit of being able to access the machine on the local network. Open the Sharing system preference and you'll see the name listed at the top - it will look something like my-mac.local or mymac.local.

For test settings I'd probably try 127.0.0.1 for the mysql connections and mymac.local for the web address.

I'm not really sure that it's related to your problem in the first place. Just trying to think through why you would have seen that different behavior. HTH

In reply to Daryl Hawes

Re: OSX 10.4.4

by tim chambers -
Ive never been able to get the localhost to work on my G5 iMac so I downloaded MAMP at MAMP.org

I'ts got everything in it you need to run Moodle.

In reply to tim chambers

Re: OSX 10.4.4

by Daryl Hawes -
Tim,
Actually for a local use (portable, home, private, whatever) moodle install you may want to try the Moodle4OSX package that I put together. It include a slightly trimmed down XAMPP along with a custom application I wrote to start/stop it.

You can find it at http://moodle.sourceforge.net/ as Moodle4OSX-Installer{date}
In reply to tim chambers

Re: OSX 10.4.4

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Tim and Daryl,

I have been intrigued with MAMP for a while (especially since it has a PHP accelerator built in, includes more recent builds than Server Logistics, and easier installs than Marc Liyanege).  If you have installed this, please tell us more details of how it went and whether we can use it for production sites.  I hope to install MAMP this February.   Daryl, is your package better suited?
In reply to Don Hinkelman

Re: OSX 10.4.4

by Daryl Hawes -
MAMP (http://www.mamp.info/en/home/) and XAMPP (http://www.apachefriends.org/en/xampp-macosx.html) are not that different. I'm building Moodle4OSX with XAMPP for consitency since Moodle4Windows is also using XAMPP.

None of these "single, simple distro" packages are really aimed at production environments. From the MAMP website "MAMP was created primarily as a PHP development environment for Macintosh computer and should therefore not be used as Live Webserver for the Internet. In this case, we recommend that you use Mac OS X server with the provided Apache or a Linux server." Same goes for XAMPP.
In reply to Daryl Hawes

Re: OSX 10.4.4

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Daryl,
Thanks!  And yes, I read that MAMP disclaimer but I think it is merely a public way to protect relations with Apple or other powers that be.  Or just a way to say that we cannot take responsibility for mishaps (neither would Apple).  Note that the MAMP people do not give any specific reasons for saying it is not for a production environment.  Marc Liyanege's packages carry no similar warning, except to say that you, the installer are responsible.  I have used various distros in production environments and find them superior to my own manual setups and far superior to Apple's server which costs $1000 per upgrade.  Perhaps there are improvements in server 10.4.4, but I still recommend client versions to Moodle folks who want to use OS X servers.  I would love to use your Moodle4OSX, but could you say specifically why it is or is not good for production environments?   smile
In reply to Daryl Hawes

Re: OSX 10.4.4

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Daryl,

I just saw your XAMPP install package for Moodle on the downloads page. big grin Sorry I didn't know about it--haven't downloaded in a while.  Could you list for us the versions of the parts of the package?  Is it listed somewhere?

For example, this is what MAMP provides...

Version: 1.1.1   released on: 01-19-2006

Included software & libraries
  • Apache Version: 2.0.55
  • MySQL Version: 4.1.12
  • PHP Version: 4.4.2 & 5.1.2
  • eAccelerator: 0.9.4-rc1
  • Zend Optimizer: 2.6.0
  • phpMyAdmin 2.7.0-pl2
  • SQLite Version: 2.8.16
  • SQLiteManager Version: 1.1.3
  • Freetype Version: 2.1.9
  • t1lib Version: 5.1.0
  • curl Version: 7.14.0
  • jpeg Version: 6b
  • libpng Version: 1.2.5
  • gd Version: 2.0.28

In reply to Don Hinkelman

Re: OSX 10.4.4

by Daryl Hawes -
Don,
Details can be found at:
http://www.apachefriends.org/en/xampp-macosx.html

Xampp for Mac OS X is currently version 0.5.
It contains some of these pieces:
Apache 2.0.55, MySQL 5.0.15, PHP 4.4.1, PHP 5.0.5, Perl 5.8.7, ProFTPD 1.2.10, phpMyAdmin 2.6.4-pl3, OpenSSL 0.9.8a, GD 2.0.33, Freetype 2.1.10, libjpeg 6b, libpng 1.2.8, libungif-4.1.3, zlib 1.2.3, expat 1.95.8, Ming 0.3beta1, Webalizer 2.01-10, pdf class 009e, mod_perl 2.0.2, SQLite 3.2.2, phpSQLiteAdmin 0.2, libiconv-1.9.1, gdbm-1.8.3, libxml-2.6.20, libxslt-1.1.12, openldap-2.3.4, imap-2004e, gettext-0.14, libmcrypt-2.5.7, mhash-0.9.2, curl-7.15, zziplib-0.13.38, bzip2-1.0.3, eaccelerator-0.9.3, freetds-0.63, libgd-2.0.33

(To save on file size of the distribution some pieces that moodle does not need are removed. On the Windows side there is an "Xampp Lite". If/when there is one for the Mac OS X side Xammp Lite would be the base of the Moodle4OSX distro.)
In reply to Daryl Hawes

Re: OSX 10.4.4

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Wow! eaccelerator and MySQL 5.0.15. wide eyes That solves all the problems that I imagine. Martin just announced version 1.6 will need a minimum MySQL 4.1.16 (MAMP is 4.1.12). Is there any problem with Moodle running MySQL version 5.x? I saw one reported issue somewhere in these forums.  And is the XAMPP security command enough to make a moodle server into a production one?
In reply to Don Hinkelman

Re: OSX 10.4.4

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers
Is there any problem with Moodle running MySQL version 5.x?

The default settings for SQL compliance are a bit too restrictive for Moodle 1.5.x at the moment (I don't know if 1.6dev has the same problems or not).

Commenting out the STRICT_TRANS_TABLES flag makes it work nicely (or that's what I've read in these forums).

Saludos. Iñaki.
In reply to Daryl Hawes

Re: OSX 10.4.4 security for XAMPP

by Don Hinkelman -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I noticed this command for XAMPP that makes it secure for a production environment.  Has anyone tried it?

READ ME

* A matter of security (A MUST READ!)

As mentioned before, XAMPP is not meant for production use but only for developers in a development environment. The way XAMPP is configured is to be as open as possible and allowing the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.

Here a list of missing security in XAMPP:
  • 1. The MySQL administrator (root) has no password.
    2. The MySQL daemon is accessible via network.
    3. ProFTPD uses the password "xampp" for user "nobody".
    4. PhpMyAdmin is accessible via network.
    5. MySQL and Apache running under the same user (nobody).
To fix most of the security weaknesses simply call the following command:
/opt/lampp/lampp security
It starts a small security check and makes your XAMPP installation more secure.
In reply to Daryl Hawes

Re: OSX 10.4.4

by Paul Stott -
I'm trying to install Moodle on a mac running OS X Server 10.2. I have tried both http://127.0.0.1/ and http://localhost/ and the 'bonjour' name as domain names to test the system but with no success. http://127.0.0.1/ works fine on my Powerbook running OS 10.4.4. Any suggestions?
In reply to Vern Kollas

Re: OSX 10.4.4

by Paul Stott -
I'm having the same problem running the cron script from the terminal. I'm copying the suggested Unix one from the installlation help files. Is this the wrong one or is there another issue here?
In reply to Steven Tripp

Re: OSX 10.4.4

by Daryl Hawes -
This article MAY help depending on your setup.
http://docs.info.apple.com/article.html?artnum=302977
In reply to Daryl Hawes

Re: OSX 10.4.4

by Vern Kollas -
Hey Steve,

    Yeah, I saw that, however we are not using the server version of OS X.  Thanks though.  Any luck with your problem yet??

Vern
In reply to Vern Kollas

Re: OSX 10.4.4

by tim chambers -
I'm trying to get my Apache hosting provider's copy to run on my website but I run up against this in admin.html
Index of /admin and this in admin.php

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /www/c/campaignsont/moodle/htdocs/config.php on line 20

this is line 20

www/c/campaignsont/moodle/htdocs/lib/setup.php'include_path='.:/usr/local/php4'
require_once"$CFG->dirroot/lib/setup.php";

can anyone please advise?
In reply to Steven Tripp

Re: OSX 10.4.4

by Kevin O'Neill -
Any fixes yet? I just got the same message after running the 10.4.4 update (I should have read this forum first sad
In reply to Kevin O'Neill

Re: OSX 10.4.4

by Kevin O'Neill -
I got my database fixed by changing "localhost" to 127.0.0.1 in the config.php and everything is up and going.
In reply to Kevin O'Neill

Re: OSX 10.4.4

by Paul Stott -
As this question relates to a OSX 10.4.4 machine I though I'd ask you guys. My problem is I cannot resolve the problem of creating the Data Directory and I keep getting the error message:

The 'Data Directory' you specified could not be found or created. Either correct the path or create that directory manually.

What is the correct path (I've placed the moodle directory inside /Users/admin/Sites) . Can I create the Data Directory folder at the same location and set the ownership & permissions using Apple key + i? Or is this too simplisitic?

Any help would be much appreciated.

TIA

Paul