Hi All,

I have been working through several issues trying to get Drupal working with Apache2 on Suse 9.1. Here are my problems and resolutions which might save future Suse 9.x Drupal newbies like me some time and headaches. Most of the installation was pretty straight forward and everything went as expected until I came to trying to load the Drupal home page.

Problem 1. Get the Apache default page instead of Drupals

Added the code below to /etc/apache2/httpd.conf


AllowOverride All

Also added the code below to /etc/apache2/default-server.conf


.
.
# Options FileInfo AuthConfig Limit
AllowOverride All
# Controls who can get stuff from this server.
Order allow,deny
Allow from all

Not sure if both the changes above are needed or if it make things insecure. Anyway, I then restarted Apache with "/etc/rc.d/apache2 restart". I also needed to reload the pages in my web browser to get the expected Drupal pages instead of the Apache default page.

Problem 2. Get an error that the mail() function is undefined when I try to email the new account password

I tried setting the sendmail line in /etc/php.ini but this didn't fix the problem. I then did a php -m from the command line it appears that SuSE have not compiled the mail function into php4. I was almost resigned to having to recompile php4 from the source code when I saw the section below in /etc/php.ini. Well , I thought I might as well try overloading the mail function (whatever that does?) and after restarting Apache with "/etc/rc.d/apache2 restart" the error was fixed.

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 1

Problem 3. Didn't receive the e-mail with the new password
Although it is pretty obvious that I need my server pre-configured to receive mail or relay it elsewhere, I think this should be documented in the REQUIREMENTS section in the install.txt file. If you don't have mail working you will never be able to login and use your new Drupal site.

Regards

Murray Trainer

Comments

muzza’s picture

The mail overload fix above did not fix the problem with the mail() function - it merely hid the error. I believe the problem with mail() function should be fixed with an update of the imap4 base package from the SuSE website. I also found there are replacement functions that work better than the standard mail() function but this may require changes everywhere the mail() function is called.

jjcambefort’s picture

hello,
you can install a drupal site without fonctional mail smtp if you can access the server's logs.
I've installed one in a debian system on which i got problem when configuring exim to relay mails to your qmail server, (look like a dns problem )
I've found the admin password in /var/log/messages (if my memory is right,
several weeks passed ...)
Someone have asked in the posts if they can create an other way to install drupal without mail system.
regards
jjc

muzza’s picture

I managed to at least get in and have a look at Drupal as the admin user by temporarily hard coding a password in the user.module. I imagine if you wanted a permanent alternative to mail you could replace the call of the mail() function in that module with some code that either echoed the password on the web page or put the password into a file somwhere on the server.

I then downloaded and installed the following update from SuSE's ftp site which fixed the missing mail function in php:

yast2 --install php4-4.3.4-43.25.i586.rpm

I then ran the script below using "php mail.php and it sent a mail successfully.

$message = "This is a Test Message ";
mail('user@domain', "test message", $message);

However, when I copied the script into my website home directory and it from a web browser the mail function was still broken. I then downloaded and installed the module below which fixed the mail() problem after restarting the apache2 daemon:

yast2 --install apache2-mod_php4-4.3.4-43.25.i586.rpm
/etc/rc.d/apache2 restart

I also installed several other related apache and php updates to keep everything consistent at the same version.