Installing

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
Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Installing

Post by Joe » 2019-08-03 02:10

How do you log in to PHPWebAdmin?

Step 3: Use it

Point your web browser to http://localhost/PHPWebAdmin and log in with your hMailServer username and password.

when I Point my web browser to http://localhost/PHPWebAdmin , I just see all the files in the PHPWebAdmin directory.

User avatar
mattg
Moderator
Moderator
Posts: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Installing

Post by mattg » 2019-08-03 02:15

Do you have PHP installed? What web server are you using (Apache or IIS or ...)?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 02:27

Apache HTTP Server 2.2.25

PHP 5.0.3. But I'm not sure how to run that either.


System is running on a windows 7 desk top computer

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 02:59

actually I just re installed PHP and got a message indicating that I have to configure the Apache httpd.conf file. I will try to do that and let you know what happens.

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-03 03:00

What happens when you go to http://localhost/PHPWebAdmin/index.php ?

Clearly, at least Apache has configuration issues. In httpd.conf add index.php to

<IfModule dir_module>
DirectoryIndex index.php
</IfModule>

If you're missing this basic thing, you probably have a lot more configuration issues

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 04:34

When I go to http://localhost/PHPWebAdmin/index.php I get the print out of the index.php file.


I added following to the httpd.conf file.

# ******To use PHP for hMail these lines are added**********
#
#LoadModuale php_5module "c:/php/php5apache2.dll"
#LoadModuale php_5module "c:/php/php5ts.dll"
#SetEnv PHPRC C:/PHP
#AddType application/x-httpd-php .php
#PHPIniDir "C:/PHP"
#PHPIniDir "C:/Windows"
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>
#
# ******End to use PHP for hMail these lines are added**********
#

uncommenting any of the commands except
<IfModule dir_module>
DirectoryIndex index.php
</IfModule>

causes Apache to crash

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 05:31

arrg.....

took the "a" out of LoadModuale. Still not working

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-03 11:09

Try uninstalling xampp. PHP wil be configured automatically. You'll still need a couple of tweaks but it will be a heck of a lot easier to troubleshoot.

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 15:12

Looks like the PHP is not running. Guess I'll have to fix that before I set up hMail. Thanks everyone!!

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 19:32

installed PHP 4.3.11

now when I point foxfire web browser to http://localhost/PHPWebAdmin, I get:

WebAdmin

"; ?>

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-03 20:05

palinka wrote:
2019-08-03 11:09
Try uninstalling xampp. PHP wil be configured automatically. You'll still need a couple of tweaks but it will be a heck of a lot easier to troubleshoot.
Sorry - just noticed that's a typo. Should be try installing xampp.

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-03 22:10

I have not used xampp.

Can I just edit the index.php file?

here is mine

<?php

error_reporting(E_ALL);

if (!file_exists("config.php"))
{
echo "Please rename config-dist.php to config.php. The file is found in the PHPWebAdmin root folder.";
die;
}


header('Content-Type: text/html; charset=utf-8');
header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: DENY');
header('Content-Security-Policy: default-src \'none\'; script-src \'self\' \'unsafe-inline\'; connect-src \'self\'; img-src \'self\'; style-src \'self\' \'unsafe-inline\';');
header('X-XSS-Protection: 1; mode=block');

define('IN_WEBADMIN', true);
define('CSRF_ENABLED', true);

require_once("config.php");
require_once("include/initialization_test.php");
require_once("initialize.php");

set_exception_handler("ExceptionHandler");
set_error_handler("ErrorHandler");

$page = hmailGetVar("page");

if ($page == "")
$page = "frontpage";

$isbackground = (substr($page, 0,10) == "background");

if ($isbackground)
$page = "$page.php";
else
$page = "hm_$page.php";

// Check that the page really exists.
$page = stripslashes($page);
$page = basename($page, ".php");

if (!file_exists('./' . $page . '.php'))
hmailHackingAttemp();

if ($_SERVER['REQUEST_METHOD'] == 'POST' || $isbackground)
{
validate_csrf_token_supplied();
}

// If it's a background page, run here.
if ($isbackground)
{
include './' . $page . '.php';

// Page is run, die now.
die;
}

$csrftoken = get_csrf_session_token();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">

<TITLE>WebAdmin</TITLE>

