Forums | Mahara Community
Support
/
Installing with Hostmonster
20 October 2009, 13:33
I'm trying to install Mahara in a subfolder and I'm following the installation instructions on mahara.org. After I completed the instructions I tried to go to my installation in a webbrowser and I just got redirected to my main site so I renammed the .htaccess file so my browser would ignore it. Now I get this error: You are not using a UTF-8 database. I am using a UTF-8 database. Any questions?
Hosting Company: Hostmonster
PHP Version: 5.2.9
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: UTF8_unicode_ci
Thanks,
Andy
20 October 2009, 18:21
Hi - it seems that it's often the case that PHPMyAdmin tells complete lies about what encoding the actual database is (and also that sometimes people can be fooled by the various character set parameters MySQL has too). Could you please paste here the output of the following query?
SHOW VARIABLES LIKE 'character_set_%'
It might be that the character set of the connection is UTF8, while your database is something else (like latin1). I've seen that happen before, and I have no idea how mysql deals with such a contradictory situation
If you find that your database is actually latin1, you might have to issue an ALTER DATABASE statement to switch it. I think Ray Merrill even came up with a patch to do this automatically for you at one point, but it hasn't made its way to the Mahara codebase yet.
Of course, I could be completely wrong . But we'll see with the output of that query.
20 October 2009, 20:55
I'm not a php programmer so I might need some more explanation. I entered the suggested above and got the following results:
Resource id #2
Here is my php code:
//extract data
$extract = mysql_query("SHOW VARIABLES LIKE 'character_set_%'
");
echo "$extract";
What do I need to change to get the desired results?
20 October 2009, 21:32
eew, mysql_query()
Instead, try this:
$data = get_records_array("SHOW VARIABLES LIKE 'character_set_%'");
print_r($data);
21 October 2009, 7:54
I tried that and got this:
Fatal error: Call to undefined function get_records_array()
I just got a reply from Hostmonster this morning and they said that databases are latin1 by default. What does it need to be? I can probably export the database change the settings and then import it back.
22 October 2009, 2:18
I think you could use execute_sql() to switch it to the right encoding. Have a look in the MySQL documentation, at the ALTER DATABASE command - I think you could work out the right SQL to run to switch it. From inside Mahara, you can run random SQL with the execute_sql() function.
22 October 2009, 6:34
just a quick warning about hostmonster - if you're planning on doing any networking between your Mahara install and another Mahara or Moodle site, you won't be able to do this as Hostmonster have a buggy version of libxml installed which they are currently unwilling to change. If you're not doing any networking stuff you should be fine!22 October 2009, 14:50
That's not good. I was planning on using Mahara with our existing Moodle install.
Is there something I need to change in the script that Nigel sent me to get it to work?
$data = get_records_array("SHOW VARIABLES LIKE 'character_set_%'");
print_r($data);
Hostmonster is saying that the database is not Latin1 anymore and it's still not working. I just want to double check.
22 October 2009, 15:54
I finally got passed the database issue! Then I got a "magic_quotes_gpc is on" error because I'm bypassing the .htaccess Mahara provides. The .htaccess was redirecting me to my homepage and not to the mahara subfolder for some reason. I checked out the troubleshooting guide and used the fix listed for magic_quotes_gpc is on error...and then finally logged in as admin. Now it's on to configuration. If anyone sees any issues I may have in the future with these settings please let me know.
Thanks guys!
Andy
- «Previous page
- 1
- 2
- »Next page