vexim 2.2.1 - unable to login to siteadmin

70 views
Skip to first unread message

Matt Darcy

unread,
Jul 21, 2016, 5:01:14 AM7/21/16
to vexim
I thought I'd test the 2.2.1 release on my test system.

I'm running CentOS 7.2 with the vendor provided PHP 5.4 packages with vendor provided apache 2.4
the database is MariaDB 5.5

I've configured the vexim databsae from scratch using the provided mysql.sql script, which works well as always, I updated it with the correct UID's and password changes.
I've updated variables.php to mirror the setup of the db.

The admin pages loads fine, and the login as siteadmin for the first time fails.

The apache error logs for the domain show the following

Thu Jul 21 09:22:59.083189 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined index: realname in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 63
[Thu Jul 21 09:22:59.083230 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined index: localpart in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 65
[Thu Jul 21 09:22:59.083236 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 65
[Thu Jul 21 09:22:59.083241 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 66
[Thu Jul 21 09:22:59.083246 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 67
[Thu Jul 21 09:22:59.083251 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined index: domain in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 71
[Thu Jul 21 09:22:59.084127 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: domheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 15
[Thu Jul 21 09:22:59.084142 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: domheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 15
[Thu Jul 21 09:22:59.084147 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: usrheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 17
[Thu Jul 21 09:22:59.084150 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined variable: usrheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 17
[Thu Jul 21 09:22:59.084157 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined index: login in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 86
[Thu Jul 21 09:22:59.084702 2016] [:error] [pid 11602] [client 88.97.208.57:54506] PHP Notice:  Undefined index: login in /srv/www/mailtest.internal/public_html/adm/mail/index.php on line 60
[Thu Jul 21 09:23:08.836144 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined index: realname in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 63, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.836178 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 65, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.836185 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 66, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.836189 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 67, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953332 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined index: realname in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 63, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953353 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined index: localpart in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 65, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953358 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 65, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953375 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 66, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953381 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: _SESSION in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 67, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.953386 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined index: domain in /srv/www/mailtest.internal/public_html/adm/mail/config/variables.php on line 71, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.954033 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: domheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 15, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.954046 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: domheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 15, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.954051 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: usrheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 17, referer: http://mailtest.internal/adm/mail/
[Thu Jul 21 09:23:08.954055 2016] [:error] [pid 11604] [client 88.97.208.57:54510] PHP Notice:  Undefined variable: usrheaderrow in /srv/www/mailtest.internal/public_html/adm/mail/config/header.php on line 17, referer: http://mailtest.internal/adm/mail/


My initial thought on this is that the database could not be accessed.

I manually connected to the database using the same information in the variables.php from the same physical host, and that was successful.

I'm not a PHP developer, and i've had a similar problem before on this same setup (although different physical box) when adding domains, which was fixed with a code change.

A pointer in the right direction would be appreciated, looking at all the missing variables, it really suggests to me it's not talking to the database.

thanks.

Matt

udera....@gmail.com

unread,
Jul 21, 2016, 5:53:59 AM7/21/16
to vexim
In line 6, did you set the $sqlserver to localhost?
$sqlserver = "localhost";

On https://www.schirmacher.de/display/INFO/improved+Vexim+frontend+and+bug+fixes you can still find a package based on vexim-2.2RC1 (you could manually undo the changes or just use it). This dates back to 2007.

I haven't tried it myself, it could be possible that some functions in PHP have been deprecated since then (PHP 5.3.0 was released in 2009), php 5.4 changed the session handling: https://secure.php.net/ChangeLog-5.php#5.4.0.

udera

udera....@gmail.com

unread,
Jul 21, 2016, 6:15:22 AM7/21/16
to vexim
I just installed the old version in debian. I needed first to install the pear-php extension:

After that I was able to login (it showed me the same error/warnings that you had)


On Thursday, July 21, 2016 at 11:01:14 AM UTC+2, Matt Darcy wrote:

Matt Darcy

unread,
Jul 21, 2016, 6:30:05 AM7/21/16
to vexim
Thanks for the response,

I had sqlserver set to unix+localhost (as I understood that would force it to use a socket) - I've changed it to "localhost" which makes it use a tcp connection, it still fails in the same way.

I have pear and pear DB installed as both are required for vexim to work


php-pear-DB-1.7.14-6.el7.noarch
php-pear-1.9.4-21.el7.noarch

My fear is that this just isn't compatible with anything later than php 5.3 (although I have got past this and logged in with some of the development versions in the past).

If this is the case, it pretty much makes vexim pointless as only really EOL boxes will have packages that old.

Be good to understand what's going on here.

Rimas Kudelis

unread,
Jul 22, 2016, 5:08:03 PM7/22/16
to ve...@googlegroups.com
Hi Matt,


2016-07-21 12:01, Matt Darcy rašė:
I thought I'd test the 2.2.1 release on my test system.

I'm running CentOS 7.2 with the vendor provided PHP 5.4 packages with vendor provided apache 2.4
the database is MariaDB 5.5

I've configured the vexim databsae from scratch using the provided mysql.sql script, which works well as always, I updated it with the correct UID's and password changes.
I've updated variables.php to mirror the setup of the db.

The admin pages loads fine, and the login as siteadmin for the first time fails.

The apache error logs for the domain show the following

<...>


My initial thought on this is that the database could not be accessed.

I manually connected to the database using the same information in the variables.php from the same physical host, and that was successful.

I'm not a PHP developer, and i've had a similar problem before on this same setup (although different physical box) when adding domains, which was fixed with a code change.

A pointer in the right direction would be appreciated, looking at all the missing variables, it really suggests to me it's not talking to the database.


I looked through the places referenced by your PHP notices. None of them seem to be fatal or otherwise very important. Vexim used to use a lot of uninitialized variables, hence these messages.

Can you tell us more about how exactly the siteadmin login fails? Does it say "Login failed", or do you get a blank page, or what?

If it says "Login failed" you should check that your password encryption scheme specified in config/variables.php (look for $cryptscheme) matches the way your siteadmin's password is encrypted in the database, and of course, you should know the password itself (which by default is 'CHANGE'). As an extra debugging step, you may log into your MariaDB with the vexim user, select the right database and select all rows from the `users` table. By default there should just be one row with the siteadmin user, make sure it's there.

By the way, you said you updated the script with a changed password. Have you changed the encrypted value as well? Could it be that you've simply updated the `clear` field (which holds 'CHANGE'), but forgot the field that is actually used by Vexim (that is `crypt`)?

Regards,
Rimas

Matt Darcy

unread,
Jul 23, 2016, 4:47:19 PM7/23/16
to vexim
I'd probably discard this whole thread based on feedback I moved to master branch, so it's not worth even looking at this.


On Thursday, 21 July 2016 10:01:14 UTC+1, Matt Darcy wrote:
Reply all
Reply to author
Forward
0 new messages