[vexim] broken adminuserchange.php

Mika mail at einhalt.net
Sat Mar 7 12:51:08 PST 2009


Terry wrote:
>> Terry wrote:
>>> Hi just wondered if any one knows how I can fix this ?
>>>
>>> Forward mail to:
>>> !
>>> \n"; ?>
>>>
>>> in adminuserchange.php
>> looks like your
>> _('Must be a full e-mail address') and
>> _('OR')
>> error messages are not shown for some reason.
>>
>> see http://img145.imageshack.us/img145/2203/bild5.png
>> (adminuserchange.php)
>>
>> hth,
>> Mika
> Hi Mika my section looks like
> --------------
> <td><?php echo _('Forward mail to'); ?>:</td>
>            <td>
>              <input type="text" size="25" name="forward"
>              value="<?php print $row['forward']; ?>" class="textfield"><br>
>              <? echo _('Must be a full e-mail address');>!<br>
>              <? echo _('OR') ."<br>\n"; ?>
>              <select name="forwardmenu">
>                <option selected value=""></option>
>                <?php
>                  $queryuserlist = "SELECT realname, username, user_id, unseen
>                  FROM users
>                  WHERE enabled = '1' AND domain_id = {$_SESSION['domain_id']}
>                  AND type != 'fail' ORDER BY realname, username, type desc";
>                  $resultuserlist = $db->query($queryuserlist);
>                  while ($rowuserlist = $resultuserlist->fetchRow()) {
>                ?>
>                  <option value="<?php echo $rowuserlist['username']; ?>">
>                    <?php echo $rowuserlist['realname']; ?>
>                    (<?php echo $rowuserlist['username']; ?>)
>                  </option>
>                <?php
>                  }
>                ?>
>              </select>
>            </td>
> ---------------------

Hey Terry,
I guess your webserver doesn't do PHP short tags. Means: he/she/it 
ignores "<?" tags and only recognizes "<?php".
Obviously a little inconsistency in adminuserchange.php's code.

Try replace...
<? echo _('Must be a full e-mail address'); >!<br>
<? echo _('OR') ."<br>\n"; ?>

...with:
<?php echo _('Must be a full e-mail address'); >!<br>
<?php echo _('OR') ."<br>\n"; ?>

You might want to hunt down all instances (in all .php files) of "<? " 
and replace them with "<?php ".
Alternativly  -if you have access and know what you're doing ;)- enable 
PHP short tags in your webserver's php.ini by setting "short_open_tag" 
to "1".

good luck,
Mika




More information about the Vexim mailing list