PHPWebAdmin does not work after update.

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
ttomaras
New user
New user
Posts: 2
Joined: 2012-12-18 10:33

PHPWebAdmin does not work after update.

Post by ttomaras » 2016-07-16 04:09

Hello.

I performed an upgrade from version 1950 to 2367. All went well. Emails are reachable from Outlook and I can receive/send to my Gmail account without a problem. I can't make PHPWebAdmin to work though. I copied the files contained in the Program Folder of hmailserver to the directory of PHPWebAdmin, I edited the config file and when I tried to test the interface the following message comes up.
Operation failed

The operation failed. Please make sure that you have logged on with the appropriate permissions to perform this task.

The following description exists:

htmlspecialchars() expects at most 3 parameters, 4 given

Error location: functions.php
Please note that I am using PHP 5.2.0.

Thank you.

User avatar
jimimaseye
Moderator
Moderator
Posts: 7955
Joined: 2011-09-08 17:48

Re: PHPWebAdmin does not work after update.

Post by jimimaseye » 2016-07-16 08:26

HMS 5.6.6 B2383 on Win Server 2008 R2 Foundation, + 5.6.7-B2415 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

ttomaras
New user
New user
Posts: 2
Joined: 2012-12-18 10:33

Re: PHPWebAdmin does not work after update.

Post by ttomaras » 2016-07-16 11:15

Yes I did.
It used to work just fine with the previous version and I suppose I did everything right this time.

Please note that I am not that familiar with the world of PHP.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: PHPWebAdmin does not work after update.

Post by percepts » 2016-07-16 14:00

your verson of PHP was released in Nov 2006. It is 10 Years old which is an eternity in web terms!!!.

The htmlspecialchars function had its 4th parameter(double encode) added in PHP version 5.2.3 Released: 31 May 2007 (9 years ago).

I have no idea what changes have been made in the PHPWebAdmin code over the years but htmlspecialchars is being used by quite a few other functions in the code and is always being called with 4th parameter set to true (the default). Its probably been in the hmail php code for a very long time too.

With PHP it pays to keep your PHP version, code and scripts upto date otherwise you get trapped in the past and can't use newer scripts.

If you upgrade PHP to current version some of your other old PHP scripts may stop working and would require modifying to correct for altered or removed PHP functions. So you are caught between a rock and a hard place.

Only you can know whether you have much old code that would fail if you upgrade PHP and that is a PHP programming maintenance role that you should be performing yourself if you are running PHP. Its no good claiming you don't know PHP if you are using PHP. You'll need to hire someone to sort it out for you or go back to your old version of hmail.

User avatar
Dravion
Senior user
Senior user
Posts: 1335
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: PHPWebAdmin does not work after update.

Post by Dravion » 2016-07-16 14:24

Even in PHP 5 3 a lot of things had changed and nowdays PHP7 is out for quite a time.

Talk to your ISP or Server admin and tell him he should just upgrade your webspace.

Or just type in:
sudo apt-get upgrade -y (for Debian based Linux)
or:
sudo yum upgrade -y (for Redhat based Linux)

Or if you on Windows load a supported mainstream PHP
zip package (threadsafe one for Apache2) or the non-threadsafe for IIS and NGINX
Webservers on Windows.Adjust php.ini to your need and you are ready to go.
64-Bit builds of hMailserver

hMailServer-5.6.+ (HCD) https://github.com/hMailServer-ComDevs/hmailserver
hMailServer-5.6.+ (LTS) https://github.com/Dravion/hMailServer/releases

Post Reply