Open Source Content Management System

Troubleshooting

  1. Midgard 1.8
  2. MidCOM 2.6
    1. Some typical issues
      1. Apache 2 doesn't start
      2. Access denied error when accessing /midgard
      3. Error 404, page not found when accessing /midgard
      4. Logging in to Aegir Fails
      5. SpiderAdmin Does Not Work
      6. Image Uploads Fail in Aegir, Spider or MidCOM
      7. Images Missing in the Midgard Example Site
      8. WYSIWYG Content Editor Doesn't Load in Aegir or MidCOM
      9. Error While Logging in to Database
      10. Blank Pages in Browser After Upgrading to Midgard 1.6.x
      11. Parser error: token_get_all() function must exist to analyze source code
    2. After all these, Midgard still gives 404

If problems appear, contact Midgard user mailing list or your Midgard support provider. If you encounter error messages or system warnings, please include these in your email. Screen shots of error situations are also useful in solving possible problems.

It is also possible to run Midgard in debugger.

Midgard 1.8

MidCOM 2.6

Some typical issues

Apache 2 doesn't start

If starting Apache 2 after setting up a VirtualHost with Datagard fails with the error:

Apache2(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

then the most likely problem is that you have multiple Listen 80 directives in your Apache configuration. Remove the duplicates and restart the server.

Access denied error when accessing /midgard

This is typically caused by Apache not being able to read the blob and DocumentRoot directories of Midgard that are located in the /var/lib/midgard. To fix this, assign read permissions to them:

chmod -R a+rx /var/lib/midgard

If you installed Midgard with some other prefix like /usr/local, tune this command accordingly.

Error 404, page not found when accessing /midgard

If you are getting this error right after install completes, do not try to find /spider-admin , /midgard or /aegir dir on your filesystem under DocumentRoot set in Virtual host configuration file. Instead, open main Apache configuration file and set log level to debug. It is set by simple directive:

LogLevel  debug

Stop Apache and start again. Request midgard page and take a look at log file.
The errors listed will help identify the cause. In many cases you may find debug errors like this one:

[debug] midgard-apache2.c(1314): [client xxx.xxx.xxx.xxx] Midgard: regenerating /var/cache/midgard/7-57-12-0.php: cannot open, assuming non-existant  

[debug] midgard-apache2.c(2253): [client xxx.xxx.xxx.xxx] Midgard: Couldn't create cache file

It simply means that one of the directory set by MidgardPageCacheDir does not have the proper permission set.
You should check every dir in this path. The most probable cause is that the 'cache' directory itself has drwx------ permissions (the most probable cause when midgard is self compiled and with prefix other than /usr).
Change permission to drwx--x--x using chmod:

chmod 711 /var/cache/midgard

Note that we use only x bit instead of rx as we do not want Apache user to be able to list this directory.

Logging in to Aegir Fails

If you cannot log in to Aegir, please check that you have register_globals on in your PHP settings. Register globals should be off by default in php.ini. You should set it on only for Aegir. You can do this with the Location directive:

php_admin_flag register_globals On

If this doesn't help check also that:

  • Cookies are enabled for the Midgard server in your browser
  • A proxy server is not blocking cookies from Midgard
  • PHP can write to the session directory

SpiderAdmin Does Not Work

SpiderAdmin also depends on register_globals to be on. Set this in the virtual host configuration:

 php_admin_flag register_globals On

Image Uploads Fail in Aegir, Spider or MidCOM

Ensure that file uploads are allowed by your PHP installation. Relevant lines in php.ini are the following:

; Whether PHP allows any file uploads  
file_uploads = On  

; Maximum size for uploaded files
upload_max_filesize = 50M  

; Maximum size for the complete form data
post_max_size = 50M

You should also check that your Apache user can write to the Midgard blob directory (typically /var/lib/midgard/blobs/DATABASENAME).

Images Missing in the Midgard Example Site

This is a known bug in midcom-example package. There are no images distributed with the example package and therefore the images are missing. This is not a serious bug though, as the component net.siriux.photos is working as it should. You can safely ignore this.

WYSIWYG Content Editor Doesn't Load in Aegir or MidCOM

The Word-like WYSIWYG content editor in Midgard relies on the ContentEditable browser feature (Midas in Mozilla browsers) which is not available in older or more limited web browsers. Browsers that don't support WYSIWYG editing will provide the regular plain text editor instead.

Browsers supporting WYSIWYG editing include Microsoft Internet Explorer 5.01+ and browsers built on version 1.3+ of the Mozilla engine including Mozilla 1.3+ and Firefox.

If your MidCOM site is using a custom style you also have to ensure that the required style elements (<(head-extra)> and <(bodytag-extra)>) are included in correct places.

Error While Logging in to Database

The problem mostly happens if you type Midgard administrator username and password instead when asked about Midgard database username and password. While configuring midgard-data you are asked about three different types of logins and passwords.

  • MySQL administrator - user who can manage MySQL server.
  • Midgard user for MySQL - user who is used while connecting to created database.
  • Sitegroup's admin - Sitegroup's administrator which is used internally by Midgard CMS.

Blank Pages in Browser After Upgrading to Midgard 1.6.x

There is nothing but blank pages for all midgard sites after successfull upgrade to Midgard 1.6.x and database update.
Import all new midgard packages using datagard. In most cases you have old packages which can not work with new Midgard releases.

Parser error: token_get_all() function must exist to analyze source code

PHP must be compiled with --enable-tokenizer option. Some pear packages can not be installed when this option is disabled.

After all these, Midgard still gives 404

If your pages are still not served correctly by Midgard despite all the solutions above, it is a good idea to try Midgard's internal debug logger. To activate it, add the following line into your VirtualHost configuration file in /etc/midgard/apache/vhost:

MidgardLog Debug+ /var/log/midgard/debug.log

This will make Midgard log its internal status to the file. Restart your Apache, and then look at the log file.

For example, if you see the message

midgard-lib:22698:warning:midgard-lib: mgd_connect to  

midgard@localhost://midgard failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

then check your MySQL connection settings. For example, Midgard might be configured to contact the wrong database host.

Designed by Nemein, hosted by Anykey