PEAR Mail/Mail_Mime Package Error

If you experience the following error that refers to mailtemplate or mailmime, this means you don’t have PEAR Mail or PEAR Mail_mime package installed. For example after you have downloaded the PEAR package to install PEAR Mail package type at the shell prompt without quotes “pear install Mail”.

Example of error messages
Warning: main(Mail.php): failed to open stream: No such file or directory in
/usr/share/pear/midcom/lib/midcom/helper/mailtemplate.php on line 17

Fatal error: main(): Failed opening required ‘Mail.php’
(include_path=’.:/usr/local/share/php/pear’) in
/usr/share/pear/midcom/lib/midcom/helper/mailtemplate.php on line 17

Apache Warning – MySQL Lib Size Mismatch Solution

I was having some problems with my web site so I went off to check my Apache HTTPD error_log and found three warning messages logged.

Apache HTTPD error_log
/usr/sbin/httpd:/usr/lib/apache/modules/libphp4.so: /usr/local/lib/libmysqlclient.so.12.0 : WARNING: symbol(client_errors) size mismatch, relink your program
/usr/sbin/httpd:/usr/lib/apache/modules/libphp4.so: /usr/local/lib/libmysqlclient.so.12.0 : WARNING: symbol(default_directories) size mismatch, relink your program
/usr/sbin/httpd:/usr/lib/apache/modules/libphp4.so: /usr/local/lib/libmysqlclient.so.12.0 : WARNING: symbol(globerrs) size mismatch, relink your program

After some time of research and with no solution, I decided to mention the problem in Midgard IRC channel. With Piotras comment, I quote “TheWarden: php was compiled with different version of mysql libraries”. So with that said off I went to re-install PHP v4.3.11 but this time configure it with –with-mysql=/usr/local so the correct MySQL libraries would be used. If –with-mysql is not used PHP will use it’s own built in MySQL libraries. I double checked my Apache HTTPD error_log and now the warnings are no longer present.

Midgard 1.6.3 – Datagard Errors – Resolved

As I discussed in my previous blog the problem I was having was with open files on OpenBSD with MySQL I thought at the time that adding the lines to the /etc/login.conf would resolve my problem. However I discovered that this did not resolve the problem. Why I don’t know unfortunately. The good news is the problem has been resolved. To resolve the errors of “Can’t create/write to file” and “Errcode: 9″ you have to start MySQL like so “mysqld_safe –open-files-limit=2048 &”. This will increase the amount of files MySQL can open therefore eliminating the errors. On a side note I did have to make some changes on permissions as shown below so Midgard could function which again were pointed out by Piotras. Thanks Piotras for the helping once again :-) . Your paths may vary as I installed Midgard CMS with a prefix path of /usr/local/midgard-1.6.3 to keep all the files centralized as possible.

# chmod -R 775 /usr/local/midgard-1.6.3/var/cache
# chown -R www:www /usr/local/midgard-1.6.3/var/cache
# chmod 551 /usr/local/midgard-1.6.3/var/lib/midgard/vhosts

If you care to read further on this subject of “mysql openfiles on openbsd” try the following links.

http://dev.mysql.com/doc/mysql/en/openbsd-2-8.html
http://www.monkey.org/openbsd/archive/misc/0502/msg01000.html

You can also use a search engine such as Google.com and search for with/out quotes “mysql openfiles openbsd”.

Midgard 1.6.3 – Datagard Errors – Continued

Piotras pointed out that the errors I was getting was due to open files issue with OpenBSD and MySQL. Piotras pointed me to an OpenBSD notes on mysql.com. I had no idea this error was pointing to an open files issue which apprently can affect all versions of OpenBSD. I read the notes and applied the changes to the /etc/login.conf file based on the comments submitted by name withheld. I added the following lines to my /etc/login.conf file.

Add the following 9 lines to your /etc/login.conf file
# Setting used by MySQL daemon
mysql:\
:datasize=infinity:\
:maxproc=infinity:\
:o penfiles-cur=2048:\
:o penfiles-max=8192:\
:stacksize-cur=8M:\
:localcipher=blowfish,8:\
:tc=default:

Now it looks like I’ve gotten most of the errors I received from datagard at instillation of the database. However I’m still getting one error as shown below. Any ideas on this one? I think if I fixed this last error things would be working again. If anyone knows what the error means and/or how to solve it let me know, thanks.

Datagard database installation error
Trying to create mysql database and blobs dir.
wait….

Updating database: multilang
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/languages.xml
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
Updating database: fixing cache
Updating database: version control
Updating database: quota support

Trying to create mysql database and blobs dir.
wait….

Trying to make xml update….

repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/admin_user.xml

REPLIGARD/READ-CRITICAL **: Failed to allocate delayed resource f6b665f1984503790ed91f39b11b5392 as a link uid for member (Table ‘tmpxmlupdate.quota’ doesn’t exist).

Can not import admin user

Midgard 1.6.3 – Datagard Errors

At this point I’ve given up on Midgard v1.7rc1 as I’ve gotten no where to get it functional. Since I ran out of ideas on how to resolve the problem I decided to install Midgard v1.6.3. The installation of the Midgard modules went successful until I got to the last step of install the MySQL Midgard database using datagard. Here is the below errors I received. If anyone can help me out that would be much appreciated. I’ll willing to pay for consulting service to resolve these problems.

Datagard Install Database Errors

Trying to create mysql database and blobs dir.
wait….
chmod: /usr/local/midgard-1.6.3/etc/midgard/repligard.conf: No such file or directory
mv: /usr/local/midgard-1.6.3/etc/midgard/repligard.conf: No such file or directory
Updating database: multilang
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/languages.xml
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
Updating database: fixing cache
Updating database: version control
Updating database: quota support
Trying to create mysql database and blobs dir.
wait….
Trying to make xml update….
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/admin_user.xml
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/data/AegirAddOn_FileSync.xml.gz
Updating database: multilang
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/languages.xml
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Making missing GUIDs…
Updating database: fixing cache
ERROR 1 at line 2: Can’t create/write to file ‘./tmpxmlupdate/#sql-5aa7_236.MYD’ (Errcode: 9)
Updating database: version control
ERROR 1 at line 1: Can’t create/write to file ‘./tmpxmlupdate/#sql-5aa7_238.MYD’ (Errcode: 9)
Couldn’t update repligard table!
Please, follow SQL statements in /usr/local/midgard-1.6.3/share/midgard/repligard.sql, and try to update this table manually.
Updating database: quota support
ERROR 1 at line 1: Can’t create/write to file ‘./tmpxmlupdate/quota.MYD’ (Errcode: 9)
Couldn’t create and update quota table! Please, follow SQL statements in /usr/local/midgard-1.6.3/share/midgard/quota.sql, and try to update this table manually.
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Exporting to /usr/local/midgard-1.6.3/share/midgard/data/AegirAddOn_FileSync_multilang.xml.gz
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/admin_user.xml
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /tmp/tmp.dPuiL14768
Trying to create mysql database and blobs dir.
wait….
Trying to make xml update….
repligard-Message: Reading config file /usr/local/midgard-1.6.3/etc/midgard/repligard.conf
repligard-Message: Importing /usr/local/midgard-1.6.3/share/midgard/admin_user.xml
REPLIGARD/READ-CRITICAL **: Failed to allocate delayed resource f6b665f1984503790ed91f39b11b5392 as a link uid for member (Table ‘tmpxmlupdate.quota’ doesn’t exist).
Can not import admin user