Undefined Errors when Trying to add a domain

224 views
Skip to first unread message

Mike Doroshenko II

unread,
Apr 16, 2013, 4:45:43 PM4/16/13
to ve...@googlegroups.com
I have been attempting to set Exim/Vxim up for a long time already and am getting really frustrated discouraged.

When I add a site the screen simply does white and I get errors in my log about undefined variables.

[Tue Apr 16 20:42:40 2013] [error] [client 142.59.146.141] PHP Notice:  Undefined index: realname in /var/www/vexim/config/variables.php on line 63, referer: https://mail.mikedoroshenko.com/siteadd.php?type=local
[Tue Apr 16 20:42:40 2013] [error] [client 142.59.146.141] PHP Notice:  Undefined variable: _SESSION in /var/www/vexim/config/variables.php on line 65, referer: https://mail.mikedoroshenko.com/siteadd.php?type=local
[Tue Apr 16 20:42:40 2013] [error] [client 142.59.146.141] PHP Notice:  Undefined variable: _SESSION in /var/www/vexim/config/variables.php on line 66, referer: https://mail.mikedoroshenko.com/siteadd.php?type=local
[Tue Apr 16 20:42:40 2013] [error] [client 142.59.146.141] PHP Notice:  Undefined variable: _SESSION in /var/www/vexim/config/variables.php on line 67, referer: https://mail.mikedoroshenko.com/siteadd.php?type=local

Rimas Kudelis

unread,
Apr 17, 2013, 4:19:46 PM4/17/13
to Mike Doroshenko II, ve...@googlegroups.com
Hello Mike,
what are the contents of $welcome_message and $welcome_newdomain in
variables.php? Neither $_SESSION nor $_POST['realname'] is used in the
default $welcome_newdomain message, and this is the variable that is
used when adding a domain. Let's see – can you add a domain if you
comment out $welcome_message in variables.php? Also, what version of PHP
are you using?

regards,
Rimas

Mike Doroshenko II

unread,
Apr 17, 2013, 5:24:46 PM4/17/13
to Rimas Kudelis, ve...@googlegroups.com
Hi Rimas,

I am running PHP 5.3.3

I commented out the $welcome_message and still got a white screen :(

Below are those values you requested.

> /* Welcome message, sent to new POP/IMAP accounts */
> $welcome_message = "Welcome, {$_POST['realname']} !\n\nYour new
> E-mail account is all ready for you.\n\n"
> . "Here are some settings you might find useful:\n\n"
> . "Username:
> {$_POST['localpart']}@{$_SESSION['domain']}\n"
> . "POP3 server: mail.{$_SESSION['domain']}\n"
> . "SMTP server: mail.{$_SESSION['domain']}\n";
>
> /* Welcome message, sent to new domains */
> $welcome_newdomain = "Welcome, and thank you for registering your
> e-mail domain\n"
> . "{$_POST['domain']} with us.\n\nIf you have any
> questions, please\n"
> . "don't hesitate to ask your account
> representitive.\n";
--
Mike Doroshenko, Junior Sys Admin
TecKnoQuest Inc.
mi...@tecknoquest.com
www.tecknoquest.com

Rimas Kudelis

unread,
May 17, 2013, 5:57:08 AM5/17/13
to ve...@googlegroups.com, Mike Doroshenko II
Hi,

I finally found some time to look at Vexim's code again. I (hopefully)
have fixed the code to not rely on unset variables, at least in the
cases that I have noticed.
Additionally, I made a few other adjustments and fixes.

Mike, if you're still around, would you mind trying out the latest
master from https://github.com/avleen/vexim2 ?

Rimas

Rimas Kudelis

unread,
May 18, 2013, 3:04:45 AM5/18/13
to ve...@googlegroups.com, Mike Doroshenko II
Hello Mike,

a few more ideas:
1. Try enabling more verbose logging in PHP, if you get any relevant
info there, please post here
2. Check if the web server process running Vexim for you can write to
the directory you're specifying as local domain's dir.
3. When creating a local domain, you can specify the UID and GID which
are used for its files. Try setting these values to UID and GID under
which the web server process runs.

Please report your success back. Also, please post to the google group
instead of mailing me personally, so that more people can help you. Thanks!

Rimas


2013.05.17 20:38, Mike Doroshenko II wrote:
> Hi,
>
> I don't seem to be getting those errors in my log files, but I still
> get a white screen after I submit the form to add a local domain :(
>
> MD2

Mike Doroshenko II

unread,
Jun 27, 2013, 4:16:29 PM6/27/13
to ve...@googlegroups.com
Hello again Rimas :)

I have tried to enable more verbose php logging and still nothing, what steps do you recommend I take to get more desirable results?


2. Check if the web server process running Vexim for you can write to the directory you're specifying as local domain's dir
You mean the Domain Mail directory: field that defaults to /usr/local/mail/    ?
In that case I have made a new directory w/ the permissions and used that one, still no luck :(

I have set the System UID and System GID options to the IDs of the webserver and still :(


Rimas Kudelis wrote:

Rimas Kudelis

unread,
Jun 27, 2013, 4:52:44 PM6/27/13
to ve...@googlegroups.com
Hello Mike,


2013.06.27 23:16, Mike Doroshenko II wrote:
> I have tried to enable more verbose php logging and still nothing,
> what steps do you recommend I take to get more desirable results?


try adding the following lines to the top of config/variables.php:

error_reporting(E_ALL);
ini_set('display_errors', 'On');

Note: I haven't tested if that actually works and can't guarantee that it would be helpful in your case. You may want to check out http://stackoverflow.com/questions/845021/how-to-get-useful-error-messages-in-php and other similar threads that you can quickly google up.

But before all that, I would suggest that you use the latest changeset from git – as I wrote in a separet thead before, I have now removed the dependency on Pear-DB, and made Vexim use PDO instead. You could be one of a few testers. ;) Bare in mind though, that you would need to re-configure Vexim since the static content of variables.php has changed a bit.

>> 2. Check if the web server process running Vexim for you can write
>> to the directory you're specifying as local domain's dir
> You mean the *Domain Mail directory:* field that defaults to

> /usr/local/mail/    ? In that case I have made a new directory w/ the
> permissions and used that one, still no luck :(
>
> I have set the System UID and System GID options to the IDs of the
> webserver and still :(

Yeah, I think I actually had that problem, and it turned out to be something else than permissions, but I can't remember now.

Just in case, if after checking out (or downloading) the latest git snapshot, configuring it properly, and adding the PHP code above to the config, you'd still get a blank page, open siteaddsubmit.php in a text editor, and comment out the following code (it starts at line 47 in the latest snapshot):

  if ($userinfo = @posix_getpwuid ($uid)) {
    $uid = $userinfo['uid'];
  } elseif ($userinfo = @posix_getpwnam ($uid)) {
    $uid = $userinfo['uid'];
  } else {
    header ("Location: site.php?failuidguid={$_POST['domain']}");
    die;
  }

  if ($groupinfo = @posix_getgrgid ($gid)) {
    $gid = $groupinfo['gid'];
  } elseif ($groupinfo = @posix_getgrnam ($gid)) {
    $gid = $groupinfo['gid'];
  } else {
    header ("Location: site.php?failuidguid={$_POST['domain']}");
    die;
  }


Then try submiting the form again and tell me if it works.

By the way, if you don't mind, you could set me up shell access to your server and and pass me login credentials to that and to vexim, so that I could try to find the problem myself. Or we could have a real-time chat on Skype or Google Talk. Perhaps then we could uncover the problem quicker...

In any case, best regards and thanks for not giving up!
Rimas

Reply all
Reply to author
Forward
0 new messages