Thread: cpanelproxy.net
View Single Post
Old February 1st, 2008, 12:08 AM   #10 (permalink)
MarkRH
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,218 posts
Gave thanks: 18
Thanked 86 times
While you can add the fix to get it to work with webmail in cPanel 11 from the Sourceforge site, I've decided to go ahead and post the correction here (starts at line 218):
PHP Code:
while (true) {
  
$data fgets($server10240); // FIXME: Can we optimize here with another buffer-size?
  
if (strlen(trim($data))==0) break;

  
// Fix hostname in redirects, cookies...
  
$data preg_replace('_([^.]*)/webmail_''$1/webmail_'$data);  // line added to fix webmail in cPanel 11
  
$data str_replace(
          array(
'localhost:2095''localhost:2082''localhost:2086'),
          array(
$webmailhost,      $cpanelhost,     $whmhost),
          
$data);
  if (
substr($data011) == 'Set-Cookie:') {
    
$data str_replace(
            
'; domain=localhost'
            
'; domain='.$_SERVER['HTTP_HOST'], 
            
$data);
  }

  
header($datafalse);

Now I can access both my cpanel and webmail from work.
MarkRH is offline   Reply With Quote