Categories
Mahara Moodle

MAHOODLE Sorry, could not log you in… :( when we are behind a firewall or a proxy

Installing MAHOODLE is easy and there is a very good install guide. Btw If we are behind a firewall / proxy and we have separated the application to different machines or VMs in the same sub network it could happen that we can not log in to Mahara from Moodle. We get an apache error like this:

[Sun Aug 25 10:23:12 2013] [warn] [client 192.168.1.2] mod_fcgid: stderr: * log_message("Curl error: 7: couldn't connect to host", 8, true, true) at /var/www/mahara.example.org/docs/lib/errors.php:109, referer: http://moodle.example.org/

192.168.1.2 is the gateway address.

The fact is that our sub network does not have it’s own DNS just a public one so when we try to connect to the Moodle machine we get the public IP address of it. So it tries to connect via XMLRPC across the firewall but that is not allowed of course.

The solution is simple add Moodle to the /etc/hosts file of the Mahara machine.

192.168.1.x moodle.example.org
Categories
CMS Joomla

Paging error on Rokgallery loadposition grid mode, no previous and next button

I use Joomla 2.5 with Clarion template. I also installed RokGallery. One of my gallery did not show the page buttons and I could not find out why for a while. I followed the steps I mentioned in my last comment, but there was a little mistake. I put an “_” to the position name. When I delete the “_” character it worked.

So an important note: do not use special character (_-#@&) when using loadposition in an article.

Categories
CMS Joomla

Adding RokGallery to Joomla Article

Here are the steps to insert RokGallery into an article.

  1. Create a Gallery as normal on the Administration site. Go to Component > RokGallery.
  2. Add a Gallery by clicking on the Galleries icon.
  3. Set the options, name your gallery, choose a tag and save.
  4. Upload your images or choose images from the existing ones, set their name and description and tag them with the tag you have set in the gallery dialog.
  5. Go to Extensions > Module manager
  6. Create a new RokGallery module.
  7. Add Title, set Gallery Layout to Grid and the most important is to define a Position.
    Important note: the Position must be a uniqie identifier, not an existing one and should not contain special characters like _-!#.
  8. Go to Content >Article manager. Create a new article.
  9. Set Title and the required options.
  10. In the article text insert:
    {loadposition positionyouenteredtothegallerymodule}

Enjoy.

 

Categories
Debian Uncategorized

Install Debian Wheezy on Citrix XenServer 6.0.2

As Citrix XenServer 6.0.2 does not offer template for Debian Wheezy we have to install it in two steps.

First install Debian Squeeze as usual.

Second step is to upgrade Squeeze to Wheezy. Here are the sub-steps:

As it is a new install you do not have to update your system but for sure you can type the following commands:

apt-get update
apt-get upgrade
apt-get dist-upgrade

Also check that there are no packages are on hold or in any half installed state:

dpkg --audit 
dpkg --get-selections | grep hold

Now update /etc/apt/sources.list to the following:

# deb http://ftp.hu.debian.org/debian/ wheezy main

deb http://ftp.hu.debian.org/debian/ wheezy main
deb-src http://ftp.hu.debian.org/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'
deb http://ftp.hu.debian.org/debian/ wheezy-updates main
deb-src http://ftp.hu.debian.org/debian/ wheezy-updates main

After this type:

apt-get update

Then perform the upgrade. It is recommended to use a two stage upgrade approach.

apt-get upgrade
apt-get dist-upgrade

When it is ready reboot twice. After the first reboot I have found that all filesystems are read only due to an unknown error. After rebooting again everything was ok.

Enjoy your Debian Wheezy.

Links:

Debian: http://www.debian.org/
Debian Wheezy Release Notes: http://www.debian.org/releases/wheezy/amd64/release-notes/

Categories
Uncategorized

How programming is important

“Everybody in this country should learn how to program a computer…

Because it teaches you how to think.”

Steve Jobs

Categories
Linux

CentOS – Starting Apache on a different port using semanage

# For some reason I had to start Apache on port 8082, but when I tried to start Apache as root I get:

Permission denied: make_sock: could not bind to address [::]:8082

CentOS use SElinux security, therefore there are pre-defined port that Apache can use. The ports are: 80, 443, 488, 8008, 8009, 8443. So if we want to use another port we should add it. In all sites I’ve found solutions to use the semanage command but when I enter it I got:

-bash: semanage: command not found

A standard installation does not contain semanage so install it by typing:

# yum -y install policycoreutils-python

After that we need to add port 8082.

# semanage port -a -t http_port_t -p tcp 8082

And now we can start Apache with

# /etc/init.d/httpd start
Categories
Mahara

Mahara Moodle SSO – Unknown error 710

I have got a mail from one of our students, that she can not log in using SSO from Moodle. The Apache log said:

[Thu Oct 10 10:46:38 2013] [warn] [client 192.168.1.2] mod_fcgid: stderr: [WAR] fe (api/xmlrpc/client.php:173) Unknown error occurred: 710: Az al\xc3\xa1\xc3\xadr\xc3\xa1s-ellen\xc5\x91rz\xc3\xa9s sikertelen; az azonos\xc3\xadt\xc3\xa1st feltehet\xc5\x91leg nem \xc3\x96n \xc3\xadrta al\xc3\xa1., referer: http://moodle.appi.bme.hu/
[Thu Oct 10 10:46:38 2013] [warn] [client 192.168.1.2] mod_fcgid: stderr: Call stack (most recent first):, referer: http://moodle.example.org/
[Thu Oct 10 10:46:38 2013] [warn] [client 192.168.1.2] mod_fcgid: stderr: * Client->send("http://moodle.example.org") at /var/www/e-portfolio.appi.bme.hu/docs/auth/xmlrpc/lib.php:119, referer: http://moodle.example.org/
[Thu Oct 10 10:46:38 2013] [warn] [client 192.168.1.2] mod_fcgid: stderr: * AuthXmlrpc->request_user_authorise("f5d3148ab41b07113f47f79458596a5425b73895", "http://moodle.appi.bme.hu") at /var/www/e-portfolio.example.org/docs/auth/xmlrpc/land.php:94, referer: http://moodle.example.org/

The solution was to change the public keys on both Moodle and Mahara. After it the SSO worked again.