Concrete5 CMS
Webdesign using a CMS. Notes to remind me.
These notes are more for my notes than anything else. However someone might find them useful.
Welsh Flag Internationalization package
I found that when creating a bilingual site, British English and Welsh, the Welsh flag icon was actually the UK Union Flag. Despite this, the correct welsh flag icon was located in ./images/flags/wales.png. So, taking a look at the mySQL table for the website database;
mysql> select * from MultilingualSections;
+-----+------------+--------+----------+
| cID | msLanguage | msIcon | msLocale |
+-----+------------+--------+----------+
| 145 | en_GB | GB | en_GB_GB |
| 146 | cy | GB | cy_GB |
+-----+------------+--------+----------+
2 rows in set (0.00 sec)
So, in order to resolve this, I simply changed the msIcon value for cy;
mysql> update MultilingualSections SET msIcon = 'wales' where msLanguage = 'cy';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from MultilingualSections;
+-----+------------+--------+----------+
| cID | msLanguage | msIcon | msLocale |
+-----+------------+--------+----------+
| 145 | en_GB | GB | en_GB_GB |
| 146 | cy | wales | cy_GB |
+-----+------------+--------+----------+
2 rows in set (0.00 sec)
Pretty URLS
In order to get rid of the index.php, you need to turn on 'Pretty URLS' in System and Settings > SEO and Statistics. This is especially important when wanting to use the internationalization package. Once you do this, you will probably find that your site doesn't work any more. To fix this, you need to edit;
#sudo vi /etc/httpd/conf/httpd.conf
and add the following..
'
Options +FollowSymLinks
AllowOverride all
Order deny,allow
Allow from all
RewriteEngine On
assuming that /var/www/html is the root directory of your concrete5 installation.
301 redirect
I know, this isn't anything to do with concrete5, but it had a weird consequence when it was not set. I had vhost set up in http.conf so that;
ServerName example.co.uk
ServerAlias www.example.co.uk
This has always worked fine, and avoids that embarrassment when one of your clients websites shows in preference to another one. However, what was happening on one of my concrete5 sites was that a custom font was not being found when accessing example.co.uk. To resolve this it is best to use 301 redirect, which is recommended practice. To do this, add the following to the .htaccess file in the root directory of your website(s);
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
I also added the following to http.conf;
Options +FollowSymLinks
AllowOverride all
Order deny,allow
Allow from all
RewriteEngine On
Installing on Solaris 11
What a pain this can be!! I assume that you have csw, apache and php5 already installed.
#unzip it whereever your apache server is pointing
unzip concrete5.zip
#sort permissions out;
chown -R nobody files packages config
#install x11
pkg install pkg:/x11/library/libx11@1.5.0-0.175.1.0.0.24.1317
#you need to install the CSWgd library
/opt/csw/bin/pkgutil -i CSWgd
#install mysql and php interface for it
pkg install mysql-51
/opt/csw/bin/pkgutil -i CSWphp5-mysql
#add the following extensions to your php.ini file;
vi /etc/opt/csw/php5/php.ini
extension=gd.so
extension=mysql.so
#restart apache
/opt/csw/apache2/sbin/apachectl restart
With any luck, when you go to the site in your web browser, it will pass the tests and you should be okay to proceed with installation. So let's make the databases;
#if you haven't yet, set a root password
/usr/mysql/5.1/bin/mysqladmin -u root password NEWPASSWORD
#within mysql, set up database;
mysql -u root -p
mysql> create database c5db;
#add user...clearly change the password to something sensible
mysql> grant usage on *.* to c5user@localhost identified by 'c5password';
#give user permissions
mysql> grant all privileges on c5db.* to c5user@localhost;
There we are, you can enter this information into your installation and c5 will do the rest...hopefully