<link href="style.css" type="text/css" rel="stylesheet">
<link href="include/tabber/tabber.css" type="text/css" rel="stylesheet">

<script type="text/javascript" src="include/formcheck.js"></script>
<script type="text/javascript" src="include/dtree.js"></script>
<script type="text/javascript" src="include/tabber/tabber.js"></script>
<script type="text/javascript" src="include/functions.js"></script>

<script type="text/javascript">
function ConfirmDelete(name, url)
{
confirm_delete = "<?php echo GetConfirmDelete();?>"
confirm_delete = confirm_delete.replace("%s", name);

if (confirm(confirm_delete))
document.location = url;
}
</script>
</head>
<body>

<br/>

<table width="90%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<font face="verdana, arial" size="1">
WebAdmin
</font>
</td>
</tr>
</table>
<br/>



<table height="500" width="90%" class="mainborder" id="maintable" cellpadding="8" border="0" align="center">
<tr>
<?php

if (hmail_isloggedin())
{
?>
<td valign="top" width="240">
<div class="dtree" id="dtree">

<?php
include "include_treemenu.php";

echo "<div class=\"dtree\" id=\"dtree\">
<script type=\"text/javascript\">
//<!--
d = new dTree('d','images/');
$dtree
//-->
</script>
";
?>
<div align="right">

</div>
</td>

<td valign="top">
<?php

include './' . $page . '.php';
?>
<br/><br/>
</td>
<?php
}
else
{
?>
<td valign="top" align="left">
<?php

include "hm_login.php";
?>
</td>
<?php
}
?>
</tr>

</table>

</body>
</html>

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-03 23:55

Joe wrote:
2019-08-03 22:10
I have not used xampp.

Can I just edit the index.php file?
Only if you want to completely break it.

User avatar
mattg
Moderator
Moderator
Posts: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Installing

Post by mattg » 2019-08-03 23:58

Joe wrote:
2019-08-03 19:32
installed PHP 4.3.11

now when I point foxfire web browser to http://localhost/PHPWebAdmin, I get:

WebAdmin

"; ?>
Then PHP is clearly STILL not working
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-04 02:19

I'm using a 32bit windows application, so doesn't look like xampp will help. Thanks for all your help.

User avatar
mattg
Moderator
Moderator
Posts: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Installing

Post by mattg » 2019-08-04 03:55

Under system requirements is a technical knowledge component
https://www.hmailserver.com/documentati ... quirements

I'm not sure that you have the required technical knowledge to run a mailserver
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-04 22:15

Joe wrote:
2019-08-04 02:19
I'm using a 32bit windows application, so doesn't look like xampp will help. Thanks for all your help.
Look for older v5.

Joe
New user
New user
Posts: 21
Joined: 2019-08-03 01:45

Re: Installing

Post by Joe » 2019-08-05 02:26

PHP 4 is definitely up and running on window.

Did command prompt c: php -v and got the correct version.

Just can't figure out how to set-up Apache httdp.conf file to see it.

LoadModule php4_module "c:/php/php4apache2.dll"
or almost any version thereof, causes Apache to not start.

palinka
Senior user
Senior user
Posts: 945
Joined: 2017-09-12 17:57

Re: Installing

Post by palinka » 2019-08-05 12:19

I don't even know if the web admin will run on php4. I have no idea. Php4 is very old now.

Anyway, that's really outside the scope if this forum.

Your best bet is to get everything working first. My advice is to dump what you have and install a wamp with at least php 5.6 that is preconfigured so you don't have to go through this process. There are plenty out there. Xampp is only one of them. Once you get everything working properly, then we can help you tweak it if you need in order to get hmailserver webadmin functioning. But nobody here is going to go through the back and forth of getting you started from scratch with getting Apache and php to work. You have to get to the point where it's possible for us to help you with hmailserver issues by yourself. Right now that's not possible but if you took my advice and installed xampp 5.6x, you'd be up and running in an hour instead of futzing around with httpd.conf on a system that is clearly outdated and likely vulnerable to attack which you can't even get working in the most basic way.

User avatar
mattg
Moderator
Moderator
Posts: 19979
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Installing

Post by mattg » 2019-08-05 12:41

And PHPWebAdmin is NOT needed to run hMailserver
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply