Midgard CMS Development – Status Update

It is with great disappointment to announce that I will no longer be able to provide commercial development support from my employer of Midgard CMS. I’ve been told to terminate all development with Midgard CMS. I will however not disappear in my involvement with Midgard CMS. I plan to accelerate my plans to develop Midgard CMS on a test server at home running OpenBSD v3.7 i386 and look at the possibility of development on my web hosting provider. What does this all mean? Well unfortunately this means I will not be able to provide development time like I did in the past of 5 days a week at roughly 8 hours a day. Around September I have the possibility to continue minimal development with Midgard. At that point or later on my employer will re-evaluate Midgard CMS and see again at using it as our CMS. As my employer knows and agrees that CMS is the future and is required for the web site. Unfortunately they need results now and a new site up to support there customers and representative network. How I will continue without CMS is uncertain at this time. It may not be the best direction but it will get the job done, providing results as they want.

Saying all that, I will be around. Please feel free to email or contact me via my web site. I thank everyone for your support and help.

Midgard 1.6.3 – Data Database Import / Segfault

I have Midgard 1.6.3 freshly installed and functioning 100%, at least to my knowledge. I’m able to load all the web pages and log into Aegir. I have no error messages being logged into the MidgardLog or the HTTPD error_log. However after I import my Midgard database I get blank or empty web pages rendering in the browser. I did not see any error messages being logged into my HTTPD error_log. I turned on HTTPD debug log level (ex. LogLevel debug) and then turned on my Midgard logs (ex. MidgardLog debug /var/www/logs/midgard.log). Now in my HTTPD error_log I have “[notice] child pid 265 exit signal Segmentation fault (11)” and “Midgard: Refreshing NTLM auth request for sitegroup 0. NTLM sitegroup: -1″. See the logs below for further details. The logs will show me attempting to go to /midgard/.

I get blank/empty pages when I try to go to /midgard/, /mole/ (but page is not empty contains “< ?xml version="1.0"?>” and /example/. Anyone have any ideas how to resolve these two errors?

Here’s how I imported my Midgard database of a previous install of Midgard 1.6.3.

  • I logged into MySQL, executed the SQL command “drop database midgard;”.
  • Executed another SQL command “create database midgard;”.
  • Logged out of MySQL.
  • Then I imported the data by executing the following at the shell prompt “mysql -u username -p midgard < midgard_db.sql".

After this I just opened up my browser and tried to load some web pages from that server.

Apache error_log
Processing config directory: /usr/local/midgard-1.6.3/etc/midgard/apache/vhosts/*
Processing config file: /usr/local/midgard-1.6.3/etc/midgard/apache/vhosts/scorpius.venmarces.com_80
[notice] Initializing etag from /var/www/logs/etag-state
[notice] Apache/1.3.29 (Unix) Midgard/1.6.3/Repository/MultiLang PHP/4.3.11 mod_ssl/2.8.16 OpenSSL/0.9.7d configured — resuming normal operations
[info] Server built: unknown
[notice] Accept mutex: sysvsem (Default: sysvsem)
[debug] midgard-apache1.c(1355): [client ip-here] midgard_translate_handler(UTF-8, http://scorpius.venmarces.com:80/midgard)
[debug] select_db.h(51): [client ip-here] Midgard: select_database opened database midgard
[debug] midgard-apache1.c(192): [client ip-here] Midgard: lang set to 0
[debug] select_db.h(33): [client ip-here] Midgard: select_database kept current database midgard
[debug] midgard-apache1.c(977): [client ip-here] Midgard: Refreshing NTLM auth request for sitegroup 0. NTLM sitegroup: -1
[notice] child pid 12983 exit signal Segmentation fault (11)

Midgard Log
midgard-lib:12983:debug:query=SELECT id,style,root,lang,info&1,Length(prefix),sitegroup FROM host WHERE name=’subdomain.domainname.com’ AND port in (0,80) AND ( (0 <> 0 AND prefix = ”) OR (0 = 0 AN
D prefix=Left(‘/midgard’,Length(prefix)) AND IF(8>=Length(prefix),MID(‘/midgard’,1+Length(prefix),1) IN (”,’/'),0)=1 ) ) AND online <> 0 ORDER BY prefix DESC, port DESC
midgard-lib:12983:debug:query=SELECT info&2 FROM page WHERE page.id=50
midgard-lib:12983:debug:query=SELECT style FROM page WHERE page.id=50

How to Install PHP from Source

This installation example for Unix/Linux installs dependency support for Midgard CMS. Make sure Expat, zlib (comes with OpenBSD) and iconv are installed before proceeding. I have added additional configuration for MySQL (so the correct MySQL libraries are used), Microsoft SQL Server, apxs, XML, exif, dba and mbstring. Refer to the PHP configurator for details (# ./configure –help).

# ./configure –with-mysql=/usr/local –with-mssql=/usr/local –with-apxs –with-xml –with-zlib-dir=/usr/lib –with-expat –with-config-file-path=/var/www/conf –with-iconv=/usr/local/bin/iconv -–with-exif –-with-dba –-with-mbstring
# make
# make install
# make clean
# cp php.ini-recommended /var/www/conf/php.ini

Review/edit /var/www/conf/php.ini (path may vary) file to match your requirements. To meet the requirements of Midgard CMS you will require to do the following.

Add extension=midgard.so into your php.ini file.
Add the extensions path to extension_dir. Type “php-config –extension-dir”. Place the returned path into your php.ini file.
Ensure the file_uploads=on.
Ensure the short_open_tag=on.

Midgard/PHP CLI Segmentation Fault

Midgard CMS will crash PHP CLI if its loaded in the global php.ini. Add PHP settings to your Apache HTTP Server configuration file /var/www/conf/httpd.conf (path may vary). Put the below PHP settings into your httpd.conf file. This may also go into your Midgard httpd.conf if you want. Make sure to restart your Apache HTTP Server so configuration changes take affect.

php_value extension midgard.so
php_value register_globals 1

Midgard CMS – PEAR Install – Segmentation fault

If you are experiencing “segmentation fault” when trying to do a PEAR package install on a system using Midgard CMS, do the following.

  • Comment out “extension=midgard.so” line in php.ini.
  • Restart Apache HTTP Server.
  • Re-run Pear package install (i.e. pear install Mail).
  • Uncomment out “extension=midgard.so” line in php.ini.
  • Restart Apache HTTP Server.