Adding a cPanel/WHM/WebMail login box to your site.

markfrompf

Well-Known Member
Mar 27, 2006
174
0
166
Los Angeles, CA

sherwinaval

Registered
Jan 31, 2007
2
0
151
the problem is... if you key-in the wrong password, it will popup the login box again which I don't want it to happen.
was about to ask the same question... any solutions yet? thanks in advance
 

sirNemanjapro

Registered
Feb 9, 2008
2
0
51
Trnava, Cacak, Serbia
a shy question

I'm a bit shy to ask this since all of you are far ahead of me in this business and php\cPanel surrounding's.
When I saw the first page of this topic I got my answer, and for me its sufficient. I kept on reading until page #4 but when I realized I haven't slept for 36h, you seem to drift off. :p

Only question I have is, can it be corrected that after wrong login (unsuccessful) it dose not redirect to cPanel login page, but stays on the same page, and displays something like JavaScript alert() function with message?

I was thinking on removing the line
Code:
print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
but then its better to ask. :)
 

BobbyDouglas

Active Member
Jan 22, 2005
38
0
156
Anyone have a way to post to a login.php page and have the login.php page redirect to the cpanel/whm/webmail urls, WITHOUT passing the variables via the URL?

For example:

http://domain.com:2082/login/?user=myusername&pass=mypassword

is not a secure way of doing this...

Anyone who views the browser history will be able to see the username and password for the client's cpanel.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator

dean5000v

Registered
Mar 6, 2008
1
0
51
ok well i saw this code for the webmail and hosting login, i was wondering which parts of the code do i need to modify before the script will work on my server, e.g. whats links need ot be changed. thanks


PHP:
<table align="center" border="0" cellpadding="25" cellspacing="0">
<tr><td align="left">
<p align="left">
<font size="+1" color="#0000a0">cPanel Login</font></p>
<?php
if ($_GET['cfailed'] == "1") {
?>
<p align="left">
<font color=#ff0000><b>Your login attempt failed!</b></font></p>
<?php
}
print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2083/login/\" method=\"post\">";
?>
<p align="left">
<b>Username: </b><input type="text" name="user" size="10"><br>
<b>Password: </b><input type="password" name="pass" size="12"><br>
<?php
print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
 $_SERVER['PHP_SELF'] . "?cfailed=1\">";
?>
<input type="submit" value=" Login ">
</form></p>
</td><td align="left">
<p align="left">
<font size="+1" color="#0000a0">Webmail Login</font></p>
<?php
if ($_GET['mfailed'] == "1") {
?>
<p align="left">
<font color=#ff0000><b>Your login attempt failed!</b></font></p>
<?php
}
print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/login/\" method=\"post\">";
?>
<p align="left">
<b>Username: </b><input type="text" name="user" size="10"><br>
<b>Password: </b><input type="password" name="pass" size="12"><br>
<?php
print "<input type=\"hidden\" name=\"failurl\" value=\"http://" .  $_SERVER['HTTP_HOST'] .
 $_SERVER['PHP_SELF'] . "?mfailed=1\">";
?>
<input type="submit" value=" Login ">
</form></p>
</td></tr>
</table>
 

worldcom

Member
Feb 14, 2006
15
0
151
cPanel Access Level
Reseller Owner
Is there any confirmation that this is fixed yet??

We are setting up a new service and I used the same script as our old one and it still redirects to the :2082 port page instead of back to the site with the failurl.

I was thinking our old site was working ....... but nope ..... same thing.
Shouldn't we be going forward here ...... or is this the new Microsoft division ...... hehe
 

User101

Registered
Apr 14, 2008
2
0
51
BUG 6478 - Selectable WebMail Interface

In the 1st few pages of this thread, it was obvious that others are trying to do what I want to do......

I want my users to have a direct login to their webmail interface (WITHOUT getting the CPanel options)

I've posted a Bug 6478 that is a feature request for a radio button when you first create a new email account that will allow you to select what webmail interface this email user will get.... http://bugzilla.cpanel.net/show_bug.cgi?id=6478

The point of including the solution at email account creation is that it allows you to resolve the issue without the user going to any special webpage location or even if you don't have a website up and running.... You only need to have a mysite.com/webmail pointer (or webmail.mysite.com) and the settings you made at time of creation will control what interface they actually see....

Please review this Bug 6478 with the link above... post here your thoughts and vote on the bug page.......

Ken
(1st post)
 
Last edited